Skip to content

schema: add stripping.line #288

@tiborsimko

Description

@tiborsimko

Current behaviour

For the LHCb ntuples, it is desirable to have a stripping line information in the metadata, for example:

    "stripping": {
      "line": "StrippingLb2LcPiLc2PKPiBeauty2CharmLine",
      "stream": "BHADRON",
      "version": "stripping21r1"
    },

See cernopendata/opendata.cern.ch#3720

This was previously uploaded to QA and led to https://opendata-qa.cern.ch/record/93949/export/json i.e. the "stripping" field was created with "stream" and "version", and the unknown "line" property was ignored.

Now, when doing local development, after the latest update to registry.cern.ch/cernopendata/cernopendata-portal:0.13.0, the file is explicitly refused from being uploaded:

$ docker exec -i -t opendatacernch-web-1 cernopendata fixtures records --mode insert-or-replace -f /content/data/records/lhcb-ntuples-hackathon.json
...
  File "/opt/invenio/var/instance/python/lib/python3.9/site-packages/opensearchpy/connection/base.py", line 315, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
opensearchpy.exceptions.RequestError: RequestError(400, 'strict_dynamic_mapping_exception', 'mapping set to strict, dynamic introduction of [line] within [stripping] is not allowed')

Desired behaviour

Let's enrich the cernopendata-portal's JSON Schema and OpenSearch mappings in order to allow "line" in the "stripping" field.

We would then need to bump up the registry.cern.ch/cernopendata/cernopendata-portal version and to update the opendata.cern.ch docker compose override accordingly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions