Quantisan / docker-clojure

Official Docker image for Clojure
https://hub.docker.com/_/clojure/
MIT License
204 stars 34 forks source link

Improve heuristic for opening docker-library/official-images PRs #233

Open cap10morgan opened 5 months ago

cap10morgan commented 5 months ago

This pull request is a good example of why our current heuristic for whether or not we should automatically open a PR in docker-library/official-images is overly simplistic.

Currently we only open the official-images PR if the generated manifest file changes somewhere other than the git SHA.

However, PR #232 fixes a bug in the lein images but only bumps the git SHA in the manifest. It probably still makes sense to not always open an official-images PR on every change we merge here, though. But maybe just doing that is the simplest and most reliable option?

One option would be to build (some of*) the images in our CI pipeline here and detect when they change and base the decision on that. That would be tricky and slow, but is probably the most correct heuristic.

Another option would be to detect a string in the git commit message that forces an official-images PR (e.g. [force-official-images-pr]). We would just have to remember to add it when we needed it.

* It would likely be slow and unreliable to build every architecture in GitHub Actions' free tier infrastructure.

cap10morgan commented 5 months ago

And, of course, another option would be to do nothing and just continue manually opening official-images PRs in these cases. It's not a huge hassle.