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

Differentiate scheduled 2.x job cache from main cache #906

Merged
merged 1 commit into from
Jan 25, 2022
Merged

Conversation

elefeint
Copy link
Contributor

I think one of the reasons the flakes got more frequent is that the 2.x unit/integration tests run first, and set up the older set of artifacts. Then all the new code (main branch and PRs off of it) has to re-download Spring Boot 2.6-related artifacts on the fly.

This PR makes 2.x unit and integration tests use different caches.

After this if, once we start backporting changes to 2.x, we notice that 2.x flakes more than main, it will be confirmation of this hypothesis.

@sonarcloud
Copy link

sonarcloud bot commented Jan 25, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@meltsufin meltsufin left a comment

Choose a reason for hiding this comment

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

LGTM.
Side question: Why do we even have the integrationTests-2.x.yaml? Is it not possible to include the 2.x branch in the main integrationTests.yaml?

@elefeint
Copy link
Contributor Author

It's for the scheduled job, so the right branch is checked out. The non-scheduled PR/branch integration tests are handled with the regular configuraion.

@elefeint elefeint merged commit 5aed063 into main Jan 25, 2022
@elefeint elefeint deleted the reduce-flakes branch January 25, 2022 23:35
@meltsufin
Copy link
Member

@elefeint Is there a reason you can't apply the same script to multiple branches like explained here?

@elefeint
Copy link
Contributor Author

elefeint commented Jan 26, 2022

Yes; because this documentation for non-scheduled events "When using the pull_request and pull_request_target". Pull requests (by way of branch pushes) are already handled by the standard integrationTests.yaml

However, if you look at on.schedule documentation, it says "Scheduled workflows run on the latest commit on the default or base branch. ". So it's not possible to run a scheduled task on a different branch, and the only way to run integration tests on 2.x on schedule, and not just on push, is to check out 2.x through the actions/checkout@v2 action, which does support different branches/tags.

Here are some relevant github threads:
https://g.nite07.orgmunity/t/scheduled-builds-of-non-default-branch/16306/22
https://g.nite07.orgmunity/t/on-schedule-per-branch/17525/2

@meltsufin
Copy link
Member

@elefeint Thanks for the refs. What I was also thinking was along the lines of using the matrix. See this comment: https://g.nite07.orgmunity/t/scheduled-builds-of-non-default-branch/16306/14.

@elefeint
Copy link
Contributor Author

That's something we could certainly do, as long as the new matrix dimension makes it into the cache key. Do you want to send a PR?

kateryna216 added a commit to kateryna216/spring-cloud-gcp that referenced this pull request Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants