frostfs-cli object head returns objectType param as int with --json flag #1399

Closed
opened 2024-09-30 09:58:25 +00:00 by abereziny · 1 comment
Member

Expected Behavior

{
    "objectID": {
        "value": "<...>"
    },
    <...>
    "header": {
        <...>
        },
        "objectType": "TOMBSTONE", // or whatever it is
        <...>
    },
    <...>
}

Current Behavior

{
    "objectID": {
        "value": "<...>"
    },
    <...>
    "header": {
        <...>
        },
        "objectType": 1, <<< What is it??
        <...>
    },
    <...>
}

Steps to Reproduce (for bugs)

  1. Make object head with --json flag
frostfs-cli object head --rpc-endpoint '1.1.1.1:8080' --cid 'cid' --oid 'oid' --json

it works without --json flag though:

Type: TOMBSTONE

Regression

Yes

Your Environment

  • Version used: 0.42.0-157-ga5e1aa22
## Expected Behavior ``` { "objectID": { "value": "<...>" }, <...> "header": { <...> }, "objectType": "TOMBSTONE", // or whatever it is <...> }, <...> } ``` ## Current Behavior ``` { "objectID": { "value": "<...>" }, <...> "header": { <...> }, "objectType": 1, <<< What is it?? <...> }, <...> } ``` ## Steps to Reproduce (for bugs) 1. Make object head with --json flag ``` frostfs-cli object head --rpc-endpoint '1.1.1.1:8080' --cid 'cid' --oid 'oid' --json ``` it works without --json flag though: ``` Type: TOMBSTONE ``` ## Regression Yes ## Your Environment * Version used: 0.42.0-157-ga5e1aa22
abereziny added the
bug
triage
labels 2024-09-30 09:58:25 +00:00
fyrchik added this to the v0.44.0 milestone 2024-10-01 11:24:14 +00:00
fyrchik removed the
triage
label 2024-10-01 11:24:18 +00:00
fyrchik self-assigned this 2024-10-01 11:24:21 +00:00
Author
Member

Now the field objectType disappeared from output completly. Please restore the field back :)

frostfs-cli object head --json <...>

STDOUT:
{"objectID":{"value":"QDYaksVX3YeuK+XNDlFr61lEui7GHD0pUfLZQ3gFVn0="},"signature":{"key":"AkZHS8ukrcP4egudE2EZbRQYUG//mYSPEn/JrGEMPUc3","signature":"BI+Ipf6hddbTIegX9tiuPdtGGATwBIe+rvCs3pYKAkwA91j1P0f39KNr7X65JVC/pEmej9GyBe8czOVzrSQ9H2Q="},"header":{"version":{"major":2,"minor":13},"containerID":{"value":"BjgvBpkEPgA2KUIB7kdfVhpClXYFDXWIkdT9eYjck9c="},"ownerID":{"value":"NfIEGurnPZgp6zcAYENziEzZ1sfAwD+miA=="},"creationEpoch":"7","payloadLength":"1000","payloadHash":{"type":"SHA256","sum":"xrFWuvzWkRt7OlhsNFpiu3XCqawEs3gJmx1PBwX0sEY="},"sessionToken":{"body":{"id":"loCEALoSQdKOXhEgoRsKag==","ownerID":{"value":"NfIEGurnPZgp6zcAYENziEzZ1sfAwD+miA=="},"lifetime":{"exp":"17","nbf":"7","iat":"7"},"sessionKey":"AkZHS8ukrcP4egudE2EZbRQYUG//mYSPEn/JrGEMPUc3","object":{"verb":"PUT","target":{"container":{"value":"BjgvBpkEPgA2KUIB7kdfVhpClXYFDXWIkdT9eYjck9c="}}}},"signature":{"key":"A7aYTrtQSfLaHNbxQ/uu+ppSuu97wKjB1kWUOD5Vv4ns","signature":"BE6uwidXZVjTRbelLoWU2LCSK14O7qS5Anqr5w2mdad3/CgztiuK2c4oNWgQyTZdjAKE1Nqn5GOQFvcHneHUPzw="}},"attributes":[{"key":"created","value":"owner"},{"key":"FileName","value":"object-0x623d621b216c4"},{"key":"Timestamp","value":"1728252455"}]}}
Now the field objectType disappeared from output completly. Please restore the field back :) ``` frostfs-cli object head --json <...> STDOUT: {"objectID":{"value":"QDYaksVX3YeuK+XNDlFr61lEui7GHD0pUfLZQ3gFVn0="},"signature":{"key":"AkZHS8ukrcP4egudE2EZbRQYUG//mYSPEn/JrGEMPUc3","signature":"BI+Ipf6hddbTIegX9tiuPdtGGATwBIe+rvCs3pYKAkwA91j1P0f39KNr7X65JVC/pEmej9GyBe8czOVzrSQ9H2Q="},"header":{"version":{"major":2,"minor":13},"containerID":{"value":"BjgvBpkEPgA2KUIB7kdfVhpClXYFDXWIkdT9eYjck9c="},"ownerID":{"value":"NfIEGurnPZgp6zcAYENziEzZ1sfAwD+miA=="},"creationEpoch":"7","payloadLength":"1000","payloadHash":{"type":"SHA256","sum":"xrFWuvzWkRt7OlhsNFpiu3XCqawEs3gJmx1PBwX0sEY="},"sessionToken":{"body":{"id":"loCEALoSQdKOXhEgoRsKag==","ownerID":{"value":"NfIEGurnPZgp6zcAYENziEzZ1sfAwD+miA=="},"lifetime":{"exp":"17","nbf":"7","iat":"7"},"sessionKey":"AkZHS8ukrcP4egudE2EZbRQYUG//mYSPEn/JrGEMPUc3","object":{"verb":"PUT","target":{"container":{"value":"BjgvBpkEPgA2KUIB7kdfVhpClXYFDXWIkdT9eYjck9c="}}}},"signature":{"key":"A7aYTrtQSfLaHNbxQ/uu+ppSuu97wKjB1kWUOD5Vv4ns","signature":"BE6uwidXZVjTRbelLoWU2LCSK14O7qS5Anqr5w2mdad3/CgztiuK2c4oNWgQyTZdjAKE1Nqn5GOQFvcHneHUPzw="}},"attributes":[{"key":"created","value":"owner"},{"key":"FileName","value":"object-0x623d621b216c4"},{"key":"Timestamp","value":"1728252455"}]}} ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#1399
No description provided.