Page MenuHomeSoftware Heritage

Make test_content_add_race fail for the right reason.
ClosedPublic

Authored by vlorentz on Jan 12 2021, 12:39 PM.

Details

Summary

Since 209de5dbaa127dacd114fbbd084f22632982eb77 , it was failing because of:
TypeError("content_add() got an unexpected keyword argument 'db'")

Diff Detail

Repository
rDSTO Storage manager
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 18389
Build 28415: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 28414: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D4841 (id=17140)

Rebasing onto 2b35198d30...

First, rewinding head to replay your work on top of it...
Applying: Make test_content_add_race fail for the right reason.
Changes applied before test
commit 3cd80317b170e7d55fd1780944506febdb7ecc72
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

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

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 12 2021, 12:43 PM
Harbormaster failed remote builds in B18284: Diff 17140!

Build has FAILED

Patch application report for D4841 (id=17140)

Rebasing onto 2b35198d30...

First, rewinding head to replay your work on top of it...
Applying: Make test_content_add_race fail for the right reason.
Changes applied before test
commit 7279c62c2e708929cfd3245ff32cbee7b7d9334a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

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

Build has FAILED

Patch application report for D4841 (id=17142)

Could not rebase; Attempt merge onto 2b35198d30...

Merge made by the 'recursive' strategy.
 swh/storage/postgresql/storage.py    | 29 ++++++++++++++++-------------
 swh/storage/tests/storage_tests.py   | 13 +++++++++++--
 swh/storage/tests/test_postgresql.py |  4 ++--
 3 files changed, 29 insertions(+), 17 deletions(-)
Changes applied before test
commit 688335193282907daf7f558a8b21996e881d49a8
Merge: 2b35198d b52f30cb
Author: Jenkins user <jenkins@localhost>
Date:   Tue Jan 12 12:30:53 2021 +0000

    Merge branch 'diff-target' into HEAD

commit b52f30cb852ba3db98aaa35785befe97287d6be2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

commit c0d035ae04edfa302be808482a5e37ac67a7940b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 13:25:04 2021 +0100

    Fix compatibility with hypothesis >= 5.49.0.
    
    It errored with:
    
        the 'swh_storage' fixture, which is reset between function calls but
        not between test cases generated by `@given(...)`.

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

Build is green

Patch application report for D4841 (id=17144)

Could not rebase; Attempt merge onto 2b35198d30...

Merge made by the 'recursive' strategy.
 swh/storage/postgresql/storage.py        | 29 ++++++++++++++++-------------
 swh/storage/tests/algos/test_snapshot.py |  4 +++-
 swh/storage/tests/storage_tests.py       | 13 +++++++++++--
 swh/storage/tests/test_postgresql.py     |  4 ++--
 4 files changed, 32 insertions(+), 18 deletions(-)
Changes applied before test
commit ea5310be3780a9263fa4881fdd405c019eee70d0
Merge: 2b35198d 41b364f2
Author: Jenkins user <jenkins@localhost>
Date:   Tue Jan 12 12:40:22 2021 +0000

    Merge branch 'diff-target' into HEAD

commit 41b364f287dd2669444ce739164284d6df427da7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

commit 25429b8590438e8ca2827c1ceb1f61a70b3833f3
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 13:25:04 2021 +0100

    Fix compatibility with hypothesis >= 5.49.0.
    
    It errored with:
    
        the 'swh_storage' fixture, which is reset between function calls but
        not between test cases generated by `@given(...)`.

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

Rather than introducing a new function, we could test race conditions on _content_add_metadata directly?

In D4841#120971, @olasd wrote:

Rather than introducing a new function, we could test race conditions on _content_add_metadata directly?

(ping @vlorentz)

Build is green

Patch application report for D4841 (id=17226)

Rebasing onto 0b44b37254...

First, rewinding head to replay your work on top of it...
Applying: Make test_content_add_race fail for the right reason.
Changes applied before test
commit ac996c22e46d5acea7bd45f4001a988fd456c1c7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

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

This revision is now accepted and ready to land.Jan 14 2021, 7:16 PM
This revision was landed with ongoing or failed builds.Jan 15 2021, 11:31 AM
This revision was automatically updated to reflect the committed changes.

Build is green

Patch application report for D4841 (id=17247)

Rebasing onto 0b44b37254...

Current branch diff-target is up to date.
Changes applied before test
commit da55308f3df5cbd31bfbcd8920c12d874ceb4733
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Jan 12 12:38:33 2021 +0100

    Make test_content_add_race fail for the right reason.
    
    Since 209de5dbaa127dacd114fbbd084f22632982eb77, it was failing because of:
    TypeError("content_add() got an unexpected keyword argument 'db'")

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