Skip to content

WIP: (GONRG-1838) GCP cannot retrieve a record with space

There is a core issue with record IDs that contain encrypted space symbols (%20):

Create record RQ:

curl --location --request PUT 'https://os-storage-attcrcktoa-uc.a.run.app/api/storage/v2/records' \
--header 'Data-Partition-ID: osdu' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '[{
  "id": "osdu:work-product-component--WellboreMarkerSet:Some%20Text",
  ...
}]'

Get record RQ:

curl --location --request GET 'https://os-storage-attcrcktoa-uc.a.run.app/api/storage/v2/records/osdu:work-product-component--WellboreMarkerSet:Some%20Text' \
--header 'Data-Partition-ID: osdu' \
--header 'Authorization: Bearer <token>'

Get record RS:

{
    "code": 400,
    "reason": "Validation error.",
    "message": "getLatestRecordVersion.id: Not a valid record id. Found: osdu:work-product-component--WellboreMarkerSet:Some Text"
}

Expected Result

  1. I should be able to retrieve it by ID that was used during record creation

Actual Result 2. Its not possible to retrieve the record after

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [NO]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM
  • Core

Does this introduce a breaking change?

  • [NO]

What is the current behavior?

It is impossible to retrieve record from the Storage service

What is the new/expected behavior?

It is possible to retrieve record from the Storage service

Have you added/updated Unit Tests and Integration Tests?

  • [NO]
Edited by Dmitriy Rudko

Merge request reports

Loading