Page MenuHomeSoftware Heritage

api.checks: Warn when suggested fields are missing from metadata
ClosedPublic

Authored by ardumont on Feb 21 2022, 4:00 PM.

Details

Summary

This introduces a new check about the metadata provenance. While it's a suggested field,
it's definitely something that we want deposit clients to send us. So warn when it's not
the case. That does not reject the deposit but it's worth keeping that detail in the
backend.

Related to T3677
Depends on D7200

Test Plan

tox

Diff Detail

Event Timeline

Build has FAILED

Patch application report for D7209 (id=26131)

Rebasing onto 40adc8c23b...

Current branch diff-target is up to date.
Changes applied before test
commit b9749edc15f90a63c12f47e022a92eecf27161e6
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Feb 21 15:26:13 2022 +0100

    api.checks: Warn when suggested fields are missing from metadata
    
    This introduces a new check about the metadata provenance. While it's a suggested field,
    it's definitely something that we want deposit clients to send us. So warn when it's not
    the case. That does not reject the deposit but it's worth keeping that detail in the
    backend.
    
    Related to T3677

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

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 21 2022, 4:03 PM
Harbormaster failed remote builds in B27002: Diff 26131!

Rework commit and fix tests (i had forgotten to run all tests on that code ¯\_(ツ)_/¯)

Build is green

Patch application report for D7209 (id=26136)

Rebasing onto 40adc8c23b...

Current branch diff-target is up to date.
Changes applied before test
commit 339f7dd390ca8cbe8e79a77a1bc2e3c704d5f3f1
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Mon Feb 21 15:26:13 2022 +0100

    api.checks: Warn when suggested fields are missing from metadata
    
    This introduces a new check about the metadata provenance. While it's a suggested field,
    it's definitely something that we want deposit clients to send us. So warn when it's not
    the case. That does not reject the deposit but it's worth keeping that detail in the
    backend.
    
    Related to T3677

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

This revision is now accepted and ready to land.Feb 21 2022, 6:07 PM