Skip to content

feat(bundle-automation): accept cel string field in create/set body - #294

Draft
cvkramer wants to merge 1 commit into
mainfrom
auto/global-w291.2
Draft

cvkramer wants to merge 1 commit into
mainfrom
auto/global-w291.2

Conversation

@cvkramer

Copy link
Copy Markdown

What

Adds a cel string field to access-profiles bundle-automation create/set body validation, relaxing the entitlements-or-cel conditions check so a CEL-only body is accepted.

Why

bundle-automation set --body-file rejected the "cel" field with unsupported bundle automation field "cel", even though the underlying API (POST /api/v1/catalogs/{id}/bundle_automation) already accepts CEL via conditions.cel. The help text only listed createTasks, disableCircuitBreaker, enabled, and entitlements as supported body fields. 22 raw c1i api calls against this endpoint were observed in one day as a workaround.

Bead: global-w291.2

Verification

  • go build ./..., go vet ./... — clean
  • go test ./... — all packages pass (10331 tests; 1 pre-existing unrelated failure in tokensource, not touched by this change)
  • golangci-lint run --timeout=3m ./... — 0 issues
  • Added tests covering the new cel field and the relaxed entitlements-or-cel check
  • Rebased onto current origin/main (already up to date; no conflicts) and re-ran the full check before pushing

Opened from Charles's local c1i issue triage.

Add "cel" to the allowed body fields in validateBundleAutomationBody.
Validate that the value is a JSON string when present. Relax the
entitlements-required check: either entitlements or cel now satisfies
the conditions requirement. Update Long help text, README, and CHANGELOG.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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