ci(capture): failure feature-flag input for OTel-Demo corpus captures - #172
Conversation
The B1 thesis bench (severity-predicate pushdown, level='ERROR')
needs a corpus with a real error band, but the demo's default
traffic emits no error logs (verified on corpus/otel-demo-v4: zero
literal ERROR texts, zero severities in 17..=20, so the merged
b1/real-corpus arm skips it). The demo ships flagd failure flags
(adFailure, paymentFailure, cartFailure, ...) that make services
emit genuine errors under load — the demo-native error source.
New workflow_dispatch input `failure_flags` (default '' = no
behavior change): space/comma-separated flagd flag names. When
set, a step patches demo/src/flagd/demo.flagd.json before
bring-up, flipping each named flag's defaultVariant to its failing
variant ("on", or "100%" for the fractional flags). Flag names
are validated against ^[A-Za-z0-9_-]+$ and against the actual
config (unknown flag fails with the available list). The enabled
flags are recorded in the diversity manifest and the release
notes, so a corpus's error provenance is auditable.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reached
More reviews will be available in 48 minutes and 47 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow now supports injecting OpenTelemetry Demo failure feature flags via a ChangesFailure Flags Feature
Possibly Related PRs
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Adds an opt-in failure_flags input to the OTel Demo corpus capture workflow so operators can force specific flagd “failure” feature flags on during capture, enabling generation of corpora with a realistic error band while keeping the default capture behavior unchanged when the input is empty.
Changes:
- Introduces a new
workflow_dispatchinputfailure_flags(string, default empty). - Adds a pre-bring-up patch step that uses
jqto flipdefaultVariantfor specified flagd flags to the failing variant. - Records
failure_flagsprovenance in the capture manifest and (when publishing) in the release notes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: fdbb140f-027f-4474-8528-18303532a1e7
📒 Files selected for processing (1)
.github/workflows/capture-otel-demo-corpus.yml
…ure_flags A whitespace/comma-only input passed the non-empty if: but applied nothing — a silently flagless five-hour capture. Parse via read -ra (no command-substitution globbing) and error when zero flags were applied. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Why
The B1 thesis bench (severity-predicate pushdown,
level='ERROR') needs a real corpus with an error band, but the OTel Demo's default traffic emits no error logs — verified oncorpus/otel-demo-v4: zero literal-"ERROR" body texts and zero severity numbers in17..=20, so the mergedb1/real-corpusarm skips it.The demo ships failure feature-flags via flagd (
adFailure,cartFailure,paymentFailure,productCatalogFailure, …) that make services emit genuine errors under load. This PR exposes them as a capture input so we can mint acorpus/otel-demo-v6with a realistic error band.What
workflow_dispatchinputfailure_flags(string, default''): space/comma-separated flagd flag names to force on for the capture. Empty input = byte-for-byte identical behavior to today — the new step isif: inputs.failure_flags != ''.demo/src/flagd/demo.flagd.jsonwithjqbefore bring-up. flagd bind-mounts./src/flagd→/etc/flagdand readsdemo.flagd.jsonfrom it (verified in the 2.2.0 compose), so patching the file pre-upis the whole injection.defaultVariantflips to the failing variant:"on"where it exists, else"100%"(the fractional flags, e.g.paymentFailureat 2.2.0, have10%..100%variants instead ofon).query-bench.yml: input arrives viaenv:(no inline${{ }}splicing), each name is validated against^[A-Za-z0-9_-]+$, and an unknown flag fails with::error::listing the flags available at that demo ref.failure_flagsis recorded in the diversity manifest and the release notes (nonewhen empty), so a corpus's error band is auditable.Flags available at demo tag 2.2.0 (
src/flagd/demo.flagd.json)adFailure,adHighCpu,adManualGc,cartFailure,emailMemoryLeak,failedReadinessProbe,imageSlowLoad,kafkaQueueProblems,llmInaccurateResponse,llmRateLimitError,loadGeneratorFloodHomepage,paymentFailure(fractional),paymentUnreachable,productCatalogFailure,recommendationCacheFailurejq sanity test (run locally against the real 2.2.0 file)
Input
failure_flags: 'adFailure,paymentFailure cartFailure'(mixed separators) yields:Unknown-flag path (
notAFlag) exits 1 with::error::flagd flag 'notAFlag' not in … ; available: adFailure, adHighCpu, ….Verification
actionlint .github/workflows/capture-otel-demo-corpus.yml— clean (exit 0)opentelemetry-democlone at 2.2.0 (happy path incl. the fractional flag, comma/space separators, unknown-flag error path)cargo test --all-features— all 77 suites green (no Rust code touched; confirms the tree is unaffected)query-bench.ymlor bench code; defaults unchanged when the input is empty🤖 Generated with Claude Code
Summary by CodeRabbit