Skip to content

🌱 add COS referenced-content PreconditionsNotMet e2e scenarios - #3025

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:cos-secret-ref-content-validation
Oct 19, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
perdasilva:cos-secret-ref-content-validation

Conversation

@perdasilva

@perdasilva perdasilva commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds two e2e scenarios to revision.feature covering the referenced-Secret content-validation preconditions that were not yet exercised. revision.feature already covers the mutable-Secret and Secret-content-change preconditions; these fill the remaining content-resolution gaps:

  1. Missing key — a ref pointing to a key not present in the Secret → Ready=False / PreconditionsNotMet with Referenced content is invalid: resolving ref in phase "resources": key "…" not found in Secret …. Fix the Secret content.
  2. Malformed content — a ref whose value is not valid JSON → Ready=False / PreconditionsNotMet with message including Referenced content is invalid: resolving ref in phase "resources": unmarshaling object from key "…" in Secret …

Both use the pre-existing step definitions (ClusterObjectSet is applied, reports Ready as False with Reason … and Message[:/ includes:], resource is applied); no step code changes are needed.

Testing

Ran both scenarios against the object-controller built from this branch's base on a local experimental KIND cluster:

2 scenarios (2 passed)
10 steps (10 passed)

Notes

  • Experimental-only; the feature is tagged @BoxcutterRuntime.
  • The dry-run preflight and recovery scenarios (A pre-apply check rejected …) will land in a separate cos_preflight.feature PR.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added end-to-end coverage for missing Secret keys and malformed Secret JSON, verifying that invalid references are reported as unmet preconditions.

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 1e3057d
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6ad6308dfd977b9097efb3c4
😎 Deploy Preview https://deploy-preview-3025--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@openshift-ci
openshift-ci Bot requested review from dtfranz and grokspawn October 19, 2026 08:59
@perdasilva

Copy link
Copy Markdown
Contributor Author

/hold until group PR merges

@openshift-ci openshift-ci Bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 95539dcc-1b23-49a9-ad6e-1b61f9ea8667
📥 Commits

Reviewing files that changed from the base of the PR and between 7522a82 and 1e3057d.

📒 Files selected for processing: 1
  • test/e2e/features/revision.feature

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 7 remain after this review.

📝 Walkthrough

Two end-to-end scenarios check how a ClusterObjectSet reports a missing referenced Secret key and a Secret value that contains malformed JSON.

Changes: Secret Reference Validation

Layer / File(s) Summary
Invalid Secret reference scenarios
test/e2e/features/revision.feature
The scenarios expect PreconditionsNotMet when a referenced Secret lacks the configured key or contains malformed JSON. The expected error identifies the Secret reference issue and the relevant phase.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 1e305

The PR adds coverage for two invalid Secret-reference cases; no concrete merge-blocking risk is identified.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description explains the two added scenarios, expected outcomes, testing performed, and scope. It omits the Reviewer Checklist from the template, but the main required change information is comple…
Title check Passed The title is concise, specific, and accurately identifies the addition of referenced-content PreconditionsNotMet end-to-end scenarios.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the two added scenarios, expected outcomes, testing performed, and scope. It omits the Reviewer Checklist from the template, but the main required change information is complete.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

Cover the two referenced-Secret content-validation preconditions that
were not yet exercised in revision.feature:

- a ref pointing to a key that is not present in the Secret, and
- a ref whose content is not valid JSON.

Both assert Ready=False/PreconditionsNotMet with the controller's
"Referenced content is invalid: ..." message.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
@perdasilva
perdasilva force-pushed the cos-secret-ref-content-validation branch from 7522a82 to 1e3057d Compare October 19, 2026 15:00
@perdasilva

Copy link
Copy Markdown
Contributor Author

/unhold

@openshift-ci openshift-ci Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 19, 2026

@fao89 fao89 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.

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Oct 19, 2026

@fgiudici fgiudici left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@tmshort

tmshort commented Oct 19, 2026

Copy link
Copy Markdown
Member

/approve

@openshift-ci

openshift-ci Bot commented Oct 19, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit b0dd116 into operator-framework:main Oct 19, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants