-
Notifications
You must be signed in to change notification settings - Fork 20
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
initial draft for pulumi supporting mulitple providers #26
Conversation
Would you mind checking if there is an option not to vendor those dependencies but to pull them during runtime? |
Hi @lmilbaum vendor folder is not required but I think it is considered a good practice with golang. Each point of view about it could be arguable ...you can see it just with a quick search on the topic. If you check the size of the project it is not big, as the vendor folder is holding the source code not any compiled bits required on runtime, actually the vendor is used on build time and if vendor is not included the dependencies are directly downloaded.So thinking long term if we decide to go with golang structure the vendor would probably be included here. Also after build the crc-cloud binary is all self contained (from a code dependencies point of view) it is a single "portable" executable |
My previous comment is a bit inaccurate. What I meant is to download the dependencies during build time if they weren't downloaded before. go supports a lock file mechanism where you list your dependencies with pinned versions. If I am not mistaken then the files are: go.mod and go.sum. |
Hey @lmilbaum yeah I mean I came from java world so you just use you pom to define dependencies ..vendoring as you mention could be considered as an anti-pattern, but in regard to golang (I have been coding with it just couple of years and vendoring here seems a debatable option) If you check some repos podman, kubernetes, tekton ... all of them hold the vendor folder, some other do not, like asw-sdk, terraform so as I said before at least on go this is something arguable On the other hand I was no aware of this Renovate I guess you mean this renovate-go so thx it seems super useful to at least point you to newer versions with PRs. But as I can see from doc this is also supports vendoring aswell. Also checking some of those repos I share I found some of them use something similar within gh actions with [dependabot] so really appreciate your comment to put me in this direction 👏 |
The The vendor dir has its use in disconnected build environments (RH's brew for example), and in case the repository for some of its dependencies would disappear, which sometimes happen, see https://github.com/openshift/oc/blob/9c5b183b3e692e58fd91b4b23bb7314819822865/go.mod#L188 For crc-cloud, I would keep the vendor dir, CI safeguards can be added to make sure it has the expected content. |
2b0627b
to
1c5254c
Compare
We have pushed those changes to |
Fix #8