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

Override GOPATH to use Renovate cache #29817

Open
rarkins opened this issue Jun 24, 2024 · 4 comments
Open

Override GOPATH to use Renovate cache #29817

rarkins opened this issue Jun 24, 2024 · 4 comments
Assignees
Labels
datasource:go priority-2-high Bugs impacting wide number of users or very important features type:refactor Refactoring or improving of existing code

Comments

@rarkins
Copy link
Collaborator

rarkins commented Jun 24, 2024

Describe the proposed change(s).

Currently Containerbase defaults to /go for GOPATH, this means that installed Go modules accumulate there. Instead, we should be aiming for all managers to use cacheDir.

@rarkins rarkins added priority-2-high Bugs impacting wide number of users or very important features type:refactor Refactoring or improving of existing code datasource:go labels Jun 24, 2024
@rarkins
Copy link
Collaborator Author

rarkins commented Jun 24, 2024

Hmm:

GOPATH: await ensureCacheDir('go'),

@rarkins
Copy link
Collaborator Author

rarkins commented Jun 24, 2024

This GOPATH override doesn't seem to take effect.

A new renovate/renovate container:

ubuntu@8ca7c127dcb9:/usr/src/app$ du -sh /go/*
4.0K    /go/bin
4.0K    /go/pkg
4.0K    /go/src
ubuntu@8ca7c127dc

After running on a repo where Go PRs are created:

ubuntu@344ee60b6846:/usr/src/app$ du -sh /go/*
4.0K    /go/bin
498M    /go/pkg
4.0K    /go/src

@jamietanna
Copy link
Contributor

Interesting that we wire it in already - up until now I've been explicitly setting GOPATH in my container setup to override it to the cacheDir - it looks like we should be wiring that variable in correctly 🤔

@viceice
Copy link
Member

viceice commented Jul 22, 2024

https://github.com/containerbase/base/blob/60ada9adb2ff7b6cc5ffe97f007b8a31c6c22070/src/usr/local/containerbase/tools/v2/golang.sh#L9

this is overriding the renovate env, it will be fixed in containerbase v11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource:go priority-2-high Bugs impacting wide number of users or very important features type:refactor Refactoring or improving of existing code
Projects
None yet
Development

No branches or pull requests

3 participants