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

Standardise output of "airflow connections export" to those of "airflow variables export" and "airflow users export" #34640

Merged

Conversation

Jayden-Chiu
Copy link
Contributor

@Jayden-Chiu Jayden-Chiu commented Sep 27, 2023

Output should now be standardized to something similar to users and variables

7 connections successfully exported to /opt/airflow/dags/connections.json.

Closes: #34232


^ 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.

@boring-cyborg
Copy link

boring-cyborg bot commented Sep 27, 2023

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@eladkal eladkal added this to the Airflow 2.7.2 milestone Sep 27, 2023
@eladkal eladkal added the type:misc/internal Changelog: Misc changes that should appear in change log label Sep 27, 2023
@@ -197,9 +197,9 @@ def connections_export(args):
f.write(msg)

if file_is_stdout:
print("\nConnections successfully exported.", file=sys.stderr)
print(f"\n{len(connections)} connections successfully exported.", file=sys.stderr)
Copy link
Contributor

Choose a reason for hiding this comment

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

@Jayden-Chiu Not a blocker, How can we ensure that the output of export connection export variable and users export doesn't mismatch by any further changes in the codebase?

Can we add a single function to prepare a similar output?

Copy link
Member

Choose a reason for hiding this comment

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

@utkarsharma2 good point, could you open a new PR to do that?

Copy link
Contributor

Choose a reason for hiding this comment

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

@hussein-awala Sure, I'll raise that.

@@ -197,9 +197,9 @@ def connections_export(args):
f.write(msg)

if file_is_stdout:
print("\nConnections successfully exported.", file=sys.stderr)
print(f"\n{len(connections)} connections successfully exported.", file=sys.stderr)
Copy link
Member

Choose a reason for hiding this comment

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

@utkarsharma2 good point, could you open a new PR to do that?

@hussein-awala hussein-awala merged commit a5f5e2f into apache:main Sep 27, 2023
43 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Sep 27, 2023

Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions.

@hussein-awala
Copy link
Member

Congrats on your first commit 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:CLI type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
6 participants