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

Configure hex, gradle, pip and npm caches. #4799

Merged
merged 1 commit into from
Oct 7, 2023
Merged

Conversation

nickva
Copy link
Contributor

@nickva nickva commented Oct 5, 2023

We saw repeated failures on some CI nodes, possibly from them being throttled
by hex.pm. To mitigate it, try to setup package caches for hex, gradle, pip and
npm.

So far it works with Docker builder only but requires that cache directories in
/home/jenkins are owned by the jenkins user. That has to happen as part of
the Jenkins node setup. Nodes controlled from couchdb-infra-cm have been
updated to have those directories and permission however the ARM64 one doesn't
yet, so we're excluding it temporarily.

@nickva nickva force-pushed the jenkins-hex-cache branch 7 times, most recently from a2b349c to 40382ed Compare October 6, 2023 02:08
@nickva nickva changed the title See if we can configure Hex to use a cache for CI jobs Configure hex, gradle, pip and npm caches. Oct 6, 2023
@nickva nickva force-pushed the jenkins-hex-cache branch 2 times, most recently from aba7907 to c39c9d4 Compare October 6, 2023 05:46
@big-r81
Copy link
Contributor

big-r81 commented Oct 6, 2023

restarted the CI and it runs through ...

@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

Thanks @big-r81!

I see it at https://ci-couchdb.apache.org/blue/organizations/jenkins/jenkins-cm1%2FFullPlatformMatrix/detail/jenkins-hex-cache/11/pipeline

Maybe I'll try a few more rebuilds to see how it does. Eventually caches should spread across all the nodes.

@big-r81
Copy link
Contributor

big-r81 commented Oct 6, 2023

That sounds like a good idea.

  1. Can you check if the caches are filled?
  2. So we have a mechanism to clean up the caches?

@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

One still failed in the same place on s390x worker....

Can you check if the caches are filled?

We can check manually by logging into the workers, the ones we have access too, at least. We can see if there are any files in the cache.

So we have a mechanism to clean up the caches?

Hmm we don't have anything like that. We could make separate jenkins task to do that. Like we have that jenkins docker image cleaning task.

@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

I also added a MIX_HOME dir as a cache option. Let's see if that makes any difference.

Otherwise, I think we might want to reach out the Z Linux (s390x arch) team. It could either be a compatibility issue or somehow the CI IP range might be throttled.

@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

The caching seems to at least speed up the 'Build Release Tarball' step. I noticed on main it takes about 6 minutes and with caches it's about 5 minutes. Builds overall seem to have gotten 4-6 minutes faster.

@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

I made an issue in the Z Linux community: linuxone-community-cloud/tickets#58

For now I think we'll disable the s390x worker until that's figure out.

The ARM Debian worker can also be disabled for now based on talking to the maintainer. We still have the FreeBSD arm workers to we'll be testing the architecture there,

We saw repeated failures on some CI nodes, possibly from them being throttled
by hex.pm. To mitigate it, try to setup package caches for hex, gradle, pip and
npm.

So far it works with Docker builder only but requires that cache directories in
/home/jenkins are owned by the `jenkins` user. That has to happen as part of
the Jenkins node setup. Nodes controlled from couchdb-infra-cm have been
updated to have those directories and permission however the ARM64 one doesn't
yet, so we're excluding it temporarily.

The s390x node currently seems to have a hard time fetching hex.pm packages
specifically. All the other workers don't have that issue so it's getting
excluded as well. Linux One community issue:
linuxone-community-cloud/tickets#58
@nickva
Copy link
Contributor Author

nickva commented Oct 6, 2023

Screenshot 2023-10-06 at 5 49 19 PM

Well we got 3 builds in a row. Should we merge it?

@nickva nickva requested a review from big-r81 October 7, 2023 00:39
Copy link
Contributor

@big-r81 big-r81 left a comment

Choose a reason for hiding this comment

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

Yes, let’s merge it and see how it works.

+1

@nickva nickva merged commit ede7ff2 into main Oct 7, 2023
56 checks passed
@nickva nickva deleted the jenkins-hex-cache branch October 7, 2023 16:33
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.

None yet

2 participants