Offline plugin compilation problem


My gateway version is 5.2.2. I tried to build a custom Go plugin and has a CI/CD workflow. Due to some reasons, my CI/CD server can not access the internet freely. So, I can not follow the build flow in the documentation where I should do the following stuff in the CI/CD server:
go get
go mod tidy

Instead, I do package vendoring (hence no need to download packages in the CI/CD server), include the vendor folder to the source code and change the entrypoint in the tyk-plugin-compiler Docker container in such a way that the build process is using -mod=vendor. The build step is successful without an internet access, but somehow when the gateway loads the plugin, I got this error:

Could not load Go-plugin" error="plugin.Open("/opt/tyk-hybrid/middleware/"): plugin was built with a different version of package (previous failure).

Any idea why this happened? What should I do?

Thanks in advance.

We can observe a similar ticket opened in our commercial support channel. We are working on trying to find a solution or workaround internally.

We assume this is related to that, if not then please let us know.