GoCenter supports serving dynamic non SemVer versions like branch names and commit hashes. However, Artifactory seems not to be able to handle those versions metadata (.info) as mutable information that needs to be checked for changes on the upstream.
How to reproduce
- Create remote Go repo pointing to GoCenter
- Set the remote Metadata Retrieval Cache Period to 0 to disable caching the metadata locally
- Create a virtual Go repo containing the virtual repo
- Create a Go project on GitHub
- Point your GOPROXY environment variable to the virtual repo
- Fetch the module master branch by running
go get github.com/<org>/<repo>@<master>
- Push a change to the module master branch on Github
- Wait 10 min for the GoCenter cache to expire
- Fetch the module master branch again using the same go get command
Expected result
The go.mod file should contain a pseudoversion pointing to the latest commit hash pushed during the steps above
Actual results
The go.mod file contains a pseudoversion poiting to the previous commit hash in the master branch since Artifactory keeps serving the cached master.info content