feat(feature-flags): support extended SemVer fixtures - #2401
Conversation
📚 Documentation Check Results📦
|
🔒 Cargo Deny Results📦
|
BenchmarksComparisonCandidateCandidate benchmark detailsBaselineBaseline benchmark details |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 4b4c517 | Docs | View more details | Give us feedback! |
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b4c5178fa
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| } => { | ||
| let attr_str = attribute?.as_str()?; | ||
| let attr_version = semver::Version::parse(attr_str.as_ref()).ok()?; | ||
| let attr_version = ExtendedVersion::parse(attr_str.as_ref())?; |
There was a problem hiding this comment.
Avoid heap allocations for every SemVer evaluation
For every SEMVER_* condition evaluation, parsing the subject attribute now allocates an owned Box<str>, a boxed component vector, and a normalized String, although the temporary attribute version is discarded immediately afterward. This turns a previously allocation-free common x.y.z parse into repeated heap churn on the request-time flag-evaluation path; use borrowed suffixes and a fixed-size component array, retaining the original owned string only for configuration comparands that must round-trip.
AGENTS.md reference: AGENTS.md:L70-L76
Useful? React with 👍 / 👎.
|
Closing in favor of a PR that doesn't include regex changes |
Summary
ffe-system-test-datato d9b05ae23d861228e210b9f4b7b1e5a926f88878.Validation
cargo nextest run -p libdd-ffe(32 passed)cargo nextest run -p libdd-ffe-test-suitecargo check -p libdd-ffe, format check, clippy, andgit diff --check.