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

Invalid deps are shown on dashboard detected dependencies #17255

Closed
viceice opened this issue Aug 18, 2022 · 6 comments · Fixed by #17256
Closed

Invalid deps are shown on dashboard detected dependencies #17255

viceice opened this issue Aug 18, 2022 · 6 comments · Fixed by #17256
Assignees
Labels
core:dashboard Related to Dependency Dashboard functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality

Comments

@viceice
Copy link
Member

viceice commented Aug 18, 2022

How are you running Renovate?

Mend Renovate hosted app on github.com

If you're self-hosting Renovate, tell us what version of Renovate you run.

No response

Please select which platform you are using if self-hosting.

No response

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

We still show invalid deps on dashboard
image

visualon/docker-proget#1

regression of ?

Relevant debug logs

Logs
DEBUG: packageFiles with updates
{
  "baseBranch": "main",
  "config": {
    "docker-compose": [
      {
        "packageFile": "linux/docker-compose.test.yml",
        "deps": [
          {
            "skipReason": "invalid-name",
            "replaceString": "${IMAGE}",
            "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
            "datasource": "docker",
            "depIndex": 0,
            "updates": []
          }
        ]
      }
    ],
    "dockerfile": [
      {
        "packageFile": "linux/Dockerfile",
        "deps": [
          {
            "depName": "proget.inedo.com/productimages/inedo/proget",
            "currentValue": "22.0.5",
            "currentDigest": "sha256:ad625caaf9200022c5016fe8f8677c4089c210cc1780a7934b6a06c9a646ca9f",
            "replaceString": "proget.inedo.com/productimages/inedo/proget:22.0.5@sha256:ad625caaf9200022c5016fe8f8677c4089c210cc1780a7934b6a06c9a646ca9f",
            "autoReplaceStringTemplate": "{{depName}}{{#if newValue}}:{{newValue}}{{/if}}{{#if newDigest}}@{{newDigest}}{{/if}}",
            "datasource": "docker",
            "depType": "final",
            "depIndex": 0,
            "updates": [],
            "warnings": [],
            "versioning": "docker",
            "currentVersion": "22.0.5",
            "fixedVersion": "22.0.5"
          }
        ]
      }
    ],
    "github-actions": [
      {
        "packageFile": ".github/workflows/build.yml",
        "deps": [
          {
            "depName": "actions/checkout",
            "commitMessageTopic": "{{{depName}}} action",
            "datasource": "github-tags",
            "versioning": "regex:^v(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$",
            "depType": "action",
            "replaceString": "actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2",
            "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}",
            "currentValue": "v3.0.2",
            "currentDigest": "2541b1294d2704b0964813337f33b291d3f8596b",
            "depIndex": 0,
            "updates": [],
            "warnings": [],
            "sourceUrl": "https://github.com/actions/checkout",
            "currentVersion": "v3.0.2",
            "fixedVersion": "v3.0.2"
          },
          {
            "depName": "renovatebot/internal-tools",
            "commitMessageTopic": "{{{depName}}} action",
            "datasource": "github-tags",
            "versioning": "regex:^v(?<major>\\d+)(\\.(?<minor>\\d+)\\.(?<patch>\\d+))?$",
            "depType": "action",
            "replaceString": "renovatebot/internal-tools@ac2a85780492e013c8fa9d87aa72a788b78fbd58 # tag=v1.14.2",
            "autoReplaceStringTemplate": "{{depName}}@{{#if newDigest}}{{newDigest}}{{#if newValue}} # tag={{newValue}}{{/if}}{{/if}}{{#unless newDigest}}{{newValue}}{{/unless}}",
            "currentValue": "v1.14.2",
            "currentDigest": "ac2a85780492e013c8fa9d87aa72a788b78fbd58",
            "depIndex": 1,
            "updates": [],
            "warnings": [],
            "sourceUrl": "https://github.com/renovatebot/internal-tools",
            "currentVersion": "v1.14.2",
            "fixedVersion": "v1.14.2"
          }
        ]
      }
    ]
  }
}

Have you created a minimal reproduction repository?

No reproduction, but I have linked to a public repo where it occurs

@viceice viceice added type:bug Bug fix of existing functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:requirements Full requirements are not yet known, so implementation should not be started status:ready core:dashboard Related to Dependency Dashboard functionality labels Aug 18, 2022
@viceice
Copy link
Member Author

viceice commented Aug 18, 2022

I think we should filter all deps with a skipReason

@viceice viceice self-assigned this Aug 18, 2022
@viceice viceice removed the status:requirements Full requirements are not yet known, so implementation should not be started label Aug 18, 2022
@viceice viceice added status:in-progress Someone is working on implementation and removed status:ready labels Aug 18, 2022
@betterPeleg
Copy link
Contributor

@Gabriel-Ladzaretti Do you have any input?

@Gabriel-Ladzaretti
Copy link
Collaborator

Gabriel-Ladzaretti commented Aug 18, 2022

i wonder how the PackageFiles with updates looks like, did we extract undefined dep?
ill try to reproduce locally out of curiosity

@viceice
Copy link
Member Author

viceice commented Aug 18, 2022

@Gabriel-Ladzaretti chekout my linked repo and the log above. the docker dep contains a variable, so it's skipped here

if (cleanedCurrentFrom?.includes(variableMarker)) {
// If cleanedCurrentFrom contains a variable, after cleaning, e.g. "$REGISTRY/alpine", we do not support this.
return {
skipReason: 'contains-variable',
};
}

simple reproduction:

FROM $IMAGE

@Gabriel-Ladzaretti
Copy link
Collaborator

Reproduced locally, I wasn't aware of this scenario really
ladzaretti/dash-undefiend-dep#1

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 32.165.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
core:dashboard Related to Dependency Dashboard functionality priority-3-medium Default priority, "should be done" but isn't prioritised ahead of others status:in-progress Someone is working on implementation type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants