Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Change imports path from weaveworks to fluxcd #2305

Merged
merged 2 commits into from
Sep 5, 2019
Merged

Conversation

stefanprodan
Copy link
Member

@stefanprodan stefanprodan commented Jul 29, 2019

Change imports path from weaveworks to fluxcd and rename go module to github.com/fluxcd/flux.

@luxas
Copy link
Contributor

luxas commented Jul 29, 2019

Thanks @stefanprodan, this was the next step after #2304 to make it consumable from the outer world

@squaremo
Copy link
Member

We need to be careful about when to make this change, since it will break builds that haven't vendored or pinned github.com/weaveworks/flux.

@luxas
Copy link
Contributor

luxas commented Jul 30, 2019

We need to be careful about when to make this change, since it will break builds that haven't vendored or pinned github.com/weaveworks/flux.

Can you expand on this? I do not understand what you mean with "haven't vendored or pinned"?

@squaremo
Copy link
Member

We need to be careful about when to make this change, since it will break builds that haven't vendored or pinned github.com/weaveworks/flux.

Can you expand on this? I do not understand what you mean with "haven't vendored or pinned"?

When the module is renamed, it won't be addressable as github.com/weaveworks/flux any more.

By "vendored" I mean added the files from github.com/weaveworks/flux into your own source tree. If you've done that, you don't care if it disappears from elsewhere.

By "pinned" I mean specified a particular version in a lockfile or in go.mod. If you've done that, the go tooling might not bother trying to fetch the module.

So in those two circumstances, downstream builds might not break, at least not immediately.

However: my idea of go mod has mostly been formed percussively, so the above is only a halfway-informed guess.

@luxas
Copy link
Contributor

luxas commented Jul 31, 2019

When the module is renamed, it won't be addressable as github.com/weaveworks/flux any more.

Are you sure? I've seen github.com/docker/docker imports being automatically redirected to moby/moby when importing, so I think github helps us here.

By "vendored" I mean added the files from github.com/weaveworks/flux into your own source tree. If you've done that, you don't care if it disappears from elsewhere.

That's true. But at the moment you can't vendor fluxcd/flux in a new project, nor upgrade as it tries to find the old weaveworks module which doesn't exist (in the right place) anymore.

By "pinned" I mean specified a particular version in a lockfile or in go.mod. If you've done that, the go tooling might not bother trying to fetch the module.

Go modules automatically pin. So nobody's stuff should automatically break (I think).
When upgrading to a new version which is fluxcd, you (obviously) need to rename the import references to fluxcd, however.

TL;DR; In the current state, nobody can vendor fluxcd/flux. Vendoring weaveworks/flux works still. Pinning is done automatically by go.mod, so nobody's deps break automatically. We should go ahead and rename this to fluxcd/flux, and I believe both names will work.

@squaremo
Copy link
Member

squaremo commented Aug 6, 2019

moby/moby doesn't use go mod (and therefore doesn't, for instance, assign itself a module name), so how it behaves is somewhat moot.

In any case: I don't believe there are many projects that depend on github.com/weaveworks/flux, and any that break outright are easily fixed.

So long as we are convinced that there are no end-user-observable differences after the module name change*, let's at least wait for 1.14.0 to be released, then give people a bit of warning via Slack and the mailing list.

*Are we convinced? My suspicions would lie with anywhere that drops type names into data, so:

  • serialisation, e.g., to events; I don't think the package name matters there, but this has burned before
  • RPC, similarly to serialisation
  • any auto-generated code

Copy link
Member

@squaremo squaremo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, on the basis that:

  • all changes are to do with the module name change (and the vast majority are changes to imports, as I'd expect)
  • grepping for weaveworks did not reveal any imports that haven't been updated and should have been
  • it still builds

Setting the working dir outside GOPATH doesn't work for the embedded templates check
@stefanprodan stefanprodan merged commit 55e5b95 into master Sep 5, 2019
@hiddeco hiddeco added this to the 1.15.0 milestone Oct 1, 2019
@2opremio 2opremio deleted the fluxcd-imports branch December 12, 2019 13:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants