-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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
Simplified configuration parsing in Apprise Connection #37202
Conversation
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 Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check Static Checks, i would recommend install pre-commit, it would save a lot of time
It would be also nice if we have tests cases that string also works as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change. It's worth to mention it in the provider release doc.
It's backward compatible. See this line:
and the test case which checks for both ways (as JSON string or as dict) config can be provided. airflow/tests/providers/apprise/hooks/test_apprise.py Lines 34 to 49 in a5025c7
|
Does airflow consumers needs to update the environment variables without escaping the double quotes? |
No, they don't have to which is why backward compatibility is there. Until now, there was only one way: $ export AIRFLOW_CONN_APPRISE_DEFAULT='{"extra": {"config": "{\"path\": \"https://hooks.slack.com/services/T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7F\", \"tags\": \"alert\"}"}}' But now, you can also set its env var like this: $ export AIRFLOW_CONN_APPRISE_DEFAULT='{"extra": {"config": {"path": "https://hooks.slack.com/services/T1JJ3T3L2/A1BRTD4JD/TIiajkdnlazkcOXrIdevi7F", "tags": "alert"}}}' It should have been like this from the start because |
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
Congrats on your first commit 🎉 |
Closes #37170
Previously
Now
No need to escape quotes in the environment variable.