Page MenuHomeSoftware Heritage

npm: Add test for 'author' value that used to crash
ClosedPublic

Authored by vlorentz on Sep 15 2022, 8:52 AM.

Details

Summary

It was only fixed as a side-effect of other changes, but it's good
to have a regression test

Diff Detail

Repository
rDCIDX Metadata indexer
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 D8481 (id=30540)

Could not rebase; Attempt merge onto e25a2f4e4a...

Merge made by the 'recursive' strategy.
 swh/indexer/data/Gitea.csv                         |  76 +++++++++++
 swh/indexer/metadata_dictionary/__init__.py        |  15 ++-
 swh/indexer/metadata_dictionary/base.py            | 108 ++++++++++------
 swh/indexer/metadata_dictionary/cff.py             |   5 +-
 swh/indexer/metadata_dictionary/gitea.py           | 124 ++++++++++++++++++
 swh/indexer/metadata_dictionary/github.py          |  17 ++-
 .../tests/metadata_dictionary/test_gitea.py        | 143 +++++++++++++++++++++
 .../tests/metadata_dictionary/test_github.py       |  10 +-
 swh/indexer/tests/metadata_dictionary/test_npm.py  |  14 ++
 swh/indexer/tests/test_cli.py                      |   1 +
 10 files changed, 465 insertions(+), 48 deletions(-)
 create mode 100644 swh/indexer/data/Gitea.csv
 create mode 100644 swh/indexer/metadata_dictionary/gitea.py
 create mode 100644 swh/indexer/tests/metadata_dictionary/test_gitea.py
Changes applied before test
commit 6bc97fc9371bb9af2e5af8da8e847af9d1134738
Merge: e25a2f4 a936e31
Author: Jenkins user <jenkins@localhost>
Date:   Thu Sep 15 06:52:22 2022 +0000

    Merge branch 'diff-target' into HEAD

commit a936e31786a93e2d8c63fde90d08c5bc3eb4d091
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 15 08:52:00 2022 +0200

    npm: Add test for 'author' value that used to crash
    
    It was only fixed as a side-effect of other changes, but it's good
    to have a regression test

commit 8055d0d6390364cdd6fcb73eaedf7203d7c10185
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 17:06:08 2022 +0200

    github and gitea: Use html_url as @id and clone_url as codeRepository
    
    They are closer semantics as 'html_url' is the main page of the repository,
    so it is the best to identify it; and 'clone_url' is the URL that should
    be given to 'git clone', as documented by https://schema.org/codeRepository
    
    Additionally, that property was missing so far; but a future commit will
    need to use it to identify fork relationships (node ids are required to
    representation relationships between documents as we cannot use blank
    nodes for that)

commit 9f6b75cad02745311f3d29a564b3db2d5b756af7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 13:30:54 2022 +0200

    Add Gitea metadata mapping

commit 3a3a348bd86e714ab016a93617bc197010ee145d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 12:34:22 2022 +0200

    GitHub: use correct JSON-LD types for URLs and dates

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

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 15 2022, 9:00 AM
Harbormaster failed remote builds in B31541: Diff 30540!

Build has FAILED

Patch application report for D8481 (id=30559)

Could not rebase; Attempt merge onto e25a2f4e4a...

Merge made by the 'recursive' strategy.
 swh/indexer/data/Gitea.csv                         |  76 +++++++++++
 swh/indexer/metadata_dictionary/__init__.py        |  15 ++-
 swh/indexer/metadata_dictionary/base.py            | 108 ++++++++++------
 swh/indexer/metadata_dictionary/cff.py             |   5 +-
 swh/indexer/metadata_dictionary/gitea.py           | 124 ++++++++++++++++++
 swh/indexer/metadata_dictionary/github.py          |  19 ++-
 .../tests/metadata_dictionary/test_gitea.py        | 143 +++++++++++++++++++++
 .../tests/metadata_dictionary/test_github.py       |  10 +-
 swh/indexer/tests/metadata_dictionary/test_npm.py  |  14 ++
 swh/indexer/tests/test_cli.py                      |   1 +
 swh/indexer/tests/test_metadata.py                 |   3 +-
 11 files changed, 469 insertions(+), 49 deletions(-)
 create mode 100644 swh/indexer/data/Gitea.csv
 create mode 100644 swh/indexer/metadata_dictionary/gitea.py
 create mode 100644 swh/indexer/tests/metadata_dictionary/test_gitea.py
Changes applied before test
commit d9dabd37eb5111a253c9ca2fb78c82152255150e
Merge: e25a2f4 d53d31b
Author: Jenkins user <jenkins@localhost>
Date:   Thu Sep 15 12:03:00 2022 +0000

    Merge branch 'diff-target' into HEAD

commit d53d31b719f22b7a78cd06651547efa6bd6e4b36
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 15 08:52:00 2022 +0200

    npm: Add test for 'author' value that used to crash
    
    It was only fixed as a side-effect of other changes, but it's good
    to have a regression test

commit c518541b21bfbf1dd6415a369777a57ef3430c7b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 17:06:08 2022 +0200

    github and gitea: Use html_url as @id and clone_url as codeRepository
    
    They are closer semantics as 'html_url' is the main page of the repository,
    so it is the best to identify it; and 'clone_url' is the URL that should
    be given to 'git clone', as documented by https://schema.org/codeRepository
    
    Additionally, that property was missing so far; but a future commit will
    need to use it to identify fork relationships (node ids are required to
    representation relationships between documents as we cannot use blank
    nodes for that)

commit 9f6b75cad02745311f3d29a564b3db2d5b756af7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 13:30:54 2022 +0200

    Add Gitea metadata mapping

commit 3a3a348bd86e714ab016a93617bc197010ee145d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 12:34:22 2022 +0200

    GitHub: use correct JSON-LD types for URLs and dates

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

Harbormaster returned this revision to the author for changes because remote builds failed.Sep 15 2022, 2:11 PM
Harbormaster failed remote builds in B31558: Diff 30559!

Build is green

Patch application report for D8481 (id=30599)

Could not rebase; Attempt merge onto e25a2f4e4a...

Merge made by the 'recursive' strategy.
 swh/indexer/data/Gitea.csv                         |  76 +++++++++++
 swh/indexer/metadata_dictionary/__init__.py        |  15 ++-
 swh/indexer/metadata_dictionary/base.py            | 108 ++++++++++------
 swh/indexer/metadata_dictionary/cff.py             |   5 +-
 swh/indexer/metadata_dictionary/gitea.py           | 124 ++++++++++++++++++
 swh/indexer/metadata_dictionary/github.py          |  19 ++-
 .../tests/metadata_dictionary/test_gitea.py        | 143 +++++++++++++++++++++
 .../tests/metadata_dictionary/test_github.py       |  10 +-
 swh/indexer/tests/metadata_dictionary/test_npm.py  |  14 ++
 swh/indexer/tests/test_cli.py                      |   2 +
 swh/indexer/tests/test_metadata.py                 |   3 +-
 11 files changed, 470 insertions(+), 49 deletions(-)
 create mode 100644 swh/indexer/data/Gitea.csv
 create mode 100644 swh/indexer/metadata_dictionary/gitea.py
 create mode 100644 swh/indexer/tests/metadata_dictionary/test_gitea.py
Changes applied before test
commit 77d97cdab708c282c4a0f11127cf10d8f55d6aec
Merge: e25a2f4 b57c99d
Author: Jenkins user <jenkins@localhost>
Date:   Sun Sep 18 12:18:07 2022 +0000

    Merge branch 'diff-target' into HEAD

commit b57c99dd89850dbe610669864a8ee003ef37bbc4
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 15 08:52:00 2022 +0200

    npm: Add test for 'author' value that used to crash
    
    It was only fixed as a side-effect of other changes, but it's good
    to have a regression test

commit 9d7a6a47e157d443849dc749765ecb010ba856c2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 17:06:08 2022 +0200

    github and gitea: Use html_url as @id and clone_url as codeRepository
    
    They are closer semantics as 'html_url' is the main page of the repository,
    so it is the best to identify it; and 'clone_url' is the URL that should
    be given to 'git clone', as documented by https://schema.org/codeRepository
    
    Additionally, that property was missing so far; but a future commit will
    need to use it to identify fork relationships (node ids are required to
    representation relationships between documents as we cannot use blank
    nodes for that)

commit 9f6b75cad02745311f3d29a564b3db2d5b756af7
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 13:30:54 2022 +0200

    Add Gitea metadata mapping

commit 3a3a348bd86e714ab016a93617bc197010ee145d
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 12:34:22 2022 +0200

    GitHub: use correct JSON-LD types for URLs and dates

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

This revision is now accepted and ready to land.Sep 19 2022, 10:53 AM

Build is green

Patch application report for D8481 (id=30859)

Could not rebase; Attempt merge onto e25a2f4e4a...

Updating e25a2f4..9b741f2
Fast-forward
 swh/indexer/data/Gitea.csv                         |  76 +++++++++++
 swh/indexer/metadata_dictionary/__init__.py        |  15 ++-
 swh/indexer/metadata_dictionary/base.py            | 108 ++++++++++------
 swh/indexer/metadata_dictionary/cff.py             |   5 +-
 swh/indexer/metadata_dictionary/gitea.py           | 124 ++++++++++++++++++
 swh/indexer/metadata_dictionary/github.py          |  19 ++-
 .../tests/metadata_dictionary/test_gitea.py        | 143 +++++++++++++++++++++
 .../tests/metadata_dictionary/test_github.py       |  10 +-
 swh/indexer/tests/metadata_dictionary/test_npm.py  |  14 ++
 swh/indexer/tests/test_cli.py                      |   2 +
 swh/indexer/tests/test_metadata.py                 |   3 +-
 11 files changed, 470 insertions(+), 49 deletions(-)
 create mode 100644 swh/indexer/data/Gitea.csv
 create mode 100644 swh/indexer/metadata_dictionary/gitea.py
 create mode 100644 swh/indexer/tests/metadata_dictionary/test_gitea.py
Changes applied before test
commit 9b741f2f9f336c2657a1d20196139daac3fe69b1
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Thu Sep 15 08:52:00 2022 +0200

    npm: Add test for 'author' value that used to crash
    
    It was only fixed as a side-effect of other changes, but it's good
    to have a regression test

commit ac0e263bbfc17ee2905b97bbbbbb4929419170cd
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 17:06:08 2022 +0200

    github and gitea: Use html_url as @id and clone_url as codeRepository
    
    They are closer semantics as 'html_url' is the main page of the repository,
    so it is the best to identify it; and 'clone_url' is the URL that should
    be given to 'git clone', as documented by https://schema.org/codeRepository
    
    Additionally, that property was missing so far; but a future commit will
    need to use it to identify fork relationships (node ids are required to
    representation relationships between documents as we cannot use blank
    nodes for that)

commit cb435e59ca91ac7b71cff18e5e6b3885e5be9ac1
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 13:30:54 2022 +0200

    Add Gitea metadata mapping

commit 20becf4a90fa6b626e972bba3d57db46604cb7b2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Sep 13 12:34:22 2022 +0200

    GitHub: use correct JSON-LD types for URLs and dates

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