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

[cmd/builder] Improve module replacement for OCB #11815

Open
jackgopack4 opened this issue Dec 6, 2024 · 2 comments
Open

[cmd/builder] Improve module replacement for OCB #11815

jackgopack4 opened this issue Dec 6, 2024 · 2 comments

Comments

@jackgopack4
Copy link
Contributor

jackgopack4 commented Dec 6, 2024

Is your feature request related to a problem? Please describe.
Currently, OCB provides method for replacement of collector components using the path value and generic module replacements using the replaces yaml value.

However, if a local module replaces/imports other modules that are not available from source/GOPROXY, ocb fails to compile if each direct and implicit dependency is not specified under replaces. This can be time-consuming and would have to be done manually every time a dependency is updated that meets this condition.

Describe the solution you'd like
It would be great if ocb could respect local module's local replacements (if I import module X locally, and X has replacements for modules Y and Z, ocb should check first if the directories exist for Y and Z before trying to download from source/proxy.

Describe alternatives you've considered
Go mod does not support this natively so I am not sure there is an alternative method; the alternative is just not supporting this functionality

Alternatively we could add a flag to enable/disable this behavior if this causes unexpected outcomes for those using ocb in production, something like --recursive-local-replacements

@jackgopack4
Copy link
Contributor Author

this would be mainly useful for integration testing, building modules with ocb in pipelines with source code that has changed but not yet been published.

@jackgopack4
Copy link
Contributor Author

This has been a blocker on release prep: #11607

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant