Page MenuHomeSoftware Heritage

Fix a couple of issues since changes in swh-model and es module typing
ClosedPublic

Authored by anlambert on Sep 28 2021, 3:34 PM.

Details

Summary

Recent changes in swh-model broke some tests of swh-search.

Also elasticsearch Python module updated its typing and new mypy errors appeared.

That diff compiles four commits fixing those issues in order for Jenkins CI to pass.

Diff Detail

Repository
rDSEA Archive search
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D6366 (id=23140)

Rebasing onto e59807b5c7...

Current branch diff-target is up to date.
Changes applied before test
commit 8176f2e67e3a30b9862ff81cb787af8eec65b0c7
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:25:46 2021 +0200

    elasticsearch: Remove unused origin_dump method
    
    mypy started to detect an error in that function implementation
    and it is used nowhere in swh codebase so better removing it.

commit f5fc8840577417874e221c287f300df52b3f2c88
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:23:33 2021 +0200

    elasticsearch: Fix mypy errors
    
    Python elasticsearch module forbids use of positional arguments in
    its latest release (7.15.0) in favor of keyword arguments only.

commit d02d4e9816d9c0854eddb0d9f6e7088f17f038bb
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:02:42 2021 +0200

    search: Remove use of deprecated origin_identifier function
    
    Since rDMODf56becc196ed6dd4b211c97096654c4400b047ec, an error is
    raised when calling that function with a dict containing unexpected
    keys.
    
    So use recommended way to get origin identifier since the function
    deprecation.

commit 0a0832596768818955481d0cf6f409a07f9b4cf2
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:29:08 2021 +0200

    test_journal_client: Fix invalid import
    
    Side effect of rDMOD57ae405d312879bec19107d29a20c2c290d7861d

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

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 28 2021, 3:35 PM
Harbormaster failed remote builds in B24053: Diff 23140!

Build is green

Patch application report for D6366 (id=23140)

Rebasing onto e59807b5c7...

Current branch diff-target is up to date.
Changes applied before test
commit 8176f2e67e3a30b9862ff81cb787af8eec65b0c7
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:25:46 2021 +0200

    elasticsearch: Remove unused origin_dump method
    
    mypy started to detect an error in that function implementation
    and it is used nowhere in swh codebase so better removing it.

commit f5fc8840577417874e221c287f300df52b3f2c88
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:23:33 2021 +0200

    elasticsearch: Fix mypy errors
    
    Python elasticsearch module forbids use of positional arguments in
    its latest release (7.15.0) in favor of keyword arguments only.

commit d02d4e9816d9c0854eddb0d9f6e7088f17f038bb
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:02:42 2021 +0200

    search: Remove use of deprecated origin_identifier function
    
    Since rDMODf56becc196ed6dd4b211c97096654c4400b047ec, an error is
    raised when calling that function with a dict containing unexpected
    keys.
    
    So use recommended way to get origin identifier since the function
    deprecation.

commit 0a0832596768818955481d0cf6f409a07f9b4cf2
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Sep 28 15:29:08 2021 +0200

    test_journal_client: Fix invalid import
    
    Side effect of rDMOD57ae405d312879bec19107d29a20c2c290d7861d

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

This revision is now accepted and ready to land.Sep 28 2021, 5:36 PM