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

Fetching changelogs from github.com fails when the source URL contains "gitlab" #13139

Closed
Tracked by #14138
mmslkr opened this issue Dec 16, 2021 · 5 comments · Fixed by #14989
Closed
Tracked by #14138

Fetching changelogs from github.com fails when the source URL contains "gitlab" #13139

mmslkr opened this issue Dec 16, 2021 · 5 comments · Fixed by #14989
Labels
auto:reproduction A minimal reproduction is necessary to proceed core:changelogs Related to changelogs/release notes fetching priority-4-low Low priority, unlikely to be done unless it becomes important to more people stale status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality

Comments

@mmslkr
Copy link

mmslkr commented Dec 16, 2021

How are you running Renovate?

Self-hosted

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

31.2.2

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

GitLab self-hosted

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

31.2.2

Describe the bug

When fetching changelogs, Renovate checks the source URL to decide which API to call, see

if (
args.sourceUrl?.includes('gitlab') ||
(args.platform === 'gitlab' &&
new URL(args.sourceUrl).hostname === new URL(args.endpoint).hostname)
) {
res = await sourceGitlab.getChangeLogJSON({ ...args, releases });
} else {
res = await sourceGithub.getChangeLogJSON({ ...args, releases });
}

This breaks when fetching a URL from github.com which includes the string "gitlab", see debug logs.

A workaround right now is to uppercase "gitlab" while setting the depName.

Relevant debug logs

Logs
DEBUG: Fetching changelog: https://github.com/voxpupuli/puppet-gitlab_ci_runner (3.0.0 -> v4.2.0) (repository=lkr/test-repo)
DEBUG: Multiple candidates for changelog file, using CHANGELOG.md (repository=lkr/test-repo)
DEBUG: GitLab API 404 (repository=lkr/test-repo)
       "url": "https://github.com/api/v4/projects/voxpupuli%2fpuppet-gitlab_ci_runner/repository/tags?per_page=100"

Have you created a minimal reproduction repository?

No reproduction repository

@mmslkr mmslkr added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Dec 16, 2021
@rarkins
Copy link
Collaborator

rarkins commented Dec 16, 2021

I think it's possibly the combination of also running on gitlab self-hosted too

@rarkins rarkins added core:changelogs Related to changelogs/release notes fetching priority-4-low Low priority, unlikely to be done unless it becomes important to more people and removed priority-5-triage labels Dec 16, 2021
@mmslkr
Copy link
Author

mmslkr commented Dec 16, 2021

In my case, it really is just the check for

args.sourceUrl?.includes('gitlab')

because changing the depName from voxpupuli/puppet-gitlab_ci_runner to voxpupuli/puppet-GITLAB_ci_runner solves it. But thanks for looking into it.

@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Apr 21, 2023
@github-actions
Copy link
Contributor

Hi there,

Get your issue fixed faster by creating a minimal reproduction. This means a repository dedicated to reproducing this issue with the minimal dependencies and config possible.

Before we start working on your issue we need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.

To get started, please read our guide on creating a minimal reproduction.

We may close the issue if you, or someone else, haven't created a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.

Good luck,

The Renovate team

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

When a bug has been marked as needing a reproduction, it means nobody can work on it until one is provided. In cases where no reproduction is possible, or the issue creator does not have the time to reproduce, we unfortunately need to close such issues as they are non-actionable and serve no benefit by remaining open. This issue will be closed after 7 days of inactivity.

@viceice
Copy link
Member

viceice commented May 9, 2023

That code is already refactored and this should be fixed

@viceice viceice closed this as completed May 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto:reproduction A minimal reproduction is necessary to proceed core:changelogs Related to changelogs/release notes fetching priority-4-low Low priority, unlikely to be done unless it becomes important to more people stale status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants