Skip to content

Automate FBC upgrade graph flow during release workflow#1994

Open
MaxBab wants to merge 1 commit into
istio-ecosystem:mainfrom
MaxBab:automate_fbc_upgrade_graph_flow
Open

Automate FBC upgrade graph flow during release workflow#1994
MaxBab wants to merge 1 commit into
istio-ecosystem:mainfrom
MaxBab:automate_fbc_upgrade_graph_flow

Conversation

@MaxBab
Copy link
Copy Markdown
Collaborator

@MaxBab MaxBab commented Jun 3, 2026

What type of PR is this?

  • Enhancement / New Feature
  • Bug Fix
  • Refactor
  • Optimization
  • Test
  • Documentation Update

What this PR does / why we need it:

During publish of the operator to OperatorHub, "PREVIOUS_VERSION" variable is used to configure upgrade path for FBC. Currently, this variable is maintainer manually and in case of missing update to the relevant version, leads to a gate job failure.

Automate "PREVIOUS_VERSION" variable detection, based on the "VERSION" variable, which is updated as part of the release flow and based on "git tag" detection to catch the latest released version.

Which issue(s) this PR fixes:

Fixes #1982

Related Issue/PR #

Additional information:

@MaxBab MaxBab requested a review from a team as a code owner June 3, 2026 07:44
@MaxBab MaxBab requested a review from FilipB June 3, 2026 07:44
@MaxBab MaxBab changed the title Automate FBC upgrade graph flow Automate FBC upgrade graph flow during release workflow Jun 3, 2026
@MaxBab MaxBab force-pushed the automate_fbc_upgrade_graph_flow branch from 4ad2a48 to 1a2a9aa Compare June 3, 2026 07:45
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.08%. Comparing base (86719cc) to head (7b4add8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1994      +/-   ##
==========================================
- Coverage   80.41%   76.08%   -4.33%     
==========================================
  Files          51       58       +7     
  Lines        2630     3145     +515     
==========================================
+ Hits         2115     2393     +278     
- Misses        392      613     +221     
- Partials      123      139      +16     
Flag Coverage Δ
integration-tests 70.17% <ø> (-0.67%) ⬇️
unit-tests 52.11% <ø> (-0.21%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread hack/operatorhub/publish-bundle.sh Outdated
: "${PREVIOUS_VERSION:?"Missing PREVIOUS_VERSION variable"}"

# Validate PREVIOUS_VERSION is a valid semantic version
if ! validate_semantic_versioning "v${PREVIOUS_VERSION}" 2>/dev/null; then
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.

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.

Thx.
Removed.

Comment thread hack/operatorhub/publish-bundle.sh Outdated
git tag --list | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -5 >&2

# In CI, this is an error
if [ "${CI:-false}" = "true" ]; then
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.

Where do we specify if we run in CI or not?

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.

I had a logic when added that, but rethinking again, it made no sense to keep it.
Removed it.
Instead, I've slightly modified the logic here.

If the "PREVIOUS_VERSION" var is not found within the "git tag" list, the flow is aborted to prevent a release issue.

Comment thread Makefile.core.mk
#
PREVIOUS_VERSION ?= $(shell \
MAJOR=$$(echo "$(VERSION)" | cut -f1 -d'.'); \
git tag --list "$${MAJOR}.*.*" 2>/dev/null | sort -V | awk -v ver="$(VERSION)" '$$0 < ver {latest=$$0} END {print latest}')
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.

git tag --list problem with this is that users using git pull will not have all remote tags fetched and it will use local tags which are not up to date. So it will not work when running from local unless users explicitly fetch all tags. I'm not sure what is happening when running in GH action regarding tags

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.

Thanks a lot @FilipB !

You found an issue that for sure would happen.
I've added a command to fetch the git tags.
If execution of this command fails, the flow aborted.

During publish of the operator to OperatorHub, "PREVIOUS_VERSION"
variable is used to configure upgrade path for FBC.
Currently, this variable is maintainer manually and in case of missing
update to the relevant version, leads to a gate job failure.

Automate "PREVIOUS_VERSION" variable detection, based on the "VERSION"
variable, which is updated as part of the release flow and based on "git
tag" detection to catch the latest released version.

Signed-off-by: Maxim Babushkin <mbabushk@redhat.com>
@MaxBab MaxBab force-pushed the automate_fbc_upgrade_graph_flow branch from 1a2a9aa to 7b4add8 Compare June 7, 2026 16:47
@istio-testing
Copy link
Copy Markdown
Collaborator

@MaxBab: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
docs-test_sail-operator_main 7b4add8 link false /test docs-test
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automate update of previous version for the OLM upgrade graph in the FBC

3 participants