Cache all rest tests tasks so long as they don't use shared clusters #48161
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.
This is a follow up to #46952 which was an attempt to enable caching on all rest integration tests. As discussed in that PR, certain QA projects that ran a set of ordered suites against a single cluster are problematic to cache because of side-effects and cluster state. There are potentially some solutions there but for now we are just going to effectively exclude those problematic projects.
This pull request removes the restriction that only tests using the
integ-testdistribution can be cached. It replaced this with a condition that any rest integration test task can be cached, so long as it targets a cluster that is not used by any other tasks. We cannot guarantee that another task using a cluster doesn't have side-effects that cause undesired behavior when caching so we just punt in those scenarios. This should still give us decent benefit, as many of ourx-packtests use the default distribution, and we can avoid running those tests in cases where we don't change production code. For example, when a commit contains only test code changes, or just documentation changes.