Page MenuHomeSoftware Heritage

Add support for author=None and committer=None
ClosedPublic

Authored by vlorentz on Mar 21 2022, 3:18 PM.

Details

Summary

committer=None happens on some malformed commits generated by old dgit version;
and it is possible for author=None to happen for the same reason.

Test Plan

Tests will fail because D7400 is not released yet

Diff Detail

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

Unit TestsFailed

TimeTest
37 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorageApi::test_revision_add_no_author_or_date
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7fb8aa700748> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb8aa6fcbe0>
41 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_api_client.TestStorageApi::test_revision_add_no_committer_or_date
self = <swh.storage.tests.test_api_client.TestStorageApi object at 0x7fb8aa0c8668> swh_storage = <RemoteStorage url=mock://example.com/> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb8ae4984a8>
277 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_revision_add_no_author_or_date
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb85c507160> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb85c70a908> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb89448a518>
316 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_cassandra.TestCassandraStorage::test_revision_add_no_committer_or_date
self = <swh.storage.tests.test_cassandra.TestCassandraStorage object at 0x7fb85c2b45f8> swh_storage = <swh.storage.cassandra.storage.CassandraStorage object at 0x7fb81c1442e8> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb89460d320>
90 msJenkins > .tox.py3.lib.python3.7.site-packages.swh.storage.tests.test_in_memory.TestInMemoryStorage::test_revision_add_no_author_or_date
self = <swh.storage.tests.test_in_memory.TestInMemoryStorage object at 0x7fb66cb289b0> swh_storage = <swh.storage.in_memory.InMemoryStorage object at 0x7fb8a9eb7080> sample_data = <swh.storage.tests.storage_data.StorageData object at 0x7fb66cb365c0>
View Full Test Results (10 Failed · 1,171 Passed · 40 Skipped)

Event Timeline

Build has FAILED

Patch application report for D7399 (id=26738)

Rebasing onto 98b41c8549...

Current branch diff-target is up to date.
Changes applied before test
commit 54f426d729bfa41571562da61c45698830553044
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:18:20 2022 +0100

    Add support for author=None and committer=None
    
    committer=None happens on some malformed commits generated by old dgit
    version; and it is possible for author=None to happen for the same reason.
    
    For now, this is not supported by swh-model, so tests temporarily
    disable attrs checks that swh-model relies on.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 21 2022, 3:28 PM
Harbormaster failed remote builds in B27633: Diff 26738!
vlorentz edited the test plan for this revision. (Show Details)

Build has FAILED

Patch application report for D7399 (id=26740)

Rebasing onto 98b41c8549...

Current branch diff-target is up to date.
Changes applied before test
commit aed320efc5bccc963b55357b7d646c13da5e417c
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:46:43 2022 +0100

    Remove typing workarounds for Revision.author or Revision.committer being None
    
    swh-model 6.0.0 adds proper support for them.
    
    + fix issue found by mypy

commit 052efb9701dac27dff1ec8ce11faccc874110064
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:18:20 2022 +0100

    Add support for author=None and committer=None
    
    committer=None happens on some malformed commits generated by old dgit
    version; and it is possible for author=None to happen for the same reason.
    
    For now, this is not supported by swh-model, so tests temporarily
    disable attrs checks that swh-model relies on.

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

Harbormaster returned this revision to the author for changes because remote builds failed.Mar 21 2022, 3:48 PM
Harbormaster failed remote builds in B27635: Diff 26740!
vlorentz edited the test plan for this revision. (Show Details)
olasd added a subscriber: olasd.

So, I assume this will bump the swh.model dependency to 6.0 before it lands?

This revision is now accepted and ready to land.Mar 23 2022, 10:48 AM

rebase + fix test + bump dep

Build has FAILED

Patch application report for D7399 (id=26816)

Rebasing onto 92c78ab547...

Current branch diff-target is up to date.
Changes applied before test
commit 6fdaf8a05d6955dfd53c76d0ceec9226040d9ca8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:46:43 2022 +0100

    Remove typing workarounds for Revision.author or Revision.committer being None
    
    swh-model 6.0.0 adds proper support for them.
    
    + fix issue found by mypy

commit 3eff720a0c2cabb756a4635bb107659cae3e903a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:18:20 2022 +0100

    Add support for author=None and committer=None
    
    committer=None happens on some malformed commits generated by old dgit
    version; and it is possible for author=None to happen for the same reason.
    
    For now, this is not supported by swh-model, so tests temporarily
    disable attrs checks that swh-model relies on.

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

Build has FAILED

Patch application report for D7399 (id=26816)

Rebasing onto 92c78ab547...

Current branch diff-target is up to date.
Changes applied before test
commit 6fdaf8a05d6955dfd53c76d0ceec9226040d9ca8
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:46:43 2022 +0100

    Remove typing workarounds for Revision.author or Revision.committer being None
    
    swh-model 6.0.0 adds proper support for them.
    
    + fix issue found by mypy

commit 3eff720a0c2cabb756a4635bb107659cae3e903a
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Mon Mar 21 15:18:20 2022 +0100

    Add support for author=None and committer=None
    
    committer=None happens on some malformed commits generated by old dgit
    version; and it is possible for author=None to happen for the same reason.
    
    For now, this is not supported by swh-model, so tests temporarily
    disable attrs checks that swh-model relies on.

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

This revision was landed with ongoing or failed builds.Mar 23 2022, 4:48 PM
This revision was automatically updated to reflect the committed changes.