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

Propose migrate from dep to go modules #2384

Closed
gyliu513 opened this issue Sep 20, 2019 · 10 comments · Fixed by #2745
Closed

Propose migrate from dep to go modules #2384

gyliu513 opened this issue Sep 20, 2019 · 10 comments · Fixed by #2745

Comments

@gyliu513
Copy link
Contributor

I can see most of the go projects are now migrating from dep to go modules, like kubernetes-sigs/cluster-api#1054 etc, does installer has some plan to migrate as well?

Reference: https://blog.golang.org/migrating-to-go-modules

@sgreene570
Copy link

This is definitely an important switch, since Ignition v2.0.1 (which includes the new Ignition Spec 3) cannot be vendored with Dep. OKD 4 will be dependent on the installer having Ignition Spec 3 available in order to use FCOS.
However, the migration is not as trivial as it would seem. Current attempts at the migration are hanging on Azure problems during build (see https://github.com/vrutkovs/installer/tree/spec3-all-in-one-mod).

@abhinavdahiya
Copy link
Contributor

We want to do it, but the go.mod implementation doesn't make it easy to have multiple vendors for some internal services.

We are definitely looking into it.

@sgreene570
Copy link

Relevant Go github issue:
golang/go#33789

@DanyC97
Copy link
Contributor

DanyC97 commented Nov 12, 2019

@sgreene570 if i'm not wrong i think at the end some implementation was done based on the golang/go#33848 proposal

@gyliu513 gyliu513 mentioned this issue Dec 4, 2019
8 tasks
@LorbusChris
Copy link
Member

is there a good reason to not keep all deps in one vendor dir? Having multiple seems to call for version mismatches and the likes..

@gyliu513
Copy link
Contributor Author

gyliu513 commented Dec 4, 2019

@LorbusChris do you mean you want use multiple vendor folders but not one? I did not see such case yet.

@LorbusChris
Copy link
Member

What I want is the opposite: one vendor dir for everything

@sgreene570
Copy link

What I want is the opposite: one vendor dir for everything

There are parts of the installer using different versions of the same dependencies, so having one vendor dir would require refactoring some code (namely the azure terraform stuff). For example, azure-sdk-for-go @ v21.3.0 is used in pkg/terraform/exec (link) while v29.0.0 is used in the project root (link). While one overall version could definitely be reconciled, it will require changing some of the Azure specific code.

@LorbusChris
Copy link
Member

@sgreene570 exactly. I'm on that over in #2745 😃

@gyliu513
Copy link
Contributor Author

gyliu513 commented Dec 5, 2019

@LorbusChris I was a bit confused, after you migrate to go mod, if you run go mod vendor, you will see all dependency packages are in the folder of vendor, it is one vendor dir actually, am I missing anything?

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

Successfully merging a pull request may close this issue.

5 participants