Skip to content

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

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

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 3 times, most recently from 758bd11 to e90b9d4 Compare February 18, 2026 07:22
@snyk-pr-review-bot

This comment has been minimized.

@paulrosca-snyk paulrosca-snyk force-pushed the feat/add-df-os-migration-release-flag branch from e90b9d4 to ecc6e2c Compare February 19, 2026 08:33
@snyk-pr-review-bot
Copy link

PR Reviewer Guide 🔍

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

Potential Interception Bypass 🟡 [minor]

The regex in NewLegacyFeatureFlagInterceptor allows for an optional trailing slash (/?) at the end of the feature flag path. However, the featureFlagPaths map contains keys that do not include a trailing slash. If a client makes a request with a trailing slash (e.g., /v1/cli-config/feature-flags/rollout-dfly-os-cli/), the interceptor's condition will match, but the lookup in GetHandler will fail because req.URL.Path will include the slash, causing the interceptor to return the original request without applying the intended configuration override. While this behavior is consistent with the previous switch implementation, it represents a discrepancy between the matching logic and the handling logic that could be addressed by normalizing the path (e.g., using strings.TrimSuffix(req.URL.Path, "/")) before the map lookup.

configKey, ok := featureFlagPaths[req.URL.Path]
if !ok {
	return req, nil
}
📚 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