ROX-33943: Replace createStructuredSelector in PolicyPage#19805
Open
pedrottimark wants to merge 2 commits intomasterfrom
Open
ROX-33943: Replace createStructuredSelector in PolicyPage#19805pedrottimark wants to merge 2 commits intomasterfrom
pedrottimark wants to merge 2 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19805 +/- ##
=======================================
Coverage 49.60% 49.60%
=======================================
Files 2763 2763
Lines 208271 208271
=======================================
+ Hits 103317 103319 +2
+ Misses 97288 97287 -1
+ Partials 7666 7665 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ae313bc to
2f3499c
Compare
Contributor
🚀 Build Images ReadyImages are ready for commit 2f3499c. To use with deploy scripts: export MAIN_IMAGE_TAG=4.11.x-555-g2f3499c78c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Follow up lint rule with
ignoresarray in #19581Objectives
When we delete deprecated container folders, we intend to delete obsolete dependencies.
Create policy from risk search filter without Redux is prototype for create scheduled report from image vulnerabilities search filter (which does not require a request, by the way).
Problem
If non-deprecated files still depend on the dependencies (pardon pun) any additional unplanned technical investment might block deletion, because the effort will compete with other unplanned tasks.
Analysis
This is the only occurrence of
policiesandformMessagesreducers.Form messages for errors do not appear, whether because of
navigatecall or just plain broken.Solution
Edit PolicyPage.tsx file.
generatePolicyFromSearchand adapt business logic.severity: nullbecause so default severity is Low like ordinary create action.Add GeneratedPolicyErrorModal.tsx file.
Edit CreatePolicyFromSearch.tsx file.
?action=generatein query string.Delete obsolete reducer files.
User-facing documentation
Testing and quality
Automated testing
How I validated my change
npm run tscin ui/apps/platform folder.npm run lint:fast-devin ui/apps/platform folder.npm run startin ui/apps/platform folder with staging demo as centralManual testing of baseline
Visit /main/risk select Cluster staging-secured-cluster and Namespace stackrox in search filter, and then click Create policy
Request first:
POST /v1/policies/from-search
searchParams: "Cluster:staging-secured-cluster+Namespace:stackrox+Orchestrator Component:false"Push browser history second:
/main/policy-management/policies?action=generateAdvance to Scope step of policy wizard
Before changes, see Inclusion scope card.

Manual testing of replaced
Visit /main/risk select Cluster staging-secured-cluster and Namespace stackrox and also Vulnerability State observed (which is irrelevant for policies) in search filter, and then click Create policy
Push browser history first with search filter:
/main/policy-management/policies?action=generate&s[Cluster]=staging-secured-cluster&s[Namespace]=stackrox&s[Vulnerability%20State]=OBSERVEDRequest second:
POST /v1/policies/from-search
Payload
searchParams: "Cluster:staging-secured-cluster+Namespace:stackrox+Vulnerability State:OBSERVED"Data
alteredSearchTerms: ["Vulnerability State"]hasNestedFields: falseSee modal if search filter has errors.

Advance to Scope step of policy wizard
After changes, see Inclusion scope card.
Advance to Review step of policy wizard
