Page MenuHomeSoftware Heritage

Update deposit through the deposit client no longer works
Closed, MigratedEdits Locked

Description

Updating a deposit in "done" state no longer works:

client side:

swh deposit upload --url https://deposit.staging.swh.network \
  --username swh \
  --password $(swhpass ls operations/deposit.softwareheritage.org/http-auth/swh | head -1) \
  --deposit-id 37 \
  --swhid swh:1:dir:2ddb1f0122c57c8479c28ba2fc973d18508e6420 \
  --metadata ../deposit-swh.update-metadata.xml

Server side (staging):

Jan 05 16:14:42 deposit python3[1392754]: 2021-01-05 16:14:42 [1392754] gunicorn.access:INFO 127.0.0.1 - swh [05/Jan/2021:16:14:42 +0000] "PUT /1/swh/37/metadata/ HTTP/1.1" 405 294 "-" "swh-deposit/0.9.1.dev2+g00d315ec.d20210105"

Which is surprising considering [1]

[1] https://forge.softwareheritage.org/source/swh-deposit/browse/master/swh/deposit/api/urls.py$45-52

Event Timeline

ardumont triaged this task as Unbreak Now! priority.Jan 5 2021, 5:20 PM
ardumont created this task.

oh no, i see, the url changed.

It's no longer "PUT /1/swh/37/metadata/" but "PUT /1/swh/37/atom/"...

ok then.

That's it:

$ swh deposit upload --url https://deposit.staging.swh.network \
  --username swh \
  --password $(swhpass ls operations/deposit.softwareheritage.org/http-auth/swh | head -1) \
  --deposit-id 37 \
  --swhid swh:1:dir:2ddb1f0122c57c8479c28ba2fc973d18508e6420 \
  --metadata ../deposit-swh.update-metadata.xml \
  --format json
{'deposit_id': '37', 'deposit_status': 'done', 'deposit_status_detail': 'The deposit has been successfully loaded into the Software Heritage archive', 'deposit_swh_id': 'swh:1:dir:2ddb1f0122c57c8479c28ba2fc973d18508e6420', 'deposit_swh_id_context': 'swh:1:dir:2ddb1f0122c57c8479c28ba2fc973d18508e6420;origin=https://www.softwareheritage.org/9c59155f-1d27-426e-a179-7ab08435d32a;visit=swh:1:snp:221f5c83a22ef3aa3aa9d6995f0538a3a4befeeb;anchor=swh:1:rev:2e6f0d0796c8743e8f447679fa96b11f0fcecd96;path=/', 'deposit_external_id': None}
ardumont changed the task status from Open to Work in Progress.Jan 5 2021, 5:31 PM
ardumont added a project: SWORD deposit.
ardumont moved this task from Backlog to In progress on the SWORD deposit board.
ardumont claimed this task.

Packaged in 0.9.1 release.
Deployed the server as well (to keep in sync the version).