Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More human friendly "show tables" output for db cleanup #38654

Merged

Conversation

jedcunningham
Copy link
Member

Don't print the string representation of a list, print out just the table names.

Before:

You have requested that we drop 4 archived tables prefixed with _airflow_deleted__.
This is irreversible. Consider backing up the tables first                               
                                                                                         
Show tables? (y/n):                                                                      
y                                                                                        
['_airflow_deleted__dag__20240401153649', '_airflow_deleted__dag_run__20240401153649', '_airflow_deleted__job__20240401153649', '_airflow_deleted__log__20240401153649'] 

After:

You have requested that we drop 4 archived tables prefixed with _airflow_deleted__.
This is irreversible. Consider backing up the tables first.

Show tables that will be dropped? (y/n): 
y
  _airflow_deleted__dag__20240401153649
  _airflow_deleted__dag_run__20240401153649
  _airflow_deleted__job__20240401153649
  _airflow_deleted__log__20240401153649

And with less than 3 tables...
Before:

You have requested that we drop the following archived tables ['_airflow_deleted__job__20240401153649', '_airflow_deleted__log__20240401153649'].
This is irreversible. Consider backing up the tables first 

After:

You have requested that we drop the following archived tables: _airflow_deleted__job__20240401153649, _airflow_deleted__log__20240401153649.
This is irreversible. Consider backing up the tables first.

@eladkal eladkal added this to the Airflow 2.9.0 milestone Apr 1, 2024
@hussein-awala hussein-awala merged commit 39b3eb2 into apache:main Apr 1, 2024
41 checks passed
ephraimbuddy pushed a commit that referenced this pull request Apr 2, 2024
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Apr 2, 2024
ephraimbuddy pushed a commit that referenced this pull request Apr 2, 2024
ephraimbuddy pushed a commit that referenced this pull request Apr 2, 2024
idantepper pushed a commit to idantepper/airflow that referenced this pull request Apr 3, 2024
idantepper pushed a commit to idantepper/airflow that referenced this pull request Apr 3, 2024
mathiaHT pushed a commit to mathiaHT/airflow that referenced this pull request Apr 4, 2024
utkarsharma2 pushed a commit to astronomer/airflow that referenced this pull request Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants