quetz
quetz copied to clipboard
Upload with `--force` doesn't regenerate `repodata.json`
When uploading the same package version again (using --force
) the repodata is not generated, which can lead to SHA256 and file size mismatches.
We should properly store the new checksum & file size and regenerate the repodata.json
.
@wolfv I can't reproduce it.
Using the quetz-client
command line the repodata.json
file is modified, including SHA256 and MD5 values.
Can you give some more context to reproduce it ?
Did you upload two different files with the exact same name?
Yes, the exact same name, returning an error without the --force
flag.
I tested with the xtensor package, by adding a file in the package archive to change the resulting hash.
There are 2 different API requests that can upload a package : https://github.com/mamba-org/quetz/blob/d272e615323c7110bfb7356746e66bdaf7658eae/quetz/main.py#L1284-L1288 and https://github.com/mamba-org/quetz/blob/d272e615323c7110bfb7356746e66bdaf7658eae/quetz/main.py#L1375
The first one doesn't build the repodata.json
file at all.
This may be the error you have encountered.
we could check which one is used by the quetz-cli
that uploads packages.
The quetz-client
use by default the one which build the repodata, if only a channel name is provided.
But the full URL to the API can be provided, like the example in the README : https://github.com/mamba-org/quetz/blob/d272e615323c7110bfb7356746e66bdaf7658eae/README.md?plain=1#L80
We should fix the first API function anyway.
For sure! Thanks for working on this!
Should be fixed in https://github.com/mamba-org/quetz/pull/555 @wolfv do you still have the error ?