Skip to content

fix(approve-installplan): cache InstallPlan query and retry on version mismatch - #101

Merged
cjeanner merged 1 commit into
openstack-k8s-operators:mainfrom
oliashish:fix/installplan-cache-and-retry
Aug 18, 2026
Merged

fix(approve-installplan): cache InstallPlan query and retry on version mismatch#101
cjeanner merged 1 commit into
openstack-k8s-operators:mainfrom
oliashish:fix/installplan-cache-and-retry

Conversation

@oliashish

@oliashish oliashish commented Aug 18, 2026

Copy link
Copy Markdown
Contributor
  • Fetch InstallPlans once per iteration and run all jq filters against that
    cached snapshot: fewer API calls and one consistent view per iteration.
  • Don't exit on a newer-than-pinned plan (OLM catalog resolution is eventually
    consistent); warn and retry, failing only once retries are exhausted. The
    version gate is preserved: a wrong-version plan is never approved.

Tested them locally by

  • Dry ran the actual approval logic against the live operators but blocked the write step, and confirmed it correctly refuses to approve a version that doesn't match the pinned one.
  • Also tested in a throwaway namespace by setting t up a fake operator waiting for approval, then let the real script run for real and it found the right install plan, approved it, and the operator installed successfully end to end.

Jira: OSPRH-33123, OSPRH-33124

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com

@oliashish
oliashish requested review from aharivel and cjeanner August 18, 2026 11:53

@cjeanner cjeanner left a comment

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.

Looks OK. There were some testing on the side, since we don't have CI capabilities to test that specific kind of changes. Reports were green.

- Fetch InstallPlans once per iteration and run all jq filters against that
  cached snapshot: fewer API calls and one consistent view per iteration.
- Don't exit on a newer-than-pinned plan (OLM catalog resolution is eventually
  consistent); warn and retry, failing only once retries are exhausted. The
  version gate is preserved: a wrong-version plan is never approved.

Jira: OSPRH-33123, OSPRH-33124

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@oliashish
oliashish force-pushed the fix/installplan-cache-and-retry branch from 18b5c59 to 45cb3a2 Compare August 18, 2026 15:15
@cjeanner
cjeanner merged commit 9b141a9 into openstack-k8s-operators:main Aug 18, 2026
2 checks passed
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.

2 participants