Page MenuHomeSoftware Heritage

moderation: Maybe fix deposit url access to metadata
AbandonedPublicDraft

Authored by ardumont on Apr 8 2022, 12:05 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Maniphest Tasks
T4125: Deploy deposit v1.0
Summary

Related to T4125

Test Plan

in staging:

# initial log seen from the server coming from the staging webapp
Apr 08 08:44:34 deposit python3[2575354]: 2022-04-08 08:44:34 [2575354] gunicorn.access:INFO 127.0.0.1 - - [08/Apr/2022:08:44:34 +0000] "GET /1/private/1059/meta HTTP/1.1" 301 0 "-" "python-requests/2.25.1"
Apr 08 08:44:34 deposit python3[2575346]: 2022-04-08 08:44:34 [2575346] gunicorn.access:INFO 127.0.0.1 - - [08/Apr/2022:08:44:34 +0000] "GET /1/private/1058/meta HTTP/1.1" 301 0 "-" "python-requests/2.25.1"
# tryout to check the behavior
ardumont@deposit:~% curl -u $user:$pass https://deposit-rp.internal.staging.swh.network/1/private/4/meta  # <- does nothing (301)
ardumont@deposit:~% curl -u $user:$pass https://deposit-rp.internal.staging.swh.network/1/private/4/meta/  # displays stuff
{"origin": {"type": "deposit", "url": "https://www.softwareheritage.org/79c8c06b-3e50-4153-809b-83a5dec290d0"}, "provider": {"provider_name": "swh", "provider_url": "https://www.softwareheritage.org", "provider_type": "deposit_client", "metadata": {}}, "tool": {"name": "swh-deposit", "version": "1.0.1", "configuration": {"sword_version": "2"}}, "raw_metadata": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<entry xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:codemeta=\"https://doi.org/10.5063/SCHEMA/CODEMETA-2.0\">\n\t<codemeta:identifier>79c8c06b-3e50-4153-809b-83a5dec290d0</codemeta:identifier>\n\t<atom:updated>2020-11-12 13:17:43.519231+00:00</atom:updated>\n\t<atom:author>swh</atom:author>\n\t<atom:title>test-project</atom:title>\n\t<codemeta:name>test-project</codemeta:name>\n\t<codemeta:author>\n\t\t<codemeta:name>@ardumont</codemeta:name>\n\t</codemeta:author>\n</entry>", "deposit": {"id": 4, "client": "swh", "collection": "swh", "author": {"name": "Software Heritage", "fullname": "Software Heritage", "email": "robot@softwareheritage.org"}, "author_date": {"timestamp": {"seconds": 1605186964, "microseconds": 878062}, "offset": 0}, "committer": {"name": "Software Heritage", "fullname": "Software Heritage", "email": "robot@softwareheritage.org"}, "committer_date": {"timestamp": {"seconds": 1605186964, "microseconds": 878062}, "offset": 0}, "revision_parents": [], "release_notes": null}}%
# or `curl -L`

Diff Detail

Repository
rDWAPPS Web applications
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 28253
Build 44232: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 44231: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D7533 (id=27321)

Rebasing onto bdee9fe46e...

Current branch diff-target is up to date.
Changes applied before test
commit d382c05799e556bf197ff3bf2a6498e3c6089eba
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Fri Apr 8 12:03:25 2022 +0200

    Fix deposit url access
    
    Related to T4125

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1700/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1700/console

Harbormaster returned this revision to the author for changes because remote builds failed.Apr 8 2022, 12:07 PM
Harbormaster failed remote builds in B28253: Diff 27321!

I do not think that it is needed as requests will handle the redirection automatically.

@anlambert do you have time to look into the problem of the metadata that isn't shown on staging?
If not, we will wait for @vlorentz on Monday.

I do not think that it is needed as requests will handle the redirection automatically.

yeah right, ok, because requests (used by the webapp) already follows redirect.
I had forgotten about that.

ardumont edited the test plan for this revision. (Show Details)
ardumont edited the summary of this revision. (Show Details)
ardumont retitled this revision from moderation: Fix deposit url access to metadata to moderation: Maybe fix deposit url access to metadata.