-
Notifications
You must be signed in to change notification settings - Fork 669
Fetch Feature Flag with call to Feature Flag Gateway Api #6398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
ee6339b to
0583fce
Compare
980cd8c to
7102dbb
Compare
7102dbb to
08bcc34
Compare
08bcc34 to
70dbb05
Compare
269693b to
6d7616f
Compare
583dea5 to
e7db026
Compare
|
| } | ||
| } | ||
|
|
||
| func NewRegistryInjector(invocationCtx workflow.InvocationContext) Interceptor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: I know naming is hard, but here maybe we should focus on the functionality that is intercepted. So something like LegacyFeatureFlagInterceptor might be a clearer framing
chore: update go sum chore: correct acceptance tests chore: revert feature flag gw call and route via proxy chore: fix formattting and tap tests chore:fix unit tests chore: rename interecptor
e7db026 to
c4e7766
Compare
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Adds an interceptor for the registry call to fetch feature flag 'show-maven-build-scope' from the gaf configuration
See /cli/cliv2/internal/proxy/interceptor/registryinjector.go
Pass this feature flag to the maven plugin -> Plugin call to feature flag gateway from src/lib/snyk-test/index.js and pass flags to src/lib/plugins/get-single-plugin-result.ts where the mvn plugin is invoked with feature flag.
Where should the reviewer start?
/cli/cliv2/internal/proxy/interceptor/registryinjector.go
New Interceptor
src/lib/snyk-test/index.js
Call Feature Flag Gateway and set flag in featureFlags
src/lib/plugins/get-single-plugin-result.ts
Update to pass feature flag to maven plugin
How should this be manually tested?
Run sbom generation for org with and without the show-maven-build-scope feature flag enabled in flipt.
cli/binary-releases/snyk-macos-arm64 sbom --format cyclonedx1.6+json --debugRun sbom generation for user authenticated with group service account token. Confirm default organization is passed to feature flag call scope is generated as expected.
cli/binary-releases/snyk-macos-arm64 auth <token>Flag enabled - sbom output contains scope
Flag disabled - sbom output does not contain scope
What's the product update that needs to be communicated to CLI users?
Sbom generated output will contain maven scope information for those organizations with the 'show-maven-build-scope' feature flag enabled