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

Allow 'airflow variables export' to print to stdout #33279

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

uranusjr
Copy link
Member

This is a continuation to #31854.

Similar to connections, this change allows the CLI to export the variables to stdout using airflow variables export -.

There are a couple of change aside from the content in the original PR:

  1. The is_stdout function has been extracted and improved.
  2. The JSON-dumping code is changed to avoid creating an intermediate string in memory.

Close #31851.

@uranusjr uranusjr force-pushed the variable-stdout branch 2 times, most recently from 476257d to 619752b Compare August 10, 2023 10:09
@eladkal eladkal added the type:improvement Changelog: Improvements label Aug 10, 2023
@eladkal eladkal added this to the Airflow 2.8.0 milestone Aug 10, 2023
Copy link
Contributor

@vijayasarathib vijayasarathib left a comment

Choose a reason for hiding this comment

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

Has the documentation been updated to include this new option for exporting variables? Clear documentation will assist users in utilizing this feature effectively.

@potiuk
Copy link
Member

potiuk commented Aug 10, 2023

Has the documentation been updated to include this new option for exporting variables? Clear documentation will assist users in utilizing this feature effectively

Have you checked the help description? Is this is enough or you think about another documentation ? Or maybe you are simply not aware that the help description is automatically reflected in the documentatotion @vijayasarathib ?

vedantlodha and others added 3 commits August 11, 2023 16:03
Similar to connections, it is now possible to use '-' to print to
stdout.

Also includes some refactoring to extract common logic to 'airflow
connections export' and improve the code quality.
@uranusjr uranusjr merged commit 09d478e into apache:main Aug 11, 2023
42 checks passed
@uranusjr uranusjr deleted the variable-stdout branch August 11, 2023 09:02
ferruzzi pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI type:improvement Changelog: Improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow variables to be printed to STDOUT
5 participants