Conversation
bc258b8 to
a993b0a
Compare
Detailed Code ReviewThanks for the upgrade test — the 4-phase architecture (delete → install released → upgrade → verify) is clean and the finalizer-aware teardown ordering is correct. I went through every line; here's what I found. 🔴 Issues to Fix1. Duplicated
|
| Severity | Count | Key items |
|---|---|---|
| 🔴 Fix | 4 | Duplicated CI env, duplicated CRD list, silent "" return bug, hardcoded push path |
| 🟡 DRY | 2 | Remove bytesReader, extract waitForNodeIdle |
| ⚪ Nit | 5 | ctx ordering, naming inconsistency, positional %[1]s, HTTP timeout, yq guard |
Nothing is a runtime correctness blocker today, but issue #3 (containerImage returning "") could cause a very confusing CI failure if the Deployment spec ever changes. The DRY items are worth addressing to keep the test maintainable as the operator grows.
AI-generated. Review for accuracy.
Addendum: Context from #14 — "Also manage the controller and daemonset manifests"After reading through #14, here's how the team's agreed direction reframes some of the findings above. BackgroundThe team reached consensus on matching the MCO pattern:
A key motivator (from @alicefr, the same author as this PR): the operator can control when the DaemonSet is updated — avoiding restarting daemon pods while nodes are in staging/booting phase. @cheesesashimi also noted this ties into #160 for garbage collection on operator deletion. How this reframes the reviewThe The manual delete → reinstall dance (finding #2) will eventually simplify.
The polling duplication (finding #6) will grow. Bottom lineThis PR is testing the upgrade path as it exists today (external manifest management). All findings still stand — especially #3 ( AI-generated. Review for accuracy. |
a993b0a to
c8b1246
Compare
Add variables and targets to support operator upgrade e2e testing.
RELEASED_OPERATOR_TAG and RELEASED_OPERATOR_IMG control which
released version to test against. The push-released-operator-image
target pulls the released image and pushes it to the bink registry.
deploy-bink runs this automatically when RELEASED_OPERATOR_IMG is set.
Example usage:
make deploy-bink RELEASED_OPERATOR_IMG=ghcr.io/bootc-dev/bootc-operator:v0.1.0
make e2e RUN=TestOperatorUpgrade RELEASED_OPERATOR_TAG=v0.1.0 \
RELEASED_OPERATOR_IMG=ghcr.io/bootc-dev/bootc-operator:v0.1.0 V=1
Assisted-by: AI
Signed-off-by: Alice Frosi <afrosi@redhat.com>
5e6d98a to
401a238
Compare
Set RELEASED_OPERATOR_TAG to v0.1.0 and pass the released operator image to deploy-bink and e2e targets. The upgrade test is skipped when the env vars are empty, so this is a no-op until the test file is added. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Test the upgrade path by downloading the released install.yaml, applying it to install the released operator, then re-applying the current manifests (including CRDs) on top without deleting. This verifies that CRD schema changes, RBAC updates, and deployment spec changes apply cleanly over a running operator. Register apiextensionsv1 in the e2e client scheme so the test can manage CRD resources directly. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
Move the idle-wait polling pattern into a shared testutil.WaitForNodeIdle helper and replace all 14 occurrences across both test files. Assisted-by: AI Signed-off-by: Alice Frosi <afrosi@redhat.com>
401a238 to
3d10fec
Compare
Exercise the operator upgrade path and validate the the node upgrade still works after we have upgrade the operator from the last release to the latest version
Fixes: #14