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

Mismatch between module name and repository URL #394

Open
mkalcok opened this issue Feb 26, 2025 · 5 comments
Open

Mismatch between module name and repository URL #394

mkalcok opened this issue Feb 26, 2025 · 5 comments

Comments

@mkalcok
Copy link

mkalcok commented Feb 26, 2025

Since the repository was moved from ovn-org, the name of the module in go.mod does not match the repository URL. This causes go tooling to complain

> go get github.com/ovn-kubernetes/libovsdb
go: github.com/ovn-kubernetes/libovsdb@upgrade (v0.7.0) requires github.com/ovn-kubernetes/[email protected]: parsing go.mod:
        module declares its path as: github.com/ovn-org/libovsdb
                but was required as: github.com/ovn-kubernetes/libovsdb

Renaming the module in go.mod is probably not the way to go, since that would break any existing projects that still use github.com/ovn-org/libovsdb URL. But perhaps a section on top of README file could mention how to add this module as a dependency?

@dave-tucker
Copy link
Collaborator

dave-tucker commented Feb 27, 2025

Ugh yeah this is annoying. I think the plan should be:

  1. Create a fork of this repo back at github.com/ovn-org/libovsdb
  2. Add a deprecation notice to the module there using: https://go.dev/ref/mod#go-mod-file-module
  3. Archive the repo (so no future updates)
  4. Rename the module in the go.mod here

This may break the github redirects, but I think that's preferable to having go import issues.

@dave-tucker
Copy link
Collaborator

@tssurya @jcaamano is ☝ something you can help with?

@jcaamano
Copy link
Collaborator

Question:

> go get github.com/ovn-org/libovsdb

would still work right?

Not disagreeing with @dave-tucker suggestion, just want to know where we sit today.

@mkalcok
Copy link
Author

mkalcok commented Feb 27, 2025

Question:

> go get github.com/ovn-org/libovsdb

would still work right?

Not disagreeing with @dave-tucker suggestion, just want to know where we sit today.

Yes, that format still works today because github redirects old URLs when a project is moved to new account/org.

@dave-tucker
Copy link
Collaborator

Figured I'd at least explain my reasoning for proposing #394 (comment)

For the old URL github redirect will work indefinitely unless another ovn-org/libovsdb repo happens gets created, at which point all bets are off (could no longer be Go code). While this is improbable, it's not impossible. I guess you could consider this a route for a potential supply chain attack - except of course that ovn-org would need to be compromised for this to happen.

Having go get github.com/ovn-kubernetes/libovsdb broken is not ideal either especially as that's what will show up when you search for libovsdb today... and we can't change the module name without breaking existing users 😭

So while it's a bit of extra work, I think the plan I've proposed is the "cleanest" way we can rename the module AND keep things working for the old URLs.

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

3 participants