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

Clarify expected behavior of /@latest endpoint in fallback NetworkMode #1868

Open
ngshiheng opened this issue Apr 18, 2023 · 2 comments · May be fixed by #1676
Open

Clarify expected behavior of /@latest endpoint in fallback NetworkMode #1868

ngshiheng opened this issue Apr 18, 2023 · 2 comments · May be fixed by #1676
Labels
enhancement New feature or request

Comments

@ngshiheng
Copy link
Contributor

ngshiheng commented Apr 18, 2023

Describe the bug

When attempting to use the /@latest endpoint in fallback NetworkMode with Athens as a Go module proxy, a 404 error is returned instead of retrieving the latest version from Athens' storage when VCS fails.

curl http://localhost:3000/gitlab.company.net/foo/bar/baz/@latest

# Athens server log

INFO[4:21PM]: incoming request  http-method=GET http-path=gitlab.company.net/foo/bar/baz/@latest http-status=404 request-id=4a40eff5-6aa8-4914-b4ba-89a9d0904b5e

Expected behavior

I would expect Athens to retrieve the latest version from its storage when the /@latest endpoint is called in fallback NetworkMode (to provide the best effort of giving the user what is available at the time of requesting versions) in the case when the VCS fails.

Environment (please complete the following information):

  • OS: osx/arm64
  • Go version: 1.19
  • Proxy version: v0.12.0
  • Storage (fs/mongodb/s3 etc.): s3

If this behavior is unintended, I would be happy to submit a pull request to help fix it. Please let me know if this is something that can be addressed or if you need any additional information from me.

@ionrover2
Copy link

This is absolutely crucial for me. I'm working in an entirely offline environment that does not have direct access to ANY sources. We have to move everything to an airgapped network.

While i can specify a specific version of the module sometimes i do need to use latest like when configuring VScode, the extension calls latest and fails because it cannot get the list. Even if this is not an intended behavior, having the option to enable it would be amazing.

@matt0x6F
Copy link
Contributor

I think this issue correlates to #1676.

@matt0x6F matt0x6F added the enhancement New feature or request label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants