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

Dependency Duplicated In Table In Pull Request Description #26073

Closed
rarkins opened this issue Dec 1, 2023 Discussed in #26025 · 3 comments · Fixed by #26771
Closed

Dependency Duplicated In Table In Pull Request Description #26073

rarkins opened this issue Dec 1, 2023 Discussed in #26025 · 3 comments · Fixed by #26771
Labels
priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality worker:pr Related to non-onboarding PR creation or update

Comments

@rarkins
Copy link
Collaborator

rarkins commented Dec 1, 2023

Discussed in #26025

Originally posted by Kurt-von-Laven November 29, 2023

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

If you're self-hosting Renovate, select which platform you are using.

None

What is your question?

We are using Forking Renovate. The description of ScribeMD/docker-cache#729 lists Yarn v2+ twice, once with a link to a site that never loads and once without. The table in the commit message body correctly lists @yarnpkg/cli once. I am guessing the duplicate in the PR description stems from the fact that both the npm manager and our regex manager bump Yarn. It makes me wonder if our regex manager may be configured incorrectly in some subtle way. How are rows in the table in the PR description deduplicated?

@rarkins rarkins added type:bug Bug fix of existing functionality priority-4-low Low priority, unlikely to be done unless it becomes important to more people worker:pr Related to non-onboarding PR creation or update labels Dec 1, 2023
@rarkins
Copy link
Collaborator Author

rarkins commented Dec 1, 2023

Reproduction forked to https://github.com/renovate-reproductions/26073

@RahulGautamSingh
Copy link
Collaborator

RahulGautamSingh commented Jan 16, 2024

We do de-deuplicate them here.

const uniqueRows = [...new Set(rows)];

The issue in this case is that one row has changelog link whereas the other doesn't. And that is because the prBodyDefintions of regex manager and npm manager are different.

for npm it is:

prBodyDefinitions: {
Change:
"[{{#if displayFrom}}`{{{displayFrom}}}` -> {{else}}{{#if currentValue}}`{{{currentValue}}}` -> {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})",
},
};

whereas for regex it is: (regex doesn't have its own so it uses the default value)

Change: '`{{{displayFrom}}}` -> `{{{displayTo}}}`',

I think we only need to compare a few of the row values to determine if the updates are same or not rather than comparing all the values. IMO comapring depName, depType, oldValue and newValue should be enough.

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 37.161.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:bug Bug fix of existing functionality worker:pr Related to non-onboarding PR creation or update
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants