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 datasource fails with quay.io image #6195

Closed
ChipWolf opened this issue May 6, 2020 · 5 comments
Closed

Docker datasource fails with quay.io image #6195

ChipWolf opened this issue May 6, 2020 · 5 comments
Labels
duplicate This issue is closed as a duplicate of another issue manager:dockerfile Dockerfile files priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others

Comments

@ChipWolf
Copy link

ChipWolf commented May 6, 2020

Which Renovate are you using?

WhiteSource Renovate App

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

#173578276

{
  "registry": "https://quay.io",
  "dockerRepository": "helmpack/chart-testing",
  "err": {
    "name": "HTTPError",
    "host": "quay.io",
    "hostname": "quay.io",
    "method": "GET",
    "path": "/v2/helmpack/chart-testing/blobs/sha256:9bd606e7cb0450e6d7e1cd2152a48298cf6e0d78417d79a32e948bcca8e7dd15",
    "protocol": "https:",
    "url": "https://quay.io/v2/helmpack/chart-testing/blobs/sha256:9bd606e7cb0450e6d7e1cd2152a48298cf6e0d78417d79a32e948bcca8e7dd15",
    "gotOptions": {
      "path": "/v2/helmpack/chart-testing/blobs/sha256:9bd606e7cb0450e6d7e1cd2152a48298cf6e0d78417d79a32e948bcca8e7dd15",
      "protocol": "https:",
      "slashes": true,
      "auth": null,
      "host": "quay.io",
      "port": null,
      "hostname": "quay.io",
      "hash": null,
      "search": null,
      "query": null,
      "pathname": "/v2/helmpack/chart-testing/blobs/sha256:9bd606e7cb0450e6d7e1cd2152a48298cf6e0d78417d79a32e948bcca8e7dd15",
      "href": "https://quay.io/v2/helmpack/chart-testing/blobs/sha256:9bd606e7cb0450e6d7e1cd2152a48298cf6e0d78417d79a32e948bcca8e7dd15",
      "headers": {
        "user-agent": "Renovate Bot (GitHub App 2740)",
        "authorization": "** redacted **",
        "accept-encoding": "gzip, deflate"
      },
      "hooks": {
        "beforeError": [],
        "init": [],
        "beforeRequest": [],
        "beforeRedirect": [
          null
        ],
        "beforeRetry": [],
        "afterResponse": []
      },
      "retry": {
        "methods": {},
        "statusCodes": {},
        "errorCodes": {}
      },
      "decompress": true,
      "throwHttpErrors": true,
      "followRedirect": true,
      "stream": false,
      "form": false,
      "json": false,
      "cache": false,
      "useElectronNet": false,
      "method": "GET",
      "hostType": "docker"
    },
    "statusCode": 400,
    "statusMessage": "Bad Request",
    "headers": {
      "x-amz-request-id": "6A0<snip>7004",
      "x-amz-id-2": "cFmc8KCUsl<snip>kr30=",
      "content-type": "application/xml",
      "transfer-encoding": "chunked",
      "date": "Wed, 06 May 2020 15:26:50 GMT",
      "connection": "close",
      "server": "AmazonS3"
    },
    "body": "\nInvalidArgumentOnly one auth mechanism allowed; only the X-Amz-Algorithm query parameter, Signature query string parameter or the Authorization header should be specifiedAuthorizationBearer eyJhbGciO<snip>2SiIdKSkr30=",
    "message": "Response code 400 (Bad Request)",
    "stack": "HTTPError: Response code 400 (Bad Request)\n    at EventEmitter. (/home/ubuntu/renovateapp/node_modules/got/source/as-promise.js:74:19)\n    at runMicrotasks ()\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)"
  }
}

What would you like to do?

I would like Renovate to find updates for Docker images hosted at quay.io, a popular Docker image registry.

@rarkins
Copy link
Collaborator

rarkins commented May 6, 2020

Need to work out why the existing logic

if (opts.search?.includes('X-Amz-Algorithm')) {
// if there is no port in the redirect URL string, then delete it from the redirect options.
// This can be evaluated for removal after upgrading to Got v10
const portInUrl = opts.href.split('/')[2].split(':')[1];
if (!portInUrl) {
// eslint-disable-next-line no-param-reassign
delete opts.port; // Redirect will instead use 80 or 443 for HTTP or HTTPS respectively
}
// registry is hosted on amazon, redirect url includes authentication.
delete opts.headers.authorization; // eslint-disable-line no-param-reassign
delete opts.auth; // eslint-disable-line no-param-reassign
isn't working. Note: it wasn't created specifically for quay.io, but seems generic.

@rarkins
Copy link
Collaborator

rarkins commented May 6, 2020

Probably requires a code change, but let's reproduce and debug it first to be sure.

@ChipWolf
Copy link
Author

ChipWolf commented May 7, 2020

Reproduced here https://github.com/ChipWolf/renovate-637

#173979741

DEBUG: Unauthorized docker lookup

@ChipWolf
Copy link
Author

Still an issue, should this be moved over to the main repo @rarkins?

@renovatebot renovatebot deleted a comment from stale bot May 10, 2020
@rarkins rarkins transferred this issue from renovatebot/config-help May 10, 2020
@viceice viceice added manager:dockerfile Dockerfile files priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others ready labels May 11, 2020
@ChipWolf
Copy link
Author

Duplicate of #4626

@rarkins rarkins closed this as completed May 11, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
@HonkingGoose HonkingGoose added the duplicate This issue is closed as a duplicate of another issue label Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue is closed as a duplicate of another issue manager:dockerfile Dockerfile files priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others
Projects
None yet
Development

No branches or pull requests

4 participants