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
Jobs using
with-clean-slate-deployments
would fail if there was no VM for the branch. This has caused preview environment deployments to fail on main as we don't have a VM-based preview environment there yet.This PR adds
--ignore-not-found=true
so thatkubectl delete
will succeed if the resource doesn't exist. That's the behaviour we want in this case.Related Issue(s)
Fixes #9678
How to test
I could reproduce this by deleting the entire preview-* namespace for my branch.
And then trigger a new job
It failed with the same error as described in the original issue, see here.
I ran a job with the code on this branch and it succeeded, see here.
I also triggered a 2nd☺️
with-clean-slate-deployment
job (link) to verify it still performs the deletion when the VM does existRelease Notes
Documentation
N/A