Skip to content

Clean golang cache for arm64 ci workflows#15989

Merged
ahrtr merged 1 commit intoetcd-io:mainfrom
jmhbnz:disable-arm64-ci-cache
Jun 1, 2023
Merged

Clean golang cache for arm64 ci workflows#15989
ahrtr merged 1 commit intoetcd-io:mainfrom
jmhbnz:disable-arm64-ci-cache

Conversation

@jmhbnz
Copy link
Copy Markdown
Member

@jmhbnz jmhbnz commented May 31, 2023

We recently moved to container based nightly arm64 workflow runs which appear to be completing successfully however the e2e common suite is reporting unexpected caching, refer: https://github.com/etcd-io/etcd/actions/runs/5116632303/jobs/9198983536

We have a hypothesis that we can prevent this behavior with cache: false on the setup-go action, refer discussion in #15986.

@ahrtr
Copy link
Copy Markdown
Member

ahrtr commented May 31, 2023

After second thought, I think the better choice is to only disable cache for golang test by running go clean -testcache before each test suite. There is no reason not to reuse the setup-go cache, as long as there is no code change.

@jmhbnz
Copy link
Copy Markdown
Member Author

jmhbnz commented May 31, 2023

After second thought, I think the better choice is to only disable cache for golang test by running go clean -testcache before each test suite. There is no reason not to reuse the setup-go cache, as long as there is no code change.

This also crossed my mind. I'm going to hit pause on any more work here just to see if @serathius or anyone else has a preference on which cache prevention option to use (for the record I'm happy with either approach as both address the issue and I think overall performance of one versus the other will be minimal).

For reference, doing a completely fresh setup-go with zero cache only takes our machines 8 seconds, refer: https://github.com/etcd-io/etcd/actions/runs/5138723612/jobs/9248351335?pr=15989, versus 1 second with cache.

@fuweid
Copy link
Copy Markdown
Member

fuweid commented Jun 1, 2023

No cache looks good to me (8s is ok). or we can force to run test case with make test GO_TEST_FLAGS="-count=1" with build cache.

@serathius
Copy link
Copy Markdown
Member

Caching go mod 👍
Caching go build 👍
Caching go test 👎

Signed-off-by: James Blair <mail@jamesblair.net>
@jmhbnz jmhbnz marked this pull request as ready for review June 1, 2023 10:44
@jmhbnz
Copy link
Copy Markdown
Member Author

jmhbnz commented Jun 1, 2023

Thanks for the feedback everyone - I've switched to the more targeted approach of just doing the go clean -testcache before each suite runs.

I've run multiple workflow runs to verify this is working as expected and we no longer see any cache for the common e2e tests as we were previously. Refer latest run https://github.com/etcd-io/etcd/actions/runs/5143019041/jobs/9257510705?pr=15989.

Copy link
Copy Markdown
Member

@fuweid fuweid left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @jmhbnz

Please consider to disable golang test cache for all workflows as a followup PR

Copy link
Copy Markdown
Member

@chaochn47 chaochn47 left a comment

Choose a reason for hiding this comment

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

LGTM

@jmhbnz jmhbnz changed the title Disable golang cache for arm64 ci workflows Clean golang cache for arm64 ci workflows Jun 1, 2023
@jmhbnz
Copy link
Copy Markdown
Member Author

jmhbnz commented Jun 1, 2023

Please consider to disable golang test cache for all workflows as a followup PR

Defined follow-up task here as a good first issue #15995

@ahrtr ahrtr merged commit 53b23d3 into etcd-io:main Jun 1, 2023
@jmhbnz jmhbnz deleted the disable-arm64-ci-cache branch July 27, 2023 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants