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

Allow flat interpolation #13601

Merged
merged 9 commits into from
Jun 27, 2024
Merged

Allow flat interpolation #13601

merged 9 commits into from
Jun 27, 2024

Conversation

cedric-cordenier
Copy link
Contributor

@cedric-cordenier cedric-cordenier commented Jun 18, 2024

require.NoError(t, err)
assert.Equal(t, "aValue1", responseValue.(string))
assert.Equal(t, "aValue1", mp.(map[string]any)["response"].(string))
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't get it. Where do we create this nested "response" key in the map? Is it now a requirement for every capability?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tagged you where we add the response key.

The only requirement this PR introduces is for capabilities to return a map, not just any value. I think this is preferable because a) all capabilities so far return a map anyway, and b) it's symmetric with the inputs we expect

@@ -409,8 +409,12 @@ func (t TestCapability) Execute(ctx context.Context, request commoncap.Capabilit

value := request.Inputs.Underlying["executeValue1"]

response, err := values.NewMap(map[string]any{"response": value})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@bolekk This is where we create the response value

@cedric-cordenier cedric-cordenier force-pushed the allow-flat-interpolation branch from f177173 to 31a8e13 Compare June 25, 2024 14:52
@cedric-cordenier cedric-cordenier marked this pull request as ready for review June 27, 2024 08:18
@cedric-cordenier cedric-cordenier requested a review from a team as a code owner June 27, 2024 08:18
@cedric-cordenier cedric-cordenier requested a review from a team as a code owner June 27, 2024 08:18
@cedric-cordenier cedric-cordenier requested a review from ettec June 27, 2024 08:24
ilija42
ilija42 previously approved these changes Jun 27, 2024
ettec
ettec previously approved these changes Jun 27, 2024
@cedric-cordenier cedric-cordenier added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Jun 27, 2024
@cedric-cordenier cedric-cordenier added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2024
@ilija42 ilija42 added this pull request to the merge queue Jun 27, 2024
Merged via the queue into develop with commit c3f6b70 Jun 27, 2024
114 checks passed
@ilija42 ilija42 deleted the allow-flat-interpolation branch June 27, 2024 10:40
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.

4 participants