-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
New breeze command to clean up previous provider artifacts #35970
New breeze command to clean up previous provider artifacts #35970
Conversation
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 looks cool.
Two things (besides static checks):
- remove old script in the same PR
- update the https://github.com/apache/airflow/blob/main/dev/README_RELEASE_PROVIDER_PACKAGES.md (and check if there are any other references to the old script)
Woops.
|
I have also updated the instructions in the required MD files. Should be good now :D |
@potiuk BTW, i do not see static checks failing in my env or here. Are they failing? |
Could be intermittent - I see that recent docker has been failing more frequently in CI (likely 24.0.7 version has some stability issue - I still want to wait for 24.0.8 that should get out any time soon because 24.0.7 has important security fixes https://docs.docker.com/engine/release-notes/24.0/#security) |
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Yeah looks like it. Sure, thanks for the update |
Nope. It's a real issue:
This is the error:
You have to make sure that This means that you cannot add 3rd-party imports as top-level imports in the command files. This also allows auto-complete to be fast, because it will not import unnecessary a lot of packages. This pre-commit failing checks that. |
Sweet explanation. Yes, I remember hitting this earlier in the past. I am pushing a fix for this. |
Unable to catch it perhaps because I have some versioning issue in my breeze today..working on fixing it :) |
It could also be that you have all |
# Check which old packages will be removed (you need Python 3.8+ and dev/requirements.txt installed) | ||
python ${AIRFLOW_REPO_ROOT}/dev/provider_packages/remove_old_releases.py --directory . | ||
breeze release-management clean-old-provider-artifacts --directory . |
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.
Now that we move to breeze command I believe the comment above of python 3.8 + dev/requirements.txt is no longer relevant ?
BTW I am not sure what is the output of this command?
For the script it was outputed a long list which was very hard to understand. If we can have friendlier output that is easy to read (maybe breakdown by provider name rather than a long mixed list) that can be very helpful!
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.
Yep. Now when the script is part of breeze it could be improved with rich / color output.
It could print Provider Name, list of found artifacts and "command to run". Something like:
- Package: apache-airflow-provider-amazon : 1 version found 8.11.0 [success]OK[/]
- Package: apache-airflow-provider-google: 2 versions fondd: 9.10.0, 9.10.1. [warning]Removing 9.10.0[/]
Running: svn rm ......
It could even use the built-in --dry-run
feature in run_command
, this way we could get rid of the --execute
flag
So rather than --execute
command, the first entry in the RELEASE_PROVIDER_PACKAGES docs could be
breeze release-management clean-old-provider-artifacts --directory . --dry-run
And only then
breeze release-management clean-old-provider-artifacts --directory .
The run_command
will automatically use --dry-run
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.
Makes sense around removal of execute flag. I will make the changes. In terms of beautifying, shall we land the major change first and then follow up PR for it?
dev/breeze/src/airflow_breeze/commands/release_management_commands.py
Outdated
Show resolved
Hide resolved
Thank you for your reviews, I will accommodate it soon. Busy with some tasks at work :/ |
@potiuk I tried the suggestion and I keep hitting this:
I am not so sure why this is happening. Any idea? |
dev/breeze/src/airflow_breeze/commands/release_management_commands.py
Outdated
Show resolved
Hide resolved
Becaasue we also need to import in the method where we use it (locally). |
Thank you for the hint. Working on it :) |
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.
the subprocess.run
should be replaced with run_command
from utils
Somehow I forgot to push the commit :/ Pushed the latest changes now. Should be ok |
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.
NIce. That looks cool :)
dev/breeze/src/airflow_breeze/commands/release_management_commands.py
Outdated
Show resolved
Hide resolved
Few nits regaring usability/parameters color-coding communication. |
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.
Nice work @amoghrajesh
Thank you. I am making the usability improvements now |
@potiuk just pushed a fix adding your comments. Compiles fine 👍🏽 |
ALMOST :) |
--------- Co-authored-by: Jarek Potiuk <jarek@potiuk.com> (cherry picked from commit 9c168b7)
Currently during every release of a provider, cleanup of the older providers was done using a script. It would much better for the release manager if this were a breeze command.
Introducing a new breeze command for the same under release commands.
Command:

Help:

Running style:
^ 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.