-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support for Docker compose files #390
Comments
👍 for this, and should be relatively straightforward. A couple of things I want to get to first, but I'm definitely game for adding this to Dependabot at some point! |
Hi, Thanks in advance |
I hope so, yes! This is another one that @hmarr owns on our side, but he's very busy scaling Dependabot up to 100m repos! |
It currently can't SHA-pin the docker-compose.yml `image` keys, so can't help us achieve reproducible builds (dependabot/dependabot-core#390)
@stalebot please leave this open - hoping it gets implemented |
@robaiken It works better now, thanks. Unfortunately it is still impossible to tell what's going on. I don't think registries allow searching by digest (at least Docker Hub doesn't seem to), meaning that it's impossible or at least very difficult to tell which version PR updates to with just:
Can human readable versions be used instead? Also, to bring my other point from previous comment. It's common practice to keep human-readable version string in comment after digest. I would like to see that string updated as well, otherwise we run into issue as described in first paragraph again. So,
to be updated to
(theoretical version) |
@gegoune it's definitely a limitation with how things work right now. The version readability stuff is a bit outside what we can tackle in this implementation. Mind opening up a feature request for this? Would be great to track things like showing readable versions and keeping those comments in sync. It'll help us plan this out properly for the future. |
@robaiken FYI in case you are planning to address env param in the future. I had the same issue with a test, which had mostly parameterized image entries with the exception of one "hard-coded". In my example it wouldn't have been able to lookup the ENV as it is generated ad-hoc with test scripts, but my plan was to still use dependabot to update the "hard-coded" ones: Good news, the new version with #11656, works for the "hard-coded" image entry and skips the rest: |
@robaiken Could it be that you only read the first part of #390 (comment) ("Thanks for fixing this! It works for me on a whole set of repositories")? I see a 🎉 reaction, but I also reported an issue ("but it fails for Elasticsearch, Kibana and Filebeat and also for NGINX."). The log is included in that comment. I just retested and it still fails. The compose file is trivially simple:
The compose files for Filebeat and Kibana have the same structure and reference the same version number. For NGINX, this is the compose file:
|
Looks like dependabot will refuse to upgrade an image with the following tag: service:
serviceA:
image: hexpm/elixir:1.18.2-erlang-27.2.2-alpine-3.21.2 However, today the following images are already available:
For reference, these are official images built & published by Elixir / Hexpm team, see https://github.com/hexpm/bob?tab=readme-ov-file#docker-images |
@gmile this could be related to this #10678. And i had previously similar issues with updates in Dockerfile and k8s files, as soon i used a definition of These complex tags seem to be generally an issue for dependabot #10385 #8648. |
@Aaron-Ritter Thanks for reporting this! The current implementation focuses only on hardcoded image tags, and I'm glad it's working for those in your setup. For images using environment variables (like |
@robaiken sure, will create a issue accordingly once i've updated everything with the official release. With regards to the earlier reported issue #390 (comment) on images not updating and trowing an error. This seems to be related to the quotation of the images, i updated my test with single and double quotes as well as without quotes, the one without is now updating propperly: So the issue reported from @Bert-R seems to be as well related to the quotation as double quotes are used in this example: |
@Aaron-Ritter Thanks for the detailed investigation! Yes, you're correct - I've submitted PR #11669 to add support for images with quotes. This should resolve the issues you and @Bert-R encountered with quoted image tags. |
@robaiken In can confirm it's fixed now. Thanks! |
@gmile Could you share the job logs from one of your failed runs? You can find them following GitHub's guide on viewing Dependabot logs. |
@robaiken thanks a lot! I can confirm this now works for all my tests. https://github.com/sonderformat-llc/novu/actions/runs/13498872364/job/37712208984 |
@robaiken sure. I get this at the end of logs:
Can't share the entire log publicly for privacy reasons, but here are Elixir-related lines from it - this is what was logged before dependabot moved on checking another image. To sum up, it seems like its attempts to access registry.hub.docker.com are failing:
Upd. For what it's worth, the number of image tags contained in the repository is:
|
@gmile This seems to happen because I got a successful run 🥳
|
Awesome, thank you so much! I'll wait until tomorrow morning to verify if this worked, since it doesn't seem like re-triggering dependabot workflow is possible in principle (attempting to do so returns a warning message in the workflow run, but results in a no-op) |
@gmile To manually retrigger a Dependabot job (it's hidden pretty deep in GitHub's UI):
This path isn't obvious, it is really buried! Hopefully, this helps |
I've managed to find an image which isn't getting updated. I've got a private repository which contains the There is very little that I can see in the logs aside from these three lines:
|
@wjam , can you please file a new bug? |
Also, the GitHub issue labelling currently doesn't understand |
Hi @Marinofull, I see this issue has already been reported here: #11686
Contributing this information helps us better understand the scale of the issue and identify patterns across different environments. |
From @armin-joellenbeck on December 23, 2017 9:21
Knowing when new Docker images are published would be helpful when the are used in a Docker compose file too.
Just like #20, with the file
docker-compose.yml
instead ofDockerfile
.Copied from original issue: dependabot/feedback#66
The text was updated successfully, but these errors were encountered: