Page MenuHomeSoftware Heritage

Rename metadata_raw to raw_metadata in the private API
ClosedPublic

Authored by vlorentz on Apr 7 2022, 2:34 PM.

Details

Summary

'metadata_raw' made sense, to discriminate from 'metadata_dict'; but no
longer does, now that the latter was removed.

Additionally, swh-web expects it to be named 'raw_metadata', so it
could never actually get the metadata.

Diff Detail

Repository
rDDEP Push deposit
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 28220
Build 44184: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 44183: arc lint + arc unit

Unit TestsFailed

TimeTest
639 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_deposit_private_read_metadata::test_read_metadata
authenticated_client = <rest_framework.test.APIClient object at 0x7f0a4fb35da0> deposit_collection = <DepositCollection: {'id': 113, 'name': 'test'}> partial_deposit = <Deposit: {'id': 86, 'type': 'code', 'status': 'partial', 'reception_date': datetime.datetime(2022, 4, 7, 12, 39, 8, 7...nal_id': 'some-external-id', 'origin_url': 'https://hal-test.archives-ouvertes.fr/some-external-id', 'client': 'test'}>
856 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_deposit_private_read_metadata::test_read_metadata_3
authenticated_client = <rest_framework.test.APIClient object at 0x7f0a4fc82358> deposit_collection = <DepositCollection: {'id': 115, 'name': 'test'}> partial_deposit = <Deposit: {'id': 89, 'type': 'code', 'status': 'partial', 'reception_date': datetime.datetime(2022, 4, 7, 12, 39, 10, ..., 'external_id': 'hal-01243065', 'origin_url': 'https://hal-test.archives-ouvertes.fr/hal-01243065', 'client': 'test'}>
839 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_deposit_private_read_metadata::test_read_metadata_4
authenticated_client = <rest_framework.test.APIClient object at 0x7f0a540a30f0> deposit_collection = <DepositCollection: {'id': 116, 'name': 'test'}> atom_dataset = {'codemeta-sample': '<?xml version="1.0"?>\n <entry xmlns="http://www.w3.org/2005/Atom"\n xmlns:d...ntry>\n', 'entry-data-empty-body': '<?xml version="1.0"?>\n<entry xmlns="http://www.w3.org/2005/Atom"></entry>\n', ...}
647 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_deposit_private_read_metadata::test_read_metadata_5
authenticated_client = <rest_framework.test.APIClient object at 0x7f0a541a2eb8> deposit_collection = <DepositCollection: {'id': 117, 'name': 'test'}> partial_deposit = <Deposit: {'id': 91, 'type': 'code', 'status': 'partial', 'reception_date': datetime.datetime(2022, 4, 7, 12, 39, 11, ...omplete_date': None, 'collection': 'test', 'external_id': 'external-id-partial', 'origin_url': None, 'client': 'test'}>
519 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.deposit.tests.api.test_deposit_private_read_metadata::test_read_metadata_multiple_release_notes
authenticated_client = <rest_framework.test.APIClient object at 0x7f0a54020748> deposit_collection = <DepositCollection: {'id': 119, 'name': 'test'}> partial_deposit = <Deposit: {'id': 92, 'type': 'code', 'status': 'partial', 'reception_date': datetime.datetime(2022, 4, 7, 12, 39, 13, ...nal_id': 'some-external-id', 'origin_url': 'https://hal-test.archives-ouvertes.fr/some-external-id', 'client': 'test'}>
View Full Test Results (6 Failed · 320 Passed)

Event Timeline

ardumont published this revision for review.Apr 7 2022, 2:40 PM
ardumont accepted this revision.
This revision is now accepted and ready to land.Apr 7 2022, 2:40 PM

Build has FAILED

Patch application report for D7522 (id=27289)

Rebasing onto 6d1089cb25...

Current branch diff-target is up to date.
Changes applied before test
commit 4415b647ac1f3ff4f16e4fd338f60272a0418ebc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 7 14:34:25 2022 +0200

    Rename metadata_raw to raw_metadata in the private API
    
    'metadata_raw' made sense, to discriminate from 'metadata_dict'; but no
    longer does, now that the latter was removed.
    
    Additionally, swh-web expects it to be named 'raw_metadata', so it
    could never actually get the metadata.

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

Build is green

Patch application report for D7522 (id=27290)

Rebasing onto 6d1089cb25...

Current branch diff-target is up to date.
Changes applied before test
commit 56da78d0bf3b6f45ced055d7df644542e471299c
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Apr 7 14:34:25 2022 +0200

    Rename metadata_raw to raw_metadata in the private API
    
    'metadata_raw' made sense, to discriminate from 'metadata_dict'; but no
    longer does, now that the latter was removed.
    
    Additionally, swh-web expects it to be named 'raw_metadata', so it
    could never actually get the metadata.

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