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

Go mod tidy does not work with k8s.io modules #7121

Closed
sluongng opened this issue Aug 27, 2020 · 3 comments
Closed

Go mod tidy does not work with k8s.io modules #7121

sluongng opened this issue Aug 27, 2020 · 3 comments
Labels
auto:reproduction A minimal reproduction is necessary to proceed manager:gomod Go Modules priority-4-low Low priority, unlikely to be done unless it becomes important to more people

Comments

@sluongng
Copy link
Contributor

What Renovate type, platform and version are you using?

Self hosted using Gitlab CI scheduled pipeline.

With latest renovate/renovate docker image

$ renovate --version
23.5.0

Describe the bug

Renovate runs with GOPROXY set to GOPROXY=<internal-proxy>|https://proxy.golang.org

Client repo configure a custom postUpgradeTasks (that renovate allowed):
go mod tidy

Client repo has the following in go.mod

        k8s.io/api v0.0.0-20191004102349-159aefb8556b
        k8s.io/apimachinery v0.0.0-20191004074956-c5d2f014d689
        k8s.io/client-go v11.0.1-0.20191029005444-8e4128053008+incompatible
        k8s.io/klog v1.0.0

Client config

  "extends": [
    "config:base"
  ],
  "ignorePresets": [
    ":prHourlyLimit2",
    ":prConcurrentLimit20"
  ],
  "prCreation": "not-pending",
  "stabilityDays": 3,
  "separateMultipleMajor": true,
  "packageRules": [
    {
      "managers": ["gomod"],
      "groupName": "k8s modules",
      "packagePatterns": ["^k8s.io"]
    }
  ],
  "postUpgradeTasks": {
    "commands": [
      "go mod tidy",
      "some other commands"
    ]
  }
}

Relevant debug logs

ERROR: Error updating branch: Command failed: go mod tidy
       go: k8s.io/klog/v2/v2@v2.3.0: reading https://proxy.golang.org/k8s.io/klog/v2/v2/@v/v2.3.0.mod: 410 Gone
        server response: not found: k8s.io/klog/v2/v2@v2.3.0: invalid version: unknown revision v2/v2.3.0
        (repository=redacted/my-repo, branch=renovate/major-2-k8s-modules)
       "err": {
         "killed": false,
         "code": 1,
         "signal": null,
         "cmd": "go mod tidy",
         "stdout": "",
         "stderr": "go: k8s.io/klog/v2/v2@v2.3.0: reading https://**redacted**@v/v2.3.0.mod: 410 Gone\n\tserver response: not found: k8s.io/klog/v2/v2@v2.3.0: invalid version: unknown revision v2/v2.3.0\n",
         "message": "Command failed: go mod tidy\ngo: k8s.io/klog/v2/v2@v2.3.0: reading https://**redacted**@v/v2.3.0.mod: 410 Gone\n\tserver response: not found: k8s.io/klog/v2/v2@v2.3.0: invalid version: unknown revision v2/v2.3.0\n",
         "stack": "Error: Command failed: go mod tidy\ngo: k8s.io/klog/v2/v2@v2.3.0: reading https://**redacted**@v/v2.3.0.mod: 410 Gone\n\tserver response: not found: k8s.io/klog/v2/v2@v2.3.0: invalid version: unknown revision v2/v2.3.0\n\
n    at ChildProcess.exithandler (child_process.js:303:12)\n    at ChildProcess.emit (events.js:315:20)\n    at ChildProcess.EventEmitter.emit (domain.js:483:12)\n    at maybeClose (internal/child_process.js:1021:16)\n    at Process.ChildPr
ocess._handle.onexit (internal/child_process.js:286:5)"
       }

To Reproduce

Its happening to an internal repo so its hard to publish the repo for repoducable.

Additional context

I tried to cd /tmp/renovate/repos/..../my-repo and run go mod tidy and it was fine.

GOSUMDB=off

> go version
go version go1.15 linux/amd64
@sluongng
Copy link
Contributor Author

Looking at this closely, I can see that the module is being resolved here is k8s.io/klog/v2/v2@v2.3.0 instead of k8s.io/klog/v2@v2.3.0 ?

@rarkins rarkins added auto:reproduction A minimal reproduction is necessary to proceed manager:gomod Go Modules priority-4-low Low priority, unlikely to be done unless it becomes important to more people labels Aug 27, 2020
@rarkins
Copy link
Collaborator

rarkins commented Aug 27, 2020

Without a reproduction, it's hard to troubleshoot anything. Is klog the dependency that's being updated in this branch/MR?

@rarkins
Copy link
Collaborator

rarkins commented Sep 10, 2020

Closing this in the absence of any reproduction or progress. Small chance it's related to #7233

@rarkins rarkins closed this as completed Sep 10, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2020
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 manager:gomod Go Modules priority-4-low Low priority, unlikely to be done unless it becomes important to more people
Projects
None yet
Development

No branches or pull requests

2 participants