Plugin with v2 major version

I recently refactored my HTTP Basic Auth project from a ForwardAuth server to middleware as a plugin, hosted on the plugins directory. The old project was tagged as version one, and the new plugin as version 2. I think this is causing problems with plugins.traefik.io, but I can't quite get my head around it. I first noticed errors after the plugin was published, but requests to say https://plugins.traefik.io/public/download/github.com/leonjza/trauth/v2.0.1 (which is what I think Traefik uses to download the relevant source) would fail. I read up on go module versioning and bumped my project to version 2 such that a go get github.com/leonjza/trauth/v2 now works.

I can import and use this go library externally in another project just fine. However, as a Traefik plugin things don't seem to work so well.

With the current state of things tagged as version 2.0.5, I get the following issue from the plugin analyser bot. Testing locally using the development docker-compose.yml file, I can see the v2 section trips Traefik up with the following error:

trauth-traefik-1   | time="2023-07-05T13:50:37Z" level=error msg="Plugins are disabled because an error has occurred." error="github.com/leonjza/trauth: failed to import plugin code \"github.com/leonjza/trauth/v2\": 1:21: import \"github.com/leonjza/trauth/v2\" error: unable to find source related to: \"github.com/leonjza/trauth/v2\""

Anyone got any hints for me on getting the plugin installable?

Hello,

currently the plugin system doesn't support major version (v+).

Appreciate the response! How will the plugin system behave if I revert back and tag a v1.4 release?

@ldez I tagged a version 1.4 which appears to be working fine, but the plugin in the catalog here has the old tags still. Is there any way to get that cleaned up / refreshed?

Thanks!

Nvm. All good now. Thanks!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.