Details
- Reviewers
douardda - Group Reviewers
Reviewers - Commits
- rDSTO75a7f0934385: Add typing to revision_walker.py and make the state a dataclass
Diff Detail
- Repository
- rDSTO Storage manager
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 26536 Build 41502: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 41501: arc lint + arc unit
Event Timeline
Build was aborted
Patch application report for D7069 (id=25654)
Rebasing onto 4544d7ca8e...
Current branch diff-target is up to date.
Changes applied before test
commit 7c9dae2beb61267952f6b9d322bc49ad89650199 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py.
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1547/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1547/console
Build was aborted
Patch application report for D7069 (id=25654)
Rebasing onto 4544d7ca8e...
Current branch diff-target is up to date.
Changes applied before test
commit 7c9dae2beb61267952f6b9d322bc49ad89650199 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py.
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1549/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1549/console
Build is green
Patch application report for D7069 (id=25654)
Rebasing onto 4544d7ca8e...
Current branch diff-target is up to date.
Changes applied before test
commit 7c9dae2beb61267952f6b9d322bc49ad89650199 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1550/ for more details.
I see you have to always ignore the typing when manipulating self._state.revs_to_visit, would it make more sense to make it an attribute of the child classes directly?
You would need to add a get_revs_to_visit()/set_revs_to_visit() method to be able to de/serialize it, but maybe the typing would be cleaner?
swh/storage/algos/revisions_walker.py | ||
---|---|---|
298 | doubleplustype: ignore for more effect |
lgtm but as said on IRC, it's not just a type annotation diff, it does modify the code (introduce the State dataclass etc)
It could even be 2 git revisions TBH, but I would not veto this, as is, providing a better commit messsage.
Not always, only in child classes that don't use the same type as the parent
You would need to add a get_revs_to_visit()/set_revs_to_visit() method to be able to de/serialize it, but maybe the typing would be cleaner?
Actually i'll just make it an Any
Build has FAILED
Patch application report for D7069 (id=25694)
Rebasing onto 4544d7ca8e...
Current branch diff-target is up to date.
Changes applied before test
commit 916de20a360e52cd90f9e5baee8f8743847b03f8 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py and make the state a dataclass
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1551/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1551/console
Build has FAILED
Patch application report for D7069 (id=25694)
Rebasing onto 4544d7ca8e...
Current branch diff-target is up to date.
Changes applied before test
commit 916de20a360e52cd90f9e5baee8f8743847b03f8 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py and make the state a dataclass
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1553/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1553/console
Build is green
Patch application report for D7069 (id=25707)
Could not rebase; Attempt merge onto 4544d7ca8e...
Updating 4544d7ca..7c10f7a1 Fast-forward requirements-test.txt | 3 +- swh/storage/algos/revisions_walker.py | 147 ++++++++++++++++++---------------- 2 files changed, 79 insertions(+), 71 deletions(-)
Changes applied before test
commit 7c10f7a1cf57daee7b597d3ebd581d67a0db5b74 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py and make the state a dataclass commit a3a63d8d409ec04d4f1eaf98ff9ef703c2957960 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Fri Feb 4 15:01:47 2022 +0100 Require pytest to be <7.0.0
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1555/ for more details.
swh/storage/algos/revisions_walker.py | ||
---|---|---|
197 | shouldn't this be updated? |
Build is green
Patch application report for D7069 (id=25716)
Could not rebase; Attempt merge onto 4544d7ca8e...
Updating 4544d7ca..75a7f093 Fast-forward requirements-test.txt | 3 +- swh/storage/algos/revisions_walker.py | 149 ++++++++++++++++++---------------- 2 files changed, 80 insertions(+), 72 deletions(-)
Changes applied before test
commit 75a7f09343853f63270e796c95b4ecf52d4984d5 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 3 11:50:25 2022 +0100 Add typing to revision_walker.py and make the state a dataclass commit a3a63d8d409ec04d4f1eaf98ff9ef703c2957960 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Fri Feb 4 15:01:47 2022 +0100 Require pytest to be <7.0.0
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1557/ for more details.