Page MenuHomeSoftware Heritage

Make api_raw_extrinsic_metadata_get set Content-disposition
ClosedPublic

Authored by vlorentz on Jun 25 2021, 11:16 AM.

Details

Summary

So metadata files are always downloaded as attachment (when accessed from a browser),
and has a filename that contains the SWHID of the metadata target.

Depends on D5875.

Event Timeline

Build has FAILED

Patch application report for D5921 (id=21257)

Could not rebase; Attempt merge onto 1bd55d031e...

Updating 1bd55d03..4c845f1e
Fast-forward
 swh/web/api/urls.py                      |   1 +
 swh/web/api/views/metadata.py            | 191 +++++++++++++++++++++++++++++++
 swh/web/common/converters.py             |  20 +++-
 swh/web/tests/api/views/test_metadata.py | 139 ++++++++++++++++++++++
 swh/web/tests/api/views/test_origin.py   |  33 +-----
 swh/web/tests/api/views/utils.py         |  33 ++++++
 swh/web/tests/common/test_converters.py  |   2 +-
 7 files changed, 385 insertions(+), 34 deletions(-)
 create mode 100644 swh/web/api/views/metadata.py
 create mode 100644 swh/web/tests/api/views/test_metadata.py
 create mode 100644 swh/web/tests/api/views/utils.py
Changes applied before test
commit 4c845f1e6872976584332f5c7f08cff1fc2461a5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jun 25 11:16:22 2021 +0200

    Make api_raw_extrinsic_metadata_get set Content-disposition
    
    So metadata files are always downloaded as attachment (when accessed from a browser),
    and has a filename that contains the SWHID of the metadata target.

commit 00f08cea038d6d5e1ed6998db4ba9c61b18ec399
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jun 15 16:49:53 2021 +0200

    Add an endpoint to list and access raw extrinsic metadata.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 25 2021, 11:18 AM
Harbormaster failed remote builds in B22238: Diff 21257!

Build has FAILED

Patch application report for D5921 (id=21257)

Could not rebase; Attempt merge onto 1bd55d031e...

Updating 1bd55d03..4c845f1e
Fast-forward
 swh/web/api/urls.py                      |   1 +
 swh/web/api/views/metadata.py            | 191 +++++++++++++++++++++++++++++++
 swh/web/common/converters.py             |  20 +++-
 swh/web/tests/api/views/test_metadata.py | 139 ++++++++++++++++++++++
 swh/web/tests/api/views/test_origin.py   |  33 +-----
 swh/web/tests/api/views/utils.py         |  33 ++++++
 swh/web/tests/common/test_converters.py  |   2 +-
 7 files changed, 385 insertions(+), 34 deletions(-)
 create mode 100644 swh/web/api/views/metadata.py
 create mode 100644 swh/web/tests/api/views/test_metadata.py
 create mode 100644 swh/web/tests/api/views/utils.py
Changes applied before test
commit 4c845f1e6872976584332f5c7f08cff1fc2461a5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jun 25 11:16:22 2021 +0200

    Make api_raw_extrinsic_metadata_get set Content-disposition
    
    So metadata files are always downloaded as attachment (when accessed from a browser),
    and has a filename that contains the SWHID of the metadata target.

commit 00f08cea038d6d5e1ed6998db4ba9c61b18ec399
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jun 15 16:49:53 2021 +0200

    Add an endpoint to list and access raw extrinsic metadata.

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

Build has FAILED

Patch application report for D5921 (id=21262)

Could not rebase; Attempt merge onto 1bd55d031e...

Updating 1bd55d03..b4e21acc
Fast-forward
 requirements-swh.txt                     |   4 +-
 swh/web/api/urls.py                      |   1 +
 swh/web/api/views/metadata.py            | 191 +++++++++++++++++++++++++++++++
 swh/web/common/converters.py             |  20 +++-
 swh/web/tests/api/views/test_metadata.py | 139 ++++++++++++++++++++++
 swh/web/tests/api/views/test_origin.py   |  33 +-----
 swh/web/tests/api/views/utils.py         |  33 ++++++
 swh/web/tests/common/test_converters.py  |   2 +-
 8 files changed, 387 insertions(+), 36 deletions(-)
 create mode 100644 swh/web/api/views/metadata.py
 create mode 100644 swh/web/tests/api/views/test_metadata.py
 create mode 100644 swh/web/tests/api/views/utils.py
Changes applied before test
commit b4e21accf91f4da359c174ea0d4bc6a4fb0d749a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jun 25 11:16:22 2021 +0200

    Make api_raw_extrinsic_metadata_get set Content-disposition
    
    So metadata files are always downloaded as attachment (when accessed from a browser),
    and has a filename that contains the SWHID of the metadata target.

commit 785719a16a25bed9967c5086e781b77dc09e89f5
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jun 15 16:49:53 2021 +0200

    Add an endpoint to list and access raw extrinsic metadata.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jun 25 2021, 1:13 PM
Harbormaster failed remote builds in B22243: Diff 21262!

Build is green

Patch application report for D5921 (id=21288)

Could not rebase; Attempt merge onto f9f1e969e9...

Merge made by the 'recursive' strategy.
 requirements-swh.txt                     |   4 +-
 swh/web/api/urls.py                      |   1 +
 swh/web/api/views/metadata.py            | 191 +++++++++++++++++++++++++++++++
 swh/web/common/converters.py             |  20 +++-
 swh/web/tests/api/views/test_metadata.py | 139 ++++++++++++++++++++++
 swh/web/tests/api/views/test_origin.py   |  33 +-----
 swh/web/tests/api/views/utils.py         |  33 ++++++
 swh/web/tests/common/test_converters.py  |   2 +-
 8 files changed, 387 insertions(+), 36 deletions(-)
 create mode 100644 swh/web/api/views/metadata.py
 create mode 100644 swh/web/tests/api/views/test_metadata.py
 create mode 100644 swh/web/tests/api/views/utils.py
Changes applied before test
commit 0d8a43aa8ebb924bcff916fdcc5780c79a305685
Merge: f9f1e969 cb308cdb
Author: Jenkins user <jenkins@localhost>
Date:   Fri Jun 25 14:36:07 2021 +0000

    Merge branch 'diff-target' into HEAD

commit cb308cdbc45ec89972a692e761dbfc4bed18f6b7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jun 25 11:16:22 2021 +0200

    Make api_raw_extrinsic_metadata_get set Content-disposition
    
    So metadata files are always downloaded as attachment (when accessed from a browser),
    and has a filename that contains the SWHID of the metadata target.

commit 722ac6036890abc63cbe1ffb70e79feabebb4311
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jun 15 16:49:53 2021 +0200

    Add an endpoint to list and access raw extrinsic metadata.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/906/ for more details.

This revision is now accepted and ready to land.Jun 25 2021, 4:52 PM

0de60f0f4d8f3cd68cd703cb20fa611750185b77