Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api/v1/log/entries/retrieve by UUID doesn't return entries in inactive shards #899

Closed
var-sdk opened this issue Jul 1, 2022 · 0 comments · Fixed by #905
Closed

api/v1/log/entries/retrieve by UUID doesn't return entries in inactive shards #899

var-sdk opened this issue Jul 1, 2022 · 0 comments · Fixed by #905
Labels
bug Something isn't working

Comments

@var-sdk
Copy link

var-sdk commented Jul 1, 2022

Repros in staging where the log was sharded after 460 entries:

# get last entry from inactive shard
$ curl -s -H "Accept: application/json" "https://rekor.sigstage.dev/api/v1/log/entries?logIndex=460" | jq -r
{
  "e387dd1ab5b1a4a4d1ce158e8199f4dc75401ced7684415ed9482da1bbc3f9a5": {
     ...
  }
}

# get by UUID for same entry works
$ curl -s -H "Accept: application/json" "https://rekor.sigstage.dev/api/v1/log/entries/e387dd1ab5b1a4a4d1ce158e8199f4dc75401ced7684415ed9482da1bbc3f9a5" | jq -r
{
  "e387dd1ab5b1a4a4d1ce158e8199f4dc75401ced7684415ed9482da1bbc3f9a5": {
     ...
  }
}

# retrieve by UUID is empty
$ curl -s -H "Content-Type: application/json" --data '{"entryUUIDs": ["e387dd1ab5b1a4a4d1ce158e8199f4dc75401ced7684415ed9482da1bbc3f9a5"]}'  "https://rekor.sigstage.dev/api/v1/log/entries/retrieve" | jq
[]

Compare to the active shard:

# get first entry of active shard
$ curl -s -H "Accept: application/json" "https://rekor.sigstage.dev/api/v1/log/entries?logIndex=461" | jq -r
{
  "735e2592d9a5120b5e51fa5a1c7015534d0168442a85676cd72a7f69312ed378": {
    ...
  }
}

# get by UUID works
$ curl -s -H "Accept: application/json" "https://rekor.sigstage.dev/api/v1/log/entries/735e2592d9a5120b5e51fa5a1c7015534d0168442a85676cd72a7f69312ed378" | jq -r
{
  "735e2592d9a5120b5e51fa5a1c7015534d0168442a85676cd72a7f69312ed378": {
    ...
  }
}

# retrieve by UUID works
$ curl -s -H "Content-Type: application/json" --data '{"entryUUIDs": ["735e2592d9a5120b5e51fa5a1c7015534d0168442a85676cd72a7f69312ed378"]}'  "https://rekor.sigstage.dev/api/v1/log/entries/retrieve" | jq
[
  {
    "735e2592d9a5120b5e51fa5a1c7015534d0168442a85676cd72a7f69312ed378": {
    ...
  }
]

cc @priyawadhwa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant