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

fix(docker): use a HEAD request to the real resource auth. #14744

Merged
merged 9 commits into from Apr 6, 2022

Conversation

vlagorce
Copy link
Contributor

Changes

When listing tags we should make a HEAD request to the real resource and use the auth header values to get a token

Context

Closes #14708

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@vlagorce vlagorce changed the title use a HEAD request to the real resource auth. fix(docker): use a HEAD request to the real resource auth. Mar 21, 2022
@rarkins
Copy link
Collaborator

rarkins commented Mar 21, 2022

Mistaken package.json change?

@vlagorce
Copy link
Contributor Author

Mistaken package.json change?

removed.

lib/modules/datasource/docker/index.spec.ts Show resolved Hide resolved
lib/modules/datasource/docker/index.spec.ts Outdated Show resolved Hide resolved
lib/modules/datasource/docker/index.ts Outdated Show resolved Hide resolved
@vlagorce vlagorce requested a review from viceice March 29, 2022 15:18
vlagorce and others added 2 commits April 2, 2022 16:40
@vlagorce vlagorce requested a review from viceice April 4, 2022 07:43
@viceice
Copy link
Member

viceice commented Apr 5, 2022

I think this needs some real runs against different docker registries 🤔

@vlagorce
Copy link
Contributor Author

vlagorce commented Apr 5, 2022

Folowing your mesage I ran this branch against a repo having images hosted in ACR.
Updates are found without any lookup error. :)

@rarkins rarkins enabled auto-merge (squash) April 6, 2022 06:09
@rarkins rarkins merged commit 3bb6451 into renovatebot:main Apr 6, 2022
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.12.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@rslinckx
Copy link

rslinckx commented Apr 8, 2022

Might this have caused the following errors on gcr.io (and also on eu.gcr.io) since 2 days?:

WARN: Invalid registry response
{
  "apiCheckUrl": "https://gcr.io/v2/datadoghq/cluster-agent/tags/list?n=10000",
  "res": {
    "statusCode": 405,
    "body": "",
    "headers": {
      "docker-distribution-api-version": "registry/2.0",
      "content-type": "application/json",
      "content-encoding": "gzip",
      "date": "Fri, 08 Apr 2022 07:47:28 GMT",
      "server": "Docker Registry",
      "cache-control": "private",
      "x-xss-protection": "0",
      "x-frame-options": "SAMEORIGIN",
      "transfer-encoding": "chunked",
      "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\"",
      "connection": "close"
    },
    "authorization": false
  }
}
DEBUG: Failed to get authHeaders for getTags lookup

rarkins added a commit that referenced this pull request Apr 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ACR Datasource unauthorized while fetching tags list.
5 participants