renovatebot / renovate

Home of the Renovate CLI: Cross-platform Dependency Automation by Mend.io
https://mend.io/renovate
GNU Affero General Public License v3.0
17.56k stars 2.3k forks source link

Renovate gets internal package with the release version of the parent project #10467

Closed rajatagarwal closed 3 years ago

rajatagarwal commented 3 years ago

How are you running Renovate?

If using the hosted app, please skip to the next section. Otherwise, if self-hosted, please complete the following:

Please select which platform you are using:

Renovate version: 25.25.2

Describe the bug We have a private repository called project-utils. Releases are created for this repo, with the release number. Let's assume the release number (version number) of this utils repo is v4.3.4

The utils has a go.mod file which looks like below:

module github.abc.com/project-utils

go 1.14

require (
    github.com/golang/mock v1.4.3
    github.com/google/uuid v1.2.0
    github.abc.com/project-utils/redis v0.0.0-20210510053232-abcdef123456 
)

replace github.abc.com/parent-project-utils/redis => ./redis

project-utils contains redis folder with version consists of the following format 0.0.0-{timestamp}-{commit-id}. FYI, this redis folder doesn't have its own releases like the project-utils.

Now there is another repository that consumes redis under project-utils repo. Let's call it consumer-repo.

The consumer-repo has renovate.json. When Renovate tries to update this redis version, it picks up the project-utils version which is v4.3.4 rather than the redis version which should be v0.0.0-20210510053232-abcdef123456 as per the given example.

This is not correct to get the internal package with the release version of the parent project.

If we do go get github.abc.com/project-utils/redis, it brings the correct version. ...

Relevant debug logs

Click me to see logs ``` { "managerData": {"lineNumber": 10, "multiLine": true}, "depName": "github.abc.com/project-utils/redis", "depType": "require", "currentValue": "v0.0.1", "datasource": "go", "depIndex": 5, "updates": [ { "currentVersion": "v0.0.1", "newVersion": "v4.3.4", "newValue": "v4.3.4", "bucket": "non-major", "newMajor": 0, "newMinor": 2, "updateType": "minor", "isSingleVersion": true, "releaseTimestamp": "2021-06-16T03:10:16.000Z", "skippedOverVersions": [ "v0.1.0", "v0.2.0", "v0.3.0", "v0.4.0", "v4.3.4" ], "branchName": "renovate/all" } ], "warnings": [], "sourceUrl": "https://github.abc.com/project-utils", "fixedVersion": "v0.0.1" } DEBUG: processRepo() (repository=consumer-repo) DEBUG: Processing 1 branch: renovate/all (repository=consumer-repo) DEBUG: Calculating hourly PRs remaining (repository=consumer-repo) DEBUG: Retrieving PR list (repository=consumer-repo) DEBUG: Retrieved 7 Pull Requests (repository=consumer-repo) DEBUG: currentHourStart=2021-06-16T15:00:00.000+00:00 (repository=consumer-repo) DEBUG: PR hourly limit remaining: 10 (repository=consumer-repo) DEBUG: Calculating prConcurrentLimit (20) (repository=consumer-repo) DEBUG: getBranchPr(renovate/all) (repository=consumer-repo) DEBUG: findPr(renovate/all, undefined, open) (repository=consumer-repo) DEBUG: Found PR #7 (repository=consumer-repo) DEBUG: Returning from graphql open PR list (repository=consumer-repo) DEBUG: 1 PRs are currently open (repository=consumer-repo) DEBUG: PR concurrent limit remaining: 19 (repository=consumer-repo) DEBUG: Calculated maximum PRs remaining this run (repository=consumer-repo) "prsRemaining": 10 DEBUG: PullRequests limit = 10 (repository=consumer-repo) DEBUG: Calculating branchConcurrentLimit (20) (repository=consumer-repo) DEBUG: 1 already existing branches found: renovate/all (repository=consumer-repo) DEBUG: Branch concurrent limit remaining: 19 (repository=consumer-repo) DEBUG: Calculated maximum branches remaining this run (repository=consumer-repo) "branchesRemaining": 19 DEBUG: Branches limit = 19 (repository=consumer-repo) DEBUG: processBranch with 1 upgrades (repository=consumer-repo, dependencies=github.abc.com/project-utils/redis, branch=renovate/all) DEBUG: Setting current branch to develop (repository=consumer-repo, branch=renovate/all) DEBUG: latest commit (repository=consumer-repo, branch=renovate/all) "branchName": "develop", "latestCommitDate": "2021-06-16T13:15:53+01:00" DEBUG: branchExists=true (repository=consumer-repo, branch=renovate/all) DEBUG: Branch pr rebase requested: false (repository=consumer-repo, branch=renovate/all) DEBUG: Branch has 1 upgrade(s) (repository=consumer-repo, branch=renovate/all) DEBUG: Checking if PR has been edited (repository=consumer-repo, branch=renovate/all) DEBUG: Found existing branch PR (repository=consumer-repo, branch=renovate/all) DEBUG: Checking schedule(at any time, null) (repository=consumer-repo, branch=renovate/all) DEBUG: No schedule defined (repository=consumer-repo, branch=renovate/all) DEBUG: Branch already exists (repository=consumer-repo, branch=renovate/all) DEBUG: GitHub 404 (repository=consumer-repo, branch=renovate/all) "url": "repos/consumer-repo/branches/develop/protection" DEBUG: No branch protection found (repository=consumer-repo, branch=renovate/all) DEBUG: Skipping stale branch check due to rebaseWhen=auto (repository=consumer-repo, branch=renovate/all) DEBUG: Branch does not need rebasing (repository=consumer-repo, branch=renovate/all) DEBUG: Using reuseExistingBranch: true (repository=consumer-repo, branch=renovate/all) DEBUG: manager.getUpdatedPackageFiles() reuseExistinbranch=true (repository=consumer-repo, branch=renovate/all) DEBUG: gomod.updateDependency: v0.2.74 (repository=consumer-repo, branch=renovate/all) DEBUG: No changes necessary (repository=consumer-repo, branch=renovate/all) DEBUG: No package files need updating (repository=consumer-repo, branch=renovate/all) DEBUG: No updated lock files in branch (repository=consumer-repo, branch=renovate/all) DEBUG: No files to commit (repository=consumer-repo, branch=renovate/all) DEBUG: Checking if we can automerge branch (repository=consumer-repo, branch=renovate/all) DEBUG: mergeStatus=no automerge (repository=consumer-repo, branch=renovate/all) DEBUG: Ensuring PR (repository=consumer-repo, branch=renovate/all) DEBUG: There are 0 errors and 0 warnings (repository=consumer-repo, branch=renovate/all) DEBUG: Found existing PR (repository=consumer-repo, branch=renovate/all) DEBUG: Processing existing PR (repository=consumer-repo, branch=renovate/all) DEBUG: Pull Request #7 does not need updating (repository=consumer-repo, branch=renovate/all) DEBUG: Checking #7 for automerge (repository=consumer-repo, branch=renovate/all) "automerge": false, "automergeType": "pr", "automergeComment": "automergeComment" DEBUG: No automerge (repository=consumer-repo, branch=renovate/all) DEBUG: Removing any stale branches (repository=consumer-repo) DEBUG: config.repoIsOnboarded=true (repository=consumer-repo) DEBUG: Branch lists (repository=consumer-repo) "branchList": ["renovate/all"], "renovateBranches": ["renovate/all"] DEBUG: remainingBranches= (repository=consumer-repo) DEBUG: No branches to clean up (repository=consumer-repo) DEBUG: Repository timing splits (milliseconds) (repository=consumer-repo) "splits": {"init": 10612, "extract": 1813, "lookup": 7818, "update": 2116}, "total": 22396 DEBUG: http statistics (repository=consumer-repo) "hostStats": [ "api.github.com, 10 requests, 426ms request average, 0ms queue average", "github.abc.com, 23 requests, 631ms request average, 0ms queue average" ], "totalRequests": 33 INFO: Repository finished (repository=consumer-repo) "durationMs": 22396 DEBUG: Renovate exiting ```

Have you created a minimal reproduction repository?

Please read the minimal reproductions documentation to learn how to make a good minimal reproduction repository.

Additional context

...

github-actions[bot] commented 3 years ago

Hi there,

Help us by making a minimal reproduction repository.

Before we can start work on your issue we first 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 to understand what is needed.

We may close the issue if you (or someone else) have not provided 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[bot] commented 3 years ago

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.

github-actions[bot] commented 3 years ago

This bug report has been closed as we need a reproduction to work on this. If the original poster or anybody else with the same problem discovers that they can reproduce it, please create a new issue, and reference this issue.