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

Fix output for airflow providers get command #30978

Merged
merged 1 commit into from
May 1, 2023

Conversation

pankajastro
Copy link
Member

If I use the airflow provider get <provider-name> -o json/yaml CLI command it does not respect -o option. It works perfectly fine when I pass the --full option also in the above command. The issue is currently if the --full option is not provided we use standard statement print to print results and not the custom AirflowConsole. In this PR I'm replacing print with AirflowConsole().print_as
Before
Screenshot 2023-05-01 at 3 07 15 AM

After
Screenshot 2023-05-01 at 3 03 27 AM


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@pankajastro pankajastro changed the title Fix airflow providers get command output Fix output for airflow providers get command Apr 30, 2023
If I use the `airflow provider get <provider-name> -o json/yaml` CLI command
it does not respect `-o` option.
It works perfectly fine when I pass the `--full` option also in the above command.
The issue is currently if the `--full` option is not provided we
use standard statement print to print results and not the custom AirflowConsole.
In this PR I'm replacing print with `AirflowConsole().print_as`
@pankajastro pankajastro marked this pull request as ready for review May 1, 2023 07:30
@potiuk
Copy link
Member

potiuk commented May 1, 2023

NIce!

@potiuk potiuk merged commit 23b5b31 into apache:main May 1, 2023
42 checks passed
@pankajastro pankajastro deleted the fix_provider_get_cmd branch May 1, 2023 16:09
@ephraimbuddy ephraimbuddy added this to the Airflow 2.6.1 milestone May 8, 2023
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label May 8, 2023
ephraimbuddy pushed a commit that referenced this pull request May 8, 2023
If I use the `airflow provider get <provider-name> -o json/yaml` CLI command
it does not respect `-o` option.
It works perfectly fine when I pass the `--full` option also in the above command.
The issue is currently if the `--full` option is not provided we
use standard statement print to print results and not the custom AirflowConsole.
In this PR I'm replacing print with `AirflowConsole().print_as`

(cherry picked from commit 23b5b31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants