Skip to content

Commit

Permalink
Fix preparing rc candidates for providers (apache#36465)
Browse files Browse the repository at this point in the history
The last auto-upgrade RC implementd in apache#36441 had a bug - it was bumping
rc even for providers that have been already released. This change fixes
it - it skips packages that already have "final" tag present in the
repo. It also explicitely calls "Apply template update" as optional
step - only needed in case we modify templates and want to update
automatically generated documentation with it.
  • Loading branch information
potiuk authored Dec 28, 2023
1 parent c16b421 commit a3e5a97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dev/README_RELEASE_PROVIDER_PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- [Prepare Regular Provider packages (RC)](#prepare-regular-provider-packages-rc)
- [Increasing version number](#increasing-version-number)
- [Generate release notes](#generate-release-notes)
- [Apply template updates](#apply-template-updates)
- [(Optional) Apply template updates](#optional-apply-template-updates)
- [Open PR with suggested version releases](#open-pr-with-suggested-version-releases)
- [Build provider packages for SVN apache upload](#build-provider-packages-for-svn-apache-upload)
- [Build and sign the source and convenience packages](#build-and-sign-the-source-and-convenience-packages)
Expand Down Expand Up @@ -262,9 +262,10 @@ breeze release-management prepare-provider-documentation --include-removed-provi
--base-branch provider-cncf-kubernetes/v4-4 cncf.kubernetes
```

## Apply template updates
## (Optional) Apply template updates

(This step can also be executed independently when needed)
This step should only be executed if we want to change template files for the providers - i.e. change
security information, commit/index/README content that is automatically generated.

Regenerate the documentation templates by running the command with
`--reapply-templates` flag to the command above. This refreshes the content of:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ def should_skip_the_package(provider_id: str, version_suffix: str) -> tuple[bool
return False, version_suffix
# version_suffix starts with "rc"
current_version = int(version_suffix[2:])
release_tag = get_latest_provider_tag(provider_id, "")
if tag_exists_for_provider(provider_id, release_tag):
get_console().print(f"[warning]The tag {release_tag} exists. Provider is released. Skipping it.[/]")
return True, ""
while True:
current_tag = get_latest_provider_tag(provider_id, f"rc{current_version}")
if tag_exists_for_provider(provider_id, current_tag):
Expand Down

0 comments on commit a3e5a97

Please sign in to comment.