upsidr / merge-gatekeeper

Get better merge control
MIT License
85 stars 14 forks source link

Hitting Docker rate limit and ways to avoid that #69

Open Axelcouty opened 1 year ago

Axelcouty commented 1 year ago

Hello !

First thanks for this project :).

I'm working with merge-gatekeeper as a github action like this:

      - name: Run Merge Gatekeeper
        uses: upsidr/merge-gatekeeper@v1
        with:
          token: whatever

It seems that for our projects every Pull Requests triggers this action which always build a docker image using this Dockerfile. The FROM uses a default docker repository which is prone to rate limits.

To my knowledge there is currently no way to avoid the issue, here are random thoughts to tackle that in the future:

What do you think ?

rytswd commented 1 year ago

Hi @Axelcouty, thanks for raising the issue! ☺️ We have not seen this rate limit ourselves, but it is indeed problematic πŸ˜“ I'm not sure about any other base repository for Go -- could you educate me if the ECR copy is also the official copy we could leverage? We would like to keep our dependency to the official setup for full transparency and security, and if the ECR setup is something we can use without the rate limit, that sounds like a possibility to explore πŸ‘

Another possibility is a full rewrite in JS/TS. When we originally started our development of Merge Gatekeeper, we considered whether we should write in JS/TS for fast startup without hardly any build prep step, or write with our most comfortable option which was Go at the time. We chose the latter, as the slow start wasn't particularly a problem for most of use cases (because Merge Gatekeeper is meant to wait for some slow jobs anyways). We also hoped this action would be obsolete with some official support provided from GitHub πŸ˜… But as the situation hasn't changed much and Merge Gatekeeper has been proving to be useful (at least for us), it may be worth the effort of rewriting the whole thing in JS/TS. I must admit we have been really slow with the development and review effort these days for additional functionalities and fixes, and it may be worth doing the rewrite earlier than later, so that we can also work out other requests at the same time.

Axelcouty commented 1 year ago

Hoy!

Sorry i realized you had to look for informations by yourself, which you provided on my PR x).

Looking at how github action works it seems like having actions defined in JS removes some drawbacks... Especially this one which doesn't affect everyone the same way but is sadly out of our control.

No worries open source projects are not easy to maintain ! 12 days for m'y reply :3

I understand github could have taken this but maybe they wait your rewrite in JS/TS to take it ahah! Could it be on their roadmap somewhere ?