Skip to content
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

test(scorecard): preserve CR when retrying on conflict (backport #912) #913

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 10, 2024

Welcome to Cryostat! 👋

Before contributing, make sure you have:

  • Read the contributing guidelines
  • Linked a relevant issue which this PR resolves
  • Linked any other relevant issues, PR's, or documentation, if any
  • Resolved all conflicts, if any
  • Rebased your branch PR on top of the latest upstream main branch
  • Attached at least one of the following labels to the PR: [chore, ci, docs, feat, fix, test]
  • Signed all commits: git commit -S -m "YOUR_COMMIT_MESSAGE"

Fixes: #841

Description of the change:

  • Avoids overwriting the cr variable when calling Update. If this fails due to a conflict, the update will be silently retried, but cr will now be nil.
  • Moves the update and retry to a helper function for convenience

Motivation for the change:

  • Fixes a sporadic scorecard test failure encountered downstream

How to manually test:

  1. make test-scorecard-local SCORECARD_TEST_SELECTION=cryostat-config-change
  2. In order to reliably reproduce the update conflict, you can use a patch similar to the one listed here: [Bug] Scorecard test can fail with "failed to get Cryostat CR: resource name may not be empty" #841 (comment)

This is an automatic backport of pull request #912 done by [Mergify](https://mergify.com).

* test(scorecard): preserve CR when retrying on conflict

* Don't initialize return value

(cherry picked from commit e10f18d)
@mergify mergify bot assigned ebaron Jul 10, 2024
@ebaron ebaron added the test label Jul 10, 2024
@ebaron ebaron merged commit 7c59c63 into cryostat-v3.0 Jul 10, 2024
5 checks passed
@mergify mergify bot deleted the mergify/bp/cryostat-v3.0/pr-912 branch July 10, 2024 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant