[release/v0.7] Prevent creating Rancher PR if RC not yet in rancher/charts #855
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.
Backport
Backport of #851
You can make changes to this PR with the following command:
Issue:
If a PR is made to bump webhook in rancher/rancher but that version is not yet in rancher/charts, then the CI will be very broken (unless quite lucky). Here's why.
The CI in rancher/rancher runs the
build-server
job which builds the docker images and publishes them as artifact.Then, the
test
(for integration test) job downloads those same artifacts and loads them into docker. The docker image for rancher contains a local copy of rancher/charts at the time they were built. Afaik, this is used as a cache to speed things up before the charts controllers sync with GH. When integration-test fails, we re-run only thattest
job, so it keeps using the previously built images.We can verify that the previously built images contain an older version of dev-v2.11 charts branch like this:
We can see that this index.yaml file indeed doesn't contain
-rc.11
but-rc.10
. In majority of cases, the charts sync wouldn't happen fast enough (could be GH issue or something else?) and the CI kept trying to install-rc.11
with an older version ofindex.yaml
until the CI times out (5 minutes) due to webhook not being deployed.Solution
Until we find something better (if any), we'll fail the automation for bumping webhook in rancher/rancher if the RC is not found in rancher/charts. This should prevent most cases from happening.