-
Notifications
You must be signed in to change notification settings - Fork 724
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
CMP-2859: Resolve failing Image-stream-sets-schedule #12895
base: master
Are you sure you want to change the base?
CMP-2859: Resolve failing Image-stream-sets-schedule #12895
Conversation
…ator and ClusterVersion Signed-off-by: Kaushik Talathi <kaushik.talathi1@ibm.com>
Hi @KaushikOP. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/jira-refresh |
@@ -32,17 +32,17 @@ references: | |||
srg: SRG-APP-000456-CTR-001125 | |||
|
|||
{{% set api_path = '/apis/image.openshift.io/v1/imagestreams' %}} | |||
{{% set jqfilter = '[.items[] | .spec.tags[]? | select(.from.kind != "ImageStreamTag") | (.importPolicy.scheduled != null and .importPolicy.scheduled != false)] | all' %}} | |||
{{% set jqfilter = '[.items[] | select( .metadata.ownerReferences? // [] | all(.kind != "ClusterVersion")) | select(.metadata.labels[]? | select("samples.operator.openshift.io/managed: true") | not) | select(.spec.tags[]?.from.kind != "ImageStreamTag" and (.importPolicy.scheduled != null or .importPolicy.scheduled != false))] | any' %}} |
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.
- Gather all ImageStreams -
.items[]
- Select only those not managed by
ClusterVersion
-select( .metadata.ownerReferences? // [] | all(.kind != "ClusterVersion"))
ClusterVersion
implies on upgrade that these ImageStream entries are upgraded
- From those that remain, check if it's managed by the Samples Operator, if so ignore those -
select(.metadata.labels[]? | select("samples.operator.openshift.io/managed: true") | not)
- Check the Remaining ones are not tags -
select(.spec.tags[]?.from.kind != "ImageStreamTag" and
(partial query here)
- e.g.
ImageStreamTag
latest points tov1.2.3
- The ones that remain from that check to see if scheduled is false or not set -
(.importPolicy.scheduled != null or .importPolicy.scheduled != false))] | any' %}}
If any fail the last condition it returns false for the query.
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.
Thanks a bunch for the breakdown and explanation of the jq filter.
/retest-required |
@prb112: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/jira-refresh |
/ok-to-test |
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.
/LGTM
But could you also update the expected results so that our CI doesn't flag this change?
Change the following lines from FAIL
to PASS
.
$ grep -rA2 "imagestream-sets-schedule" tests/assertions/ocp4/
tests/assertions/ocp4/ocp4-stig-4.12.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.12.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.12.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.13.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.13.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.13.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.14.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.14.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.14.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.15.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.15.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.15.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.16.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.16.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.16.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.17.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.17.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.17.yml- result_after_remediation: FAIL
--
tests/assertions/ocp4/ocp4-stig-4.18.yml: e2e-stig-imagestream-sets-schedule:
tests/assertions/ocp4/ocp4-stig-4.18.yml- default_result: FAIL
tests/assertions/ocp4/ocp4-stig-4.18.yml- result_after_remediation: FAIL
$ cat ./applications/openshift/registry/imagestream_sets_schedule/tests/ocp4/e2e.yml
---
default_result: FAIL
Thanks @yuumasato I'll leave a message with Kaushik letting him know |
Signed-off-by: Kaushik Talathi <kaushik.talathi1@ibm.com>
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.
@KaushikOP tests/assertions/ocp4/ocp4-stig-4.18.yml
was left out of the assertion update.
Please update it as well.
/test 4.17-e2e-aws-ocp4-stig |
Signed-off-by: Kaushik Talathi <kaushik.talathi1@ibm.com>
/retest-required |
Hi @yuumasato I have made the changes. Please re-review. |
/retest-required |
/test 4.12-e2e-aws-ocp4-stig |
Grabbed the imagestreams from the must-gather. https://gist.github.com/prb112/06768521d08ecf0eba49476252580e8e Will ask @KaushikOP to test the |
Analyzed the gist / imagestreams - it should have passed. Perhaps a retest? |
/retest-required |
1 similar comment
/retest-required |
@KaushikOP: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description:
Rationale:
fixes failing rule
Fixes #CMP-2859
Review Hints: