chore:[CSENG-68] add ffg call #6398
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Adds a call to feature flag gateway api to fetch the 'show-maven-build-scope'
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.
Added Feature Flag Gateway server to cliv2 in order to fetch the feature flag for otel.
Where should the reviewer start?
src/lib/feature-flag-gateway/index.ts
Implement post call to feature flag gateway and added wrapper
Company id is fetched from config (getOrganizationId) and not from options.
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
cliv2/cmd/cliv2/main.go
Added call to feature flag gateway service to fetch the 'show-maven-build-scope' flag
cliv2/internal/feature-flag-gateway
Implement service to call the feature flag gateway evaluate api
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