Skip to content

feat: add os dragonfly rollout release flag in ff interceptor#6545

Open
paulrosca-snyk wants to merge 1 commit intomainfrom
feat/add-df-os-migration-release-flag
Open

feat: add os dragonfly rollout release flag in ff interceptor#6545
paulrosca-snyk wants to merge 1 commit intomainfrom
feat/add-df-os-migration-release-flag

Conversation

@paulrosca-snyk
Copy link
Contributor

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Commit messages
    are release-note ready, emphasizing
    what was changed, not how.
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Adds the rollout-dfly-os-cli release flag to the cliv2 feature flag interceptor.

Where should the reviewer start?

How should this be manually tested?

What's the product update that needs to be communicated to CLI users?

N/A

@paulrosca-snyk paulrosca-snyk marked this pull request as ready for review February 17, 2026 10:58
@paulrosca-snyk paulrosca-snyk requested review from a team as code owners February 17, 2026 10:58
Copy link
Contributor

Choose a reason for hiding this comment

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

nitpick: maybe we can apply the rule of three here and refactor this?

@paulrosca-snyk paulrosca-snyk force-pushed the feat/add-df-os-migration-release-flag branch 2 times, most recently from 317485b to 758bd11 Compare February 17, 2026 14:06
@paulrosca-snyk paulrosca-snyk force-pushed the feat/add-df-os-migration-release-flag branch from 758bd11 to e90b9d4 Compare February 18, 2026 07:22
@snyk-pr-review-bot
Copy link

PR Reviewer Guide 🔍

🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Path Synchronization Risk 🟡 [minor]

The GetHandler function and the requestCondition regex are not perfectly synchronized. The regex in NewLegacyFeatureFlagInterceptor allows for an optional trailing slash, but the featureFlagPaths map keys are exact matches without trailing slashes. Additionally, the regex matches any path containing /cli-config/feature-flags/, whereas the map requires a /v1/ prefix. Consequently, requests that match the regex but differ in prefix or trailing slash will bypass the interceptor and fall back to the network. While this behavior is inherited from the previous implementation, the refactor to a map-based lookup is an opportunity to improve robustness by normalizing the path (e.g., trimming slashes) or ensuring the regex and map keys use a consistent base path.

configKey, ok := featureFlagPaths[req.URL.Path]
if !ok {
📚 Repository Context Analyzed

This review considered 4 relevant code sections from 4 files (average relevance: 0.97)

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

Comments