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

List specific config section and its values using the cli #28334

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

ephraimbuddy
Copy link
Contributor

This adds an option to list a specific config section with its values through the cli.
e.g for core: airflow config list --section core

(env) ➜  airflow git:(list-section) airflow config list --section database 
[database]
sql_alchemy_conn = sqlite:////Users/ephraimbuddy/airflow/airflow.db
sql_engine_encoding = utf-8
sql_alchemy_pool_enabled = True
sql_alchemy_pool_size = 5
sql_alchemy_max_overflow = 10
sql_alchemy_pool_recycle = 1800
sql_alchemy_pool_pre_ping = True
sql_alchemy_schema = 
load_default_connections = True
max_db_retries = 3

@norm
Copy link
Contributor

norm commented Dec 13, 2022

Idle thought: I'm wondering if instead of --section database it might be better to have it be an optional positional argument (ie airflow config list and airflow config list database). It feels better to me, but not to the point where I'm advocating for it.

@ephraimbuddy
Copy link
Contributor Author

Idle thought: I'm wondering if instead of --section database it might be better to have it be an optional positional argument (ie airflow config list and airflow config list database). It feels better to me, but not to the point where I'm advocating for it.

It looks like the --section is more explicit and user-friendly. The optional positional argument looks good too but I feel using --section makes it more explicit

This adds an option to list a specific config section with its values through the cli.
e.g for core: `airflow config list --section core`
Copy link
Contributor

@dstandish dstandish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree, i like the keyword. in past, positional args have painted us into a corner.

@uranusjr uranusjr merged commit 84a5faf into apache:main Dec 15, 2022
@uranusjr uranusjr deleted the list-section branch December 15, 2022 07:28
@pierrejeambrun pierrejeambrun added this to the Airflow 2.6.0 milestone Jan 9, 2023
@pierrejeambrun pierrejeambrun added the type:new-feature Changelog: New Features label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI type:new-feature Changelog: New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants