Page MenuHomeSoftware Heritage

Fix api_raw_extrinsic_metadata_swhid-related bugs found when using the 'slow' hypothesis profile
AbandonedPublic

Authored by vlorentz on Aug 12 2021, 3:38 PM.

Details

Reviewers
None
Group Reviewers
Reviewers
Summary

Hypothesis only runs the pagination tests with a single object when using the default profile...

Test Plan

D6083 will change the default profile so these tests are actually run on the CI.

Event Timeline

Build has FAILED

Patch application report for D6081 (id=22021)

Rebasing onto 70fb9a97c5...

Current branch diff-target is up to date.
Changes applied before test
commit 851d114901f9da0b6a5c4b56e92bc799d19b2fdc
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 12 15:38:05 2021 +0200

    Actually test api_raw_extrinsic_metadata_swhid, and fix its bugs
    
    Hypothesis only ran the pagination tests with a single object...

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

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 12 2021, 3:52 PM
Harbormaster failed remote builds in B22980: Diff 22021!
vlorentz retitled this revision from Actually test api_raw_extrinsic_metadata_swhid, and fix its bugs to Fix api_raw_extrinsic_metadata_swhid-related bugs found when using the 'slow' hypothesis profile.Aug 12 2021, 5:12 PM
vlorentz edited the summary of this revision. (Show Details)
vlorentz edited the summary of this revision. (Show Details)
vlorentz edited the test plan for this revision. (Show Details)

Build has FAILED

Patch application report for D6081 (id=22026)

Rebasing onto 70fb9a97c5...

Current branch diff-target is up to date.
Changes applied before test
commit a6eac2220a73f4a6e676218f80a64788dc6d7f95
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 12 15:38:05 2021 +0200

    Fix api_raw_extrinsic_metadata_swhid-related bugs found when using the 'slow' hypothesis profile
    
    Hypothesis only runs the pagination tests with a single object when
    using the default profile...
    
    A future commit will change the default profile.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Aug 12 2021, 5:25 PM
Harbormaster failed remote builds in B22983: Diff 22026!

Build is green

Patch application report for D6081 (id=22049)

Rebasing onto c5259fce4f...

Current branch diff-target is up to date.
Changes applied before test
commit 48e9258f8d10b2983b5ff6d24900bd04c80e02b4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 12 15:38:05 2021 +0200

    Fix api_raw_extrinsic_metadata_swhid-related bugs found when using the 'slow' hypothesis profile
    
    Hypothesis only runs the pagination tests with a single object when
    using the default profile...
    
    A future commit will change the default profile.

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

anlambert added inline comments.
swh/web/api/views/metadata.py
142

I also encountered the infinite loop case when scrolling results due to same page_token over requests.
Turns out it was a bug in the scroll test as metadata generated by hypothesis were modified to use the
same authority but their ids were not recomputed as they depend on that info, fixed in D6115.

swh/web/api/views/metadata.py
142

yes, I wasted almost an entire day debugging this...

metadata = attr.evolve(metadata, id=metadata.compute_hash()) fixes it