Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

GitHub Actions: Cache Maven dependencies#5036

Merged
ocket8888 merged 1 commit intoapache:masterfrom
zrhoffman:gha-cache-maven
Sep 17, 2020
Merged

GitHub Actions: Cache Maven dependencies#5036
ocket8888 merged 1 commit intoapache:masterfrom
zrhoffman:gha-cache-maven

Conversation

@zrhoffman
Copy link
Member

@zrhoffman zrhoffman commented Sep 17, 2020

What does this PR (Pull Request) do?

  • This PR fixes building Traffic Router in GitHub Actions by caching Maven dependencies. It looks like GitHub Actions doesn't rate-limit downloads the same way if you use caching.
  • This PR is not related to any Issue

This will speed up building TR as well, which always takes the longest of any component to build on GitHub Actions

Which Traffic Control components are affected by this PR?

  • CI tests

What is the best way to verify this PR?

Check the Traffic Router GitHub Actions result, since GHA is the only place experiencing rate limiting.

If this is a bug fix, what versions of Traffic Control are affected?

The following criteria are ALL met by this PR

  • Not reproducible outside of GitHub Actions since GitHub Actions is the thing rate-limiting our TR-building action's request
  • Project components are unchanged, no documentation necessary
  • An update to CHANGELOG.md is not necessary
  • This PR includes any and all required license headers
  • This PR does not include a database migration
  • This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

@zrhoffman zrhoffman added ci Traffic Router related to Traffic Router labels Sep 17, 2020
Copy link
Contributor

@ocket8888 ocket8888 left a comment

Choose a reason for hiding this comment

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

Clearly fixes CI because the actions worked

@ocket8888 ocket8888 merged commit 45dd3c8 into apache:master Sep 17, 2020
@ocket8888
Copy link
Contributor

We should also be doing this for TP's node_modules dependencies, btw.

@zrhoffman zrhoffman deleted the gha-cache-maven branch September 17, 2020 17:04
@MylesBock
Copy link
Contributor

I got on this topic last night and threw a few more things in the mix that may aid this job:

https://github.com/MylesBock/trafficcontrol/runs/1129862202

Performs roughly the same caching of maven artifacts, adds a little finegrained control over settings.xml, but also tweaks how traffic_router is built by limiting the number of artifact download and build threads

@zrhoffman
Copy link
Member Author

zrhoffman commented Sep 17, 2020

Sorry, I didn't know anyone else was working on it (and should have made a GitHub issue before submitting a PR to fix). If you aren't there already, feel free to join #traffic_router on the Apache Traffic Control slack (there's an invite link in the docs), where we were discussing a fix. If you think it can be improved further, though, PRs are welcome.

We should also be doing this for TP's node_modules dependencies, btw.

I also opened #5042 to document that we don't cache NPM dependencies.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

process Traffic Router related to Traffic Router

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants