Skip to content

feat(tests): add cleanup target for e2e.ocp test artifacts closes #1164#1203

Merged
istio-testing merged 4 commits intoistio-ecosystem:mainfrom
rafaelvzago:OSSM-10637
Sep 10, 2025
Merged

feat(tests): add cleanup target for e2e.ocp test artifacts closes #1164#1203
istio-testing merged 4 commits intoistio-ecosystem:mainfrom
rafaelvzago:OSSM-10637

Conversation

@rafaelvzago
Copy link
Copy Markdown
Contributor

What type of PR is this?

  • Enhancement / New Feature
  • Bug Fix
  • Refactor
  • Optimization
  • Test
  • Documentation Update

What this PR does / why we need it:

This PR adds a new Makefile target test.e2e.ocp.cleanup to clean up leftover artifacts from e2e.ocp tests. The cleanup script removes cluster-level resources that may remain after running e2e tests against an OpenShift cluster, including:

  • metrics-reader-rolebinding ClusterRoleBinding
  • metrics-reader ClusterRole
  • Istio CRDs (*.istio)
  • Sail Operator CRDs (*.sail)

The cleanup script handles missing resources gracefully and follows the same patterns used by other cleanup operations in the project. This addresses the need for a systematic way to clean up test artifacts that could interfere with subsequent test runs or cluster operations.

Which issue(s) this PR fixes:

Fixes #1164

Additional information:

  • The cleanup script is placed in tests/e2e/ following the established folder structure
  • Uses kubectl commands with --ignore-not-found and || true flags for safe cleanup operations
  • The Makefile target depends on verify-kubeconfig to ensure cluster connectivity
  • Script includes proper error handling and follows the project's shell scripting patterns

This template accurately reflects the testing infrastructure enhancement that was implemented.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Sep 5, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@istio-testing
Copy link
Copy Markdown
Collaborator

Hi @rafaelvzago. Thanks for your PR.

I'm waiting for a istio-ecosystem or istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@rafaelvzago rafaelvzago marked this pull request as ready for review September 5, 2025 14:27
@rafaelvzago rafaelvzago requested a review from a team as a code owner September 5, 2025 14:27
@cam-garrison
Copy link
Copy Markdown
Collaborator

/ok-to-test

Copy link
Copy Markdown
Contributor

@sridhargaddam sridhargaddam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rafaelvzago, some minor comments.

Closes istio-ecosystem#1164

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>
Copy link
Copy Markdown
Contributor

@sridhargaddam sridhargaddam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rafaelvzago

@istio-testing istio-testing merged commit a38460c into istio-ecosystem:main Sep 10, 2025
12 checks passed
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 10, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 11, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 11, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 11, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 11, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 11, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 12, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 12, 2025
* upstream/main:
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 12, 2025
* upstream/main:
  Remove explicit labelling for multicluster network (istio-ecosystem#1216)
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 12, 2025
* upstream/main:
  Remove explicit labelling for multicluster network (istio-ecosystem#1216)
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 12, 2025
* upstream/main:
  Fix junit report generation (istio-ecosystem#1218)
  Remove explicit labelling for multicluster network (istio-ecosystem#1216)
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Sep 15, 2025
* upstream/main:
  Fix junit report generation (istio-ecosystem#1218)
  Remove explicit labelling for multicluster network (istio-ecosystem#1216)
  feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164 (istio-ecosystem#1203)
  Add OCP-specific flag to CreateRemoteSecret (istio-ecosystem#1213)
  Allow set multicluster flag with env (istio-ecosystem#1212)
  Fix macOS compatibility for update_deps.sh and update macOS specific dev docs (istio-ecosystem#1137)
  Add commit validation GH action (istio-ecosystem#1188)
  Automator: Update dependencies in istio-ecosystem/sail-operator@main (istio-ecosystem#1208)
@FilipB
Copy link
Copy Markdown
Collaborator

FilipB commented Nov 27, 2025

/cherrypick release-1.27

@istio-testing
Copy link
Copy Markdown
Collaborator

@FilipB: new pull request created: #1398

Details

In response to this:

/cherrypick release-1.27

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.

@FilipB
Copy link
Copy Markdown
Collaborator

FilipB commented Nov 27, 2025

/cherrypick release-1.26

@istio-testing
Copy link
Copy Markdown
Collaborator

@FilipB: new pull request created: #1399

Details

In response to this:

/cherrypick release-1.26

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.

@FilipB
Copy link
Copy Markdown
Collaborator

FilipB commented Nov 27, 2025

/cherrypick release-1.28

@istio-testing
Copy link
Copy Markdown
Collaborator

@FilipB: #1203 failed to apply on top of branch "release-1.28":

Applying: feat(tests): add cleanup target for e2e.ocp test artifacts closes #1164
Using index info to reconstruct a base tree...
M	Makefile.core.mk
Falling back to patching base and 3-way merge...
CONFLICT (add/add): Merge conflict in tests/e2e/cleanup-ocp.sh
Auto-merging tests/e2e/cleanup-ocp.sh
Auto-merging Makefile.core.mk
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 feat(tests): add cleanup target for e2e.ocp test artifacts closes #1164

Details

In response to this:

/cherrypick release-1.28

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.

@istio-testing
Copy link
Copy Markdown
Collaborator

@FilipB: new issue created for failed cherrypick: #1400

Details

In response to this:

/cherrypick release-1.28

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.

@FilipB
Copy link
Copy Markdown
Collaborator

FilipB commented Nov 27, 2025

/cherrypick release-1.0

@istio-testing
Copy link
Copy Markdown
Collaborator

@FilipB: new pull request created: #1401

Details

In response to this:

/cherrypick release-1.0

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.

dgn pushed a commit to dgn/sail-operator that referenced this pull request Mar 17, 2026
…io-ecosystem#1164 (istio-ecosystem#1203)

* feat(tests): add cleanup target for e2e.ocp test artifacts closes istio-ecosystem#1164

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>

* feat(tests): enhance cleanup script to follow official undeploy process closes istio-ecosystem#1164

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>

* feat(tests): enhance cleanup script to follow official undeploy process closes istio-ecosystem#1164

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>

* feat(e2e): add OLM uninstallation support to cleanup script

Closes istio-ecosystem#1164

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>

---------

Signed-off-by: Rafael Zago <rafaelvzago@gmail.com>
Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] E2E cleanup script for OCP testing

5 participants