gomods / gomods/athens

Inconsistency between Azure Blob Storage and other storage types

Open
#1,815 4 comments 1 reaction 1 assignee Claimed by @DrPsychick View on GitHub
enhancement
Dominant language
Go
Stars
4.8k
Forks
542
Avg merge
7d 21h
Merged PRs (30d)
2

Description

When storing packages in Azure Blob Storage, the package files are stored under `/path/to/module/@v/`
but when using other storage types (i.e disk storage), the packages are stored in `/path/to/module/$VERSION/`
this difference creates problems when trying to change the storage type by uploading an existing folders from the disk to azure

this difference is not documented anywhere (from what Ive seen),
when trying to access a package that is stored in blob storage with a disk hierarchy format you recieve 404 without any additional information, and since the logs doesnt describe which path was not found, there isnt any clear way to identify the problem.

**To Reproduce**
Steps to reproduce the behavior:
- Upload a module to blob storage manually (pre filling)
- try to access it via athens

**Expected behavior**
A clear and concise description of what you expected to happen.

Consistent path in all storage platforms, a change is required either to the azure blob storage code to store the packages in `/path/to/module/$VERSION/` or to all the other storage types to match azure pathing

**Environment (please complete the following information):**
- OS: CentOS 7
- Go version : 1.19
- Proxy version : latest ( 0.11.0 )
- Storage (fs/mongodb/s3 etc.) : azure

**Additional Information**
In addition to the difference in the path hierarchy, the file names differ as well, where in disk storage the files are stored as `$VERSION.info`, `source.zip` and `go.mod`, in azure theyre stored as `$VERSION.info` `$VERSION.mod` and `$VERSION.zip`.
I assume this difference comes from all of the versions being stored in the same folder in azure and on different folders in other storage types

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.