Git Product home page Git Product logo

Comments (7)

patrickdappollonio avatar patrickdappollonio commented on August 28, 2024

Do you happen to know if any of these tools have a github action that could leverage caching? From personal experience, some of the pre-commit apps you can use can take a while to load. Case in point being golangci-lint which takes a hell of a long time running in GitHub actions.

Public repos having free GHA is fine, but for our private repos this could rack up compute times by a lot if caching is not leveraged!

from kubefirst.

mrsimonemms avatar mrsimonemms commented on August 28, 2024

Yes, see this thing I've used

from kubefirst.

patrickdappollonio avatar patrickdappollonio commented on August 28, 2024

Awesome and good to know! I see the cache, I'm just not sure how it leverages it per-linter knowing there's no way that you can call a custom binary and have no idea where the cache for those binaries could land, but I trust you've tested it far more than I do 😄

The example you shared above calls out golangci-lint, I wrote a starting list of linters which also includes some of the ones from your own repo at the top, maybe we could merge those into the golangci-lint settings if need be.

I put the GHA for golangci-lint which caches every single linter enabled through the tool, so I can 100% confirm that it's not possible to break cache with it.

from kubefirst.

mrsimonemms avatar mrsimonemms commented on August 28, 2024

Yeah, the cache is for the dependencies pre-commit installs. One annoyance with pre-commit is that the initial installation can (not always) be slow - as a rule of thumb, the more dependencies the slower it is to install. However, once it's in the cache it's fairly rapid (< 2 seconds typically)

from kubefirst.

patrickdappollonio avatar patrickdappollonio commented on August 28, 2024

I'm honestly less worried about installations and more about the execution cache itself.

GolangCI-lint takes over 6 minutes on a GHA runner the first time. Each run can cache previous results so if the code hasn't changed, those checks are skipped and the same outcome is returned.

Without "execution" caching we would be seeing larger and larger times of CI which would increase the feedback loop timer.

Between download cache and execution cache I wish we would have both, but if I had to choose, execution for me (especially for GolangCI-lint) is the most important.

from kubefirst.

mrsimonemms avatar mrsimonemms commented on August 28, 2024

I can only suggest doing a bit of experimentation on this. I've used GolangCI-Lint on all my projects and don't recall that being especially slow - it might be because it's only being run on the changed files in Pre-commit or it might be other reasons. But this is definitely something to keep in mind.

from kubefirst.

patrickdappollonio avatar patrickdappollonio commented on August 28, 2024

I'm down to take over the RFC and this issue if you want me to run the experimentation and take it to completion, but I don't want to step in your own proposal. Since you're the RFC's driver, the goal is for the driver to provide the "burden of proof" that the situation they're looking for comments adapt to, well, the comments from the other team members.

Happy to go either way and change the RFC's driver to me though!

from kubefirst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.