Skip to content

fix: release job isn't respecting minor latest streams#3405

Merged
xstefank merged 1 commit into
operator-framework:mainfrom
xstefank:5.x-release-jobs
Jun 10, 2026
Merged

fix: release job isn't respecting minor latest streams#3405
xstefank merged 1 commit into
operator-framework:mainfrom
xstefank:5.x-release-jobs

Conversation

@xstefank

@xstefank xstefank commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

This is why 5.2.4 was wrongfully released from main and not from 5.2.x. I will release 5.2.5 after this PR is merged.

Fixes #3402

Copilot AI review requested due to automatic review settings June 9, 2026 09:26
@openshift-ci openshift-ci Bot requested review from csviri and metacosm June 9, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the GitHub Actions release workflow so that v5 patch releases are built from the correct maintenance branch (e.g., 5.2.x) rather than incorrectly releasing from main, which caused the 5.2.4 artifact mismatch reported in #3402.

Changes:

  • Derives the release major.minor from the release tag and compares it to main’s pom.xml version to decide whether to release from main or ${major.minor}.x.
  • Updates the v5 branch-selection logic in the release workflow to support “latest minor stream” releases correctly.

Comment thread .github/workflows/release.yml Outdated
Comment on lines +38 to +40
# getting this version from POM would require pulling the whole repo
MAIN_POM_VERSION=$(curl -s "https://raw.githubusercontent.com/${{ github.repository }}/main/pom.xml" | grep -oPm1 '(?<=<version>)[^<]+')
MAIN_MAJOR_MINOR=$(echo "$MAIN_POM_VERSION" | cut -d. -f1-2)
Comment thread .github/workflows/release.yml
Comment thread .github/workflows/release.yml
@xstefank xstefank force-pushed the 5.x-release-jobs branch from 3def2b8 to 2eb3d7f Compare June 9, 2026 11:39
@xstefank xstefank requested a review from metacosm June 9, 2026 11:41
Comment thread .github/workflows/release.yml Outdated
RELEASE_MAJOR_MINOR=$(echo "$RELEASE_VERSION" | cut -d. -f1-2)

# getting this version from POM would require pulling the whole repo
MAIN_POM_VERSION=$(curl -fsSL "https://raw.githubusercontent.com/${{ github.repository }}/main/pom.xml" | python3 -c "

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Using a python script for this is way overkill. The previous solution was better, imo. Or we could use something as simple as yq '.project.version' pom.xml

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We are not cloning the repo in this job. So this is why I opted to pull the version like this. Of course we could pull the repo.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

No need to pull the repo: you only need the POM file and run yq on it as shown above. No need for python.

Signed-off-by: xstefank <xstefank122@gmail.com>
@xstefank xstefank requested a review from metacosm June 10, 2026 07:29
@xstefank xstefank merged commit 62405a3 into operator-framework:main Jun 10, 2026
26 of 27 checks passed
@xstefank xstefank deleted the 5.x-release-jobs branch June 10, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5.2.4 artifacts contain classes not present in v5.2.4 tag

4 participants