Page MenuHomeSoftware Heritage

search: Ensure CodeMeta dates are properly formatted
ClosedPublic

Authored by anlambert on Oct 26 2021, 4:54 PM.

Details

Summary

Some date values that can be found in codemeta.json files (dateCreated,
dateModified, datePublished) might be in a format not parsable by
elasticsearch which prevents successfull update of origin intrinsic
metadata in elasticsearch indices.

For instance, the date 2021-7-23 cannot be parsed by elasticsearch
as it expects 2021-07-23 instead.

So ensure to properly format CodeMeta dates to avoid such indexing
errors.

This fixes the following sentry reported issue.

Diff Detail

Repository
rDSEA Archive search
Branch
codemeta-ensure-date-format
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 24702
Build 38551: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 38550: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6553 (id=23815)

Rebasing onto f8385df402...

Current branch diff-target is up to date.
Changes applied before test
commit beae023e66b40126a6a076cf90c4769c706e419a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 26 16:43:47 2021 +0200

    search: Ensure CodeMeta dates are properly formatted
    
    Some date values that can be found in codemeta.json files (dateCreated,
    dateModified, datePublished) might be in a format not parsable by
    elasticsearch which prevents successfull update of origin intrinsic
    metadata in elasticsearch indices.
    
    For instance, the date 2021-7-23 cannot be parsed by elasticsearch
    as it expects 2021-07-23 instead.
    
    So ensure to properly format CodeMeta dates to avoid such indexing
    errors.

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

This revision is now accepted and ready to land.Oct 26 2021, 5:03 PM

Build is green

Patch application report for D6553 (id=23816)

Rebasing onto f8385df402...

Current branch diff-target is up to date.
Changes applied before test
commit edb812ab4d831dfddda03d5f871d9a2f5d58b5c1
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Tue Oct 26 16:43:47 2021 +0200

    search: Ensure CodeMeta dates are properly formatted
    
    Some date values that can be found in codemeta.json files (dateCreated,
    dateModified, datePublished) might be in a format not parsable by
    elasticsearch which prevents successfull update of origin intrinsic
    metadata in elasticsearch indices.
    
    For instance, the date 2021-7-23 cannot be parsed by elasticsearch
    as it expects 2021-07-23 instead.
    
    So ensure to properly format CodeMeta dates to avoid such indexing
    errors.

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