For now this does nothing as RawExtrinsicMetadata has no 'id' field,
but the equality assertions will become errors when the next version
of swh.model is released.
Details
- Reviewers
anlambert - Group Reviewers
Reviewers - Commits
- rDSTO23887483a8d4: storage_tests: recompute ids when evolving RawExtrinsicMetadata objects.
Diff Detail
- Repository
- rDSTO Storage manager
- Branch
- swhid
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 19530 Build 30300: Phabricator diff pipeline on jenkins Jenkins console · Jenkins Build 30299: arc lint + arc unit
Event Timeline
Build is green
Patch application report for D5009 (id=17879)
Rebasing onto 9a9f234e0a...
Current branch diff-target is up to date.
Changes applied before test
commit 508399ce2abf21f813acc9c56422cbbccca0ae3d Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 4 13:59:09 2021 +0100 storage_tests: recompute ids when evolving RawExtrinsicMetadata objects. For now this does nothing as RawExtrinsicMetadata has no 'id' field, but the equality assertions will become errors when the next version of swh.model is released.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1119/ for more details.
Build was aborted
Patch application report for D5009 (id=17959)
Rebasing onto efd8815b89...
Current branch diff-target is up to date.
Changes applied before test
commit 75939e4f9b02e130224a90929eb3ed2ba0730592 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 4 13:59:09 2021 +0100 storage_tests: recompute ids when evolving RawExtrinsicMetadata objects. For now this does nothing as RawExtrinsicMetadata has no 'id' field, but the equality assertions will become errors when the next version of swh.model is released. commit b0383833fe240d9400f683d177ec3d5eef8ec1d6 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 4 14:29:38 2021 +0100 postgresql: Fix dbversion() to return the max version instead of a random one.
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1142/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1142/console
(probably needs a rebase)
swh/storage/postgresql/db.py | ||
---|---|---|
1352 ↗ | (On Diff #17959) | That's in another diff which i think you landed since then... |
Wouldn't it make sense to add an evolved(**kwargs) method to our BaseModel objects (or an evolve function in swh.model.model) to wrap this operation?
The duplication of **remove_keys(blahblah, ("id",)) is a bit jarring, and using attr.evolve() on an object with a computed id is probably almost never the right thing to do anyway.
what operation?
You can't use evolve to remove the id, and it can't be set to None, so I don't understand what you want to do instead of remove_keys
Build was aborted
Patch application report for D5009 (id=17990)
Rebasing onto b0383833fe...
Current branch diff-target is up to date.
Changes applied before test
commit 75939e4f9b02e130224a90929eb3ed2ba0730592 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 4 13:59:09 2021 +0100 storage_tests: recompute ids when evolving RawExtrinsicMetadata objects. For now this does nothing as RawExtrinsicMetadata has no 'id' field, but the equality assertions will become errors when the next version of swh.model is released.
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1147/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1147/console
Build is green
Patch application report for D5009 (id=18450)
Rebasing onto f3ef6e6a5a...
Current branch diff-target is up to date.
Changes applied before test
commit 23887483a8d40512163d53098f8c3ee514d8e4e5 Author: Valentin Lorentz <vlorentz@softwareheritage.org> Date: Thu Feb 4 13:59:09 2021 +0100 storage_tests: recompute ids when evolving RawExtrinsicMetadata objects. For now this does nothing as RawExtrinsicMetadata has no 'id' field, but the equality assertions will become errors when the next version of swh.model is released.
See https://jenkins.softwareheritage.org/job/DSTO/job/tests-on-diff/1159/ for more details.