Skip to content

fix(datasource/docker): handle empty newValue in getDigest #33449

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

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

viceice
Copy link
Member

@viceice viceice commented Jan 7, 2025

Changes

newValue can be an empty string, so ?? operator doesn't fallback to latest tag.
This causes wrong docker api requests.

DEBUG: getDigest(https://code.forgejo.org/, forgejo/forgejo, ) (repository=forgejo-helm/forgejo-helm, baseBranch=main)
DEBUG: getManifestResponse(https://code.forgejo.org/, forgejo/forgejo, , head) (repository=forgejo-helm/forgejo-helm, baseBranch=main)
...
DEBUG: HEAD https://code.forgejo.org/v2/forgejo/forgejo/manifests/ = (code=ERR_NON_2XX_3XX_RESPONSE, statusCode=404 retryCount=0, duration=17) (repository=forgejo-helm/forgejo-helm, baseBranch=main)
DEBUG: Docker Manifest is unknown (repository=forgejo-helm/forgejo-helm, baseBranch=main)
       "err": {
         "name": "HTTPError",
         "code": "ERR_NON_2XX_3XX_RESPONSE",
         "timings": {
           "start": 1736256846663,
           "socket": 1736256846663,
           "lookup": 1736256846663,
           "connect": 1736256846663,
           "secureConnect": 1736256846663,
           "upload": 1736256846663,
           "response": 1736256846680,
           "end": 1736256846680,
           "phases": {
             "wait": 0,
             "dns": 0,
             "tcp": 0,
             "tls": 0,
             "request": 0,
             "firstByte": 17,
             "download": 0,
             "total": 17
           }
         },
         "message": "Response code 404 (Not Found)",
...
DEBUG: Could not determine new digest for update. (repository=forgejo-helm/forgejo-helm, baseBranch=main)
       "packageName": "code.forgejo.org/forgejo/forgejo",
       "currentValue": "",
       "datasource": "docker",
       "newValue": "",
       "bucket": undefined

Context

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 select 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

@viceice viceice requested review from rarkins and secustor January 7, 2025 14:18
@viceice viceice added this pull request to the merge queue Jan 7, 2025
Merged via the queue into main with commit 37c05dc Jan 7, 2025
39 checks passed
@viceice viceice deleted the fix/docker-new-value branch January 7, 2025 14:30
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 39.92.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 7, 2025
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.

3 participants