-
Notifications
You must be signed in to change notification settings - Fork 70
🌱 Fix experimental-to-experimental upgrade e2e to deploy baseline from main #2519
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||||||
| #!/usr/bin/env bash | ||||||||||||||
perdasilva marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
| set -euo pipefail | ||||||||||||||
|
|
||||||||||||||
| # This script builds and deploys operator-controller from the main branch | ||||||||||||||
| # as the baseline for experimental-to-experimental upgrade tests. | ||||||||||||||
| # Instead of upgrading from the latest release, this allows comparing | ||||||||||||||
| # main -> PR for experimental features that may not exist in any release yet. | ||||||||||||||
| # | ||||||||||||||
| # Required environment variables (exported by Makefile): | ||||||||||||||
| # KIND_CLUSTER_NAME - name of the kind cluster | ||||||||||||||
| # OPCON_IMAGE_REPO - operator-controller image repository | ||||||||||||||
| # CATD_IMAGE_REPO - catalogd image repository | ||||||||||||||
|
|
||||||||||||||
| MAIN_TAG=main | ||||||||||||||
|
|
||||||||||||||
|
||||||||||||||
| # Validate required environment variables | |
| : "${KIND_CLUSTER_NAME:?Environment variable KIND_CLUSTER_NAME must be set}" | |
| : "${OPCON_IMAGE_REPO:?Environment variable OPCON_IMAGE_REPO must be set}" | |
| : "${CATD_IMAGE_REPO:?Environment variable CATD_IMAGE_REPO must be set}" |
Copilot
AI
Feb 19, 2026
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 cleanup function uses 'git checkout -f' which will discard any uncommitted changes in the working directory when returning to the original ref. This could cause unexpected data loss if the script is run in a dirty working directory. Consider checking for uncommitted changes before proceeding, or at minimum document this behavior in the script comments so users are aware of this side effect.
| CURRENT_REF=$(git rev-parse HEAD) | |
| CURRENT_REF=$(git rev-parse HEAD) | |
| # NOTE: The cleanup step uses 'git checkout -f' to ensure we always return | |
| # to the original ref. This will discard any uncommitted changes in the | |
| # working directory when the script exits. |
Copilot
AI
Feb 19, 2026
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.
Consider using the Makefile's EXPERIMENTAL_MANIFEST variable instead of hardcoding "manifests/experimental.yaml". While both currently resolve to the same path, using the variable would ensure consistency with other parts of the codebase and make the script more resilient to future changes in manifest organization. The variable would need to be exported from the Makefile or passed as an argument.
| SOURCE_MANIFEST=manifests/experimental.yaml \ | |
| SOURCE_MANIFEST="${EXPERIMENTAL_MANIFEST:-manifests/experimental.yaml}" \ |
Copilot
AI
Feb 19, 2026
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.
Consider using the Makefile's EXPERIMENTAL_RELEASE_MANIFEST variable instead of hardcoding "operator-controller-experimental.yaml". While both currently resolve to the same filename, using the variable would ensure consistency with other parts of the codebase and make the script more resilient to future changes in manifest naming conventions. The variable would need to be exported from the Makefile or passed as an argument.
| MANIFEST=operator-controller-experimental.yaml \ | |
| MANIFEST="${EXPERIMENTAL_RELEASE_MANIFEST:-operator-controller-experimental.yaml}" \ |
Uh oh!
There was an error while loading. Please reload this page.