Skip to content
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

Docker fails with request contains invalid or unauthorized changes error #11320

Open
1 task done
sebastien-comeau opened this issue Jan 16, 2025 · 4 comments
Open
1 task done
Labels
L: docker Docker containers L: github:actions GitHub Actions L: go:modules Golang modules T: bug 🐞 Something isn't working

Comments

@sebastien-comeau
Copy link

sebastien-comeau commented Jan 16, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Package ecosystem

Docker

Package manager version

No response

Language version

No response

Manifest location and content before the Dependabot update

No response

dependabot.yml content

https://github.com/DTS-STN/future-sir/blob/main/.github/dependabot.yaml

Updated dependency

It should update to the latest LTS node bookworm-slim (atm: docker.io/library/node:22.13.0-bookworm-slim) version from docker.io/library/node:22.11.0-bookworm-slim.

What you expected to see, versus what you actually saw

I expect a PR to be created for containerfile with docker.io/library/node:22.13.0-bookworm-slim version update but the job is failing with the following error:

2025/01/16 14:04:35 ERROR <job_949001684> {"errors":[{"status":400,"title":"Bad Request","detail":"The request contains invalid or unauthorized changes"}]}
2025/01/16 14:04:35 ERROR <job_949001684> /home/dependabot/dependabot-updater/lib/dependabot/api_client.rb:44:in `block in create_pull_request'

Native package manager behavior

No response

Images of the diff or a link to the PR, issue, or logs

https://github.com/DTS-STN/future-sir/actions/runs/12810528684/job/35717793507#step:3:151

Smallest manifest that reproduces the issue

No response

@kncesarini
Copy link

I'm having this same issue and it seem like the cause is the name of the file being "Containerfile" rather than "Dockerfile"

As a test in the same repo I created two folders with identical content, test2 and test3, with the exception that test2 contains "Containerfile" and test3 contains "Dockerfile". The dependabot action fails on test2 (with the above error) and succeeds on test3.

My dependabot file is this:

version: 2
registries:
  ecr-docker:
    type: docker-registry
    url: <prviate ecr repo>
    username: ${{secrets.ECR_AWS_ACCESS_KEY_ID}}
    password: ${{secrets.ECR_AWS_SECRET_ACCESS_KEY}}
updates:
  - package-ecosystem: "docker"
    directory: "/test2" # Location of Containerfile
    registries:
      - ecr-docker
    schedule:
      interval: "weekly"
  - package-ecosystem: "docker"
    directory: "/test3" # Location of Dockerfile
    registries:
      - ecr-docker
    schedule:
      interval: "weekly"

@sebastien-comeau
Copy link
Author

Docker FileFetcher regex is case-insensitive and will match dockerfile or containerfile. The file is found in my case but the action is blocked in create_pull_request.

DOCKER_REGEXP = /dockerfile|containerfile/i

@kncesarini
Copy link

And still, if you rename your file to Dockerfile I think you'll see the action be successful instead.

@sebastien-comeau
Copy link
Author

And still, if you rename your file to Dockerfile I think you'll see the action be successful instead.

We tried and got the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: docker Docker containers L: github:actions GitHub Actions L: go:modules Golang modules T: bug 🐞 Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants