Skip to content

Value type refactoring 2#3605

Open
vigoo wants to merge 11 commits into
mainfrom
value-type-refactoring-2
Open

Value type refactoring 2#3605
vigoo wants to merge 11 commits into
mainfrom
value-type-refactoring-2

Conversation

@vigoo
Copy link
Copy Markdown
Contributor

@vigoo vigoo commented Jun 3, 2026

Resolves #3396

This PR migrates some internal places to the new schema but leaves WIT, gRPC and REST interfaces as they were. For this reason, it temporarily introduces conversions in many places, which are going to be eliminated in the follow-up steps.

  • Agent secrets
  • AgentError payload
  • Secret and RPC host functions in the executor
  • Language-specific parsers and renderers in the CLI

@vigoo vigoo requested a review from a team June 3, 2026 09:09
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 09e2651
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a259d043bd8f700086625da

@blacksmith-sh

This comment has been minimized.

// before dispatching to the local/secret resolver so a
// mismatch never opens a durable function (secret path) nor
// touches local state.
let declaration_value_type = declaration
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason to have expected and declared type was the following:

  • declared: the type of the secret in the component at that specific point of replay (not changed after automatic updates due to this being driven by the oplog index)
  • expected: the type of the secret requested by the agent at runtime. This does change after automatic updates as the wasm trying to read the secret has changed.

So after an automatic update expected might be != declared. We can handle certain cases like new optional secrets (which is still being done), but other's as well. I didn't get around to ever doing that, but the idea behind that code shape was to do this on the fly transformation of data in resolve_local_config / resolve_secret_config

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

restored it

Copy link
Copy Markdown
Contributor

@mschuwalow mschuwalow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only had a rough look, especially for the cli parts.
But the parts I checked look good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal migrations to the new value model

2 participants