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

golem-cli worker oplog fails with Unknown error: Exported function ... not found in component ... version 0 #1081

Closed
smndtrl opened this issue Nov 24, 2024 · 1 comment · Fixed by #1092
Assignees
Labels
bug Something isn't working
Milestone

Comments

@smndtrl
Copy link

smndtrl commented Nov 24, 2024

Could this relate to me changing the interface over the course of the component versions. I added the start function only in version 9 of the component. Is there a stable WIT requirement for a single component?

Given a component

golem-cli component get --component-name scaleway-deploy
{
  "componentUrn": "urn:component:df317772-f398-4d4a-a9fd-ed1b4b1cad74",
  "componentVersion": 9,
  "componentName": "scaleway-deploy",
  "componentSize": 592625,
  "createdAt": "2024-11-24T16:05:33.903784946Z",
  "exports": [
    "test:product/scaleway-job-deploy.{start}(scaleway: record { credentials: record { access-key: string, secret-key: string }, project-id: string, region: enum { nl-ams, fr-par, pl-waw } }, docker: record { registry: string, namespace: string, name: string, version: string }, run: record { run-id: string, space-id: string, tenant-id: string }) -> result<string, variant { generic(string) }>",
    "test:product/scaleway-job-deploy.{stop}() -> result<string, variant { generic(string) }>"
  ]
}

after invoking the function with

golem-cli worker invoke --worker urn:worker:df317772-f398-4d4a-a9fd-ed1b4b1cad74/4b5895b3-8c80-433c-8a8e-4deb5b09d7e0 \
  --function 'test:product/scaleway-job-deploy.{start}' \
  --parameters '[....]'

=> Invoked

I am not able to retrieve the oplog anymore via

golem-cli worker oplog -W urn:worker:df317772-f398-4d4a-a9fd-ed1b4b1cad74/4b5895b3-8c80-433c-8a8e-4deb5b09d7e0

with the error

Unknown error: Exported function test:product/scaleway-job-deploy.{start} not found in component df317772-f398-4d4a-a9fd-ed1b4b1cad74 version 0

I could the the initial entry in the oplog fine before invoking the function.

curl-ing v1/components/urn:uuid:df317772-f398-4d4a-a9fd-ed1b4b1cad74/workers/4b5895b3-8c80-433c-8a8e-4deb5b09d7e0/oplog?count=1 returns

{"entries":[{"entry":{"account_id":"-1","args":[],"component_size":592625,"component_version":9,"env":{},"initial_total_linear_memory_size":1245184,"parent":null,"timestamp":"2024-11-24T18:51:07.520Z","type":"Create","worker_id":{"componentId":"df317772-f398-4d4a-a9fd-ed1b4b1cad74","workerName":"4b5895b3-8c80-433c-8a8e-4deb5b09d7e0"}},"oplogIndex":1}],"firstIndexInChunk":1,"lastIndex":36,"next":{"current_component_version":0,"next_oplog_index":2}}

curl-ing v1/components/urn:uuid:df317772-f398-4d4a-a9fd-ed1b4b1cad74/workers/4b5895b3-8c80-433c-8a8e-4deb5b09d7e0/oplog?count=2 returns

{"golemError":{"details":"Exported function test:product/scaleway-job-deploy.{start} not found in component df317772-f398-4d4a-a9fd-ed1b4b1cad74 version 0","type":"Unknown"}}

Could this relate to me changing the interface over the course of the component versions. I added the start function only in version 9 of the component. Is there a stable WIT expectation for a single component?

Thanks in advance
Simon

@vigoo
Copy link
Contributor

vigoo commented Nov 24, 2024

Thanks for reporting, this is a bug. You should be always able to get the oplog of the worker, no matter if you change it's interface with updating it.

@vigoo vigoo added the bug Something isn't working label Nov 24, 2024
@vigoo vigoo self-assigned this Nov 24, 2024
@vigoo vigoo added this to the Golem 1.1 milestone Nov 25, 2024
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.

2 participants