Skip to content

Comments

Adding new flags to have a sanity check before bumping version in provider-documentation#47653

Closed
poorvirohidekar wants to merge 2 commits intoapache:mainfrom
poorvirohidekar:bump-version
Closed

Adding new flags to have a sanity check before bumping version in provider-documentation#47653
poorvirohidekar wants to merge 2 commits intoapache:mainfrom
poorvirohidekar:bump-version

Conversation

@poorvirohidekar
Copy link
Contributor

@poorvirohidekar poorvirohidekar commented Mar 12, 2025

closes: #47267

This PR adds support to introduce

  1. 3 new flags --allow-already-released , --version-suffix-for-pypi, --version-suffix-for-local for the preparation of provider-documentation. This is similar to the implementation done for provider-packages to run a sanity check before bumping the version if present in
    a) local tags
    b) remote tags

  2. Also add a sanity check if the version is already present in the changelog.rst for a given provider.

Testing:

  1. To exit if the version already exists in the changelog.rst for a given provider. Simulate a scenario where we need to bump the version by running command breeze release-management prepare-provider-documentation amazon but version 5.1.0 already exists in the changelog

Screenshot 2025-03-11 at 9 05 46 PM

Screenshot 2025-03-11 at 9 06 03 PM
  1. Add a local tag for airbyte provider version -> 5.0.1 then run the breeze release management prepare-provider-documentation airbyte, since this already exists it should skip generating any documentation
Screenshot 2025-03-11 at 8 02 03 PM
  1. After step 2, run breeze release-management prepare-provider-documentation airbyte --allow-already-released
    this should allow the document creation
Screenshot 2025-03-12 at 10 58 24 AM
  1. breeze release-management prepare-provider-documentation airbyte --version-suffix-for-pypi 5.0.0

Even if an older version is given, it will pick up the version marked for release

Screenshot 2025-03-12 at 11 00 11 AM

Similarly for the command --version--suffix-for-pypi.


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

@poorvirohidekar
Copy link
Contributor Author

poorvirohidekar commented Mar 12, 2025

cc: @eladkal @potiuk @amoghrajesh

Copy link
Contributor

@bugraoz93 bugraoz93 left a comment

Choose a reason for hiding this comment

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

Could you please add test cases for these newly added flags and methods? You can find the tests under dev/breeze/tests

@poorvirohidekar
Copy link
Contributor Author

Hi can i please get a review on this PR?

Cc : @potiuk

@eladkal
Copy link
Contributor

eladkal commented Mar 25, 2025

Will review today thanks for reminder

@potiuk
Copy link
Member

potiuk commented Mar 30, 2025

That looks generally good - but should be rebased and I think some documentation in release management section possibly should be updated about it. Sorry for delay - but Airflow 3 and refactoring is eating all the time .

Comment on lines +547 to +551
if _version_exists_in_changelog(provider_id, str(v)):
get_console().print(
f"[error]Version {v} already exists in CHANGELOG. Fix manually before proceeding.[/]"
)
exit(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

This will exit the process?
If detected we should show the message and let release manager fix it, once fixed it should continue from the same place. Basically, don't exit the process just redo the command for this provider after release manager fixed the issue.
Looking for something like:

Version {v} already exists in CHANGELOG. Fix manually before proceeding.
Click Y for redo this provider after fix, S to skip this provider, Q to exist the process.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label May 16, 2025
@github-actions github-actions bot closed this May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:dev-tools stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a sanity check before bumping provider version

4 participants