Page MenuHomeSoftware Heritage

Add typing, and fix potential issues found by mypy.
ClosedPublic

Authored by vlorentz on Aug 5 2021, 12:40 PM.

Diff Detail

Repository
rDVAU Software Heritage Vault
Branch
gitbare-snapshot
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22886
Build 35691: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 35690: arc lint + arc unit

Event Timeline

Build has FAILED

Patch application report for D6057 (id=21918)

Could not rebase; Attempt merge onto a5054749dd...

Updating a505474..13d9247
Fast-forward
 requirements-swh.txt          |  2 +-
 swh/vault/cookers/base.py     | 10 ++++---
 swh/vault/cookers/git_bare.py | 65 ++++++++++++++++++++++++++++++-------------
 3 files changed, 53 insertions(+), 24 deletions(-)
Changes applied before test
commit 13d9247bf19378bdaf4929fc857f5babffec489b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 5 12:39:26 2021 +0200

    Add typing, and fix potential issues found by mypy.

commit 3c524f63772bebe3464af2299b34d8196f7f35a7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 30 16:56:39 2021 +0200

    Don't hide git-fsck errort messages, even when none is expected

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

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

Build is green

Patch application report for D6057 (id=21923)

Could not rebase; Attempt merge onto a5054749dd...

Updating a505474..e61a249
Fast-forward
 requirements-swh.txt          |  2 +-
 swh/vault/cookers/base.py     | 10 +++---
 swh/vault/cookers/git_bare.py | 71 +++++++++++++++++++++++++++++++------------
 3 files changed, 58 insertions(+), 25 deletions(-)
Changes applied before test
commit e61a2494d41874140e47ec02844802b3123f945d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 5 12:39:26 2021 +0200

    Add typing, and fix potential issues found by mypy.

commit b290a199fcfdd9c0211f8e5dd79b63b368663473
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 30 16:56:39 2021 +0200

    Don't hide git-fsck error messages, even when none is expected

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

ardumont added inline comments.
requirements-swh.txt
1

other entries do not have it.

swh/vault/cookers/git_bare.py
30

it's not only typing changes here, ain't it?

366–372

i found the following clearer.

swh/vault/cookers/git_bare.py
368

logger.warning instead?

You don't stop the process so i'm not sure error qualifies.

lgtm, I mostly have readability suggestions inline.

swh/vault/cookers/git_bare.py
411–417

expliciting the type of entries_it might help.

This revision is now accepted and ready to land.Aug 5 2021, 3:22 PM
vlorentz marked 4 inline comments as done.

apply comments

Build is green

Patch application report for D6057 (id=21926)

Could not rebase; Attempt merge onto a5054749dd...

Updating a505474..8065b39
Fast-forward
 requirements-swh.txt          |  2 +-
 swh/vault/cookers/base.py     | 10 +++---
 swh/vault/cookers/git_bare.py | 71 +++++++++++++++++++++++++++++++------------
 3 files changed, 59 insertions(+), 24 deletions(-)
Changes applied before test
commit 8065b392967e4932f3e33e51ab604d6957ad4723
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Aug 5 12:39:26 2021 +0200

    Add typing, and fix potential issues found by mypy.

commit b290a199fcfdd9c0211f8e5dd79b63b368663473
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Jul 30 16:56:39 2021 +0200

    Don't hide git-fsck error messages, even when none is expected

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