Open
Conversation
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
shiroyasha
commented
Feb 5, 2026
shiroyasha
commented
Feb 5, 2026
shiroyasha
commented
Feb 5, 2026
| tx *gorm.DB, | ||
| encryptor crypto.Encryptor, | ||
| orgID uuid.UUID, | ||
| ) (any, error) { |
Collaborator
Author
There was a problem hiding this comment.
Is this different than the regular one? Why?
Signed-off-by: Igor Šarčević <igor@operately.com>
Deploying superplane with
|
| Latest commit: |
2987d65
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a86473a5.superplane.pages.dev |
| Branch Preview URL: | https://secrets-in-expr.superplane.pages.dev |
shiroyasha
commented
Feb 6, 2026
pkg/workers/node_executor.go
Outdated
| resolved, err := w.resolveConfigAtRuntime(tx, execution, node, inputEvent, input, workflow) | ||
| if err != nil { | ||
| logger.Errorf("failed to resolve configuration at runtime: %v", err) | ||
| return execution.FailInTransaction(tx, models.CanvasNodeExecutionResultReasonError, fmt.Sprintf("configuration resolution failed: %v", err)) |
Collaborator
Author
There was a problem hiding this comment.
Can we simply return the error here?
shiroyasha
commented
Feb 6, 2026
pkg/workers/node_executor.go
Outdated
| inputEvent *models.CanvasEvent, | ||
| input any, | ||
| workflow *models.Canvas, | ||
| ) (map[string]any, error) { |
Collaborator
Author
There was a problem hiding this comment.
The number of args here is worrying.
shiroyasha
commented
Feb 6, 2026
|
|
||
| configuration := map[string]any{ | ||
| "api_key": `{{ secrets("my-secret").token }}`, | ||
| "mixed": `prefix {{ secrets("other").key }} suffix`, |
Collaborator
Author
There was a problem hiding this comment.
We need a test where secrets are transformed with a function.
shiroyasha
commented
Feb 6, 2026
| func resolveRuntimeValue(value any, resolveString func(string) (any, error)) (any, error) { | ||
| switch v := value.(type) { | ||
| case string: | ||
| if strings.Contains(v, "{{") && strings.Contains(v, "}}") { |
Collaborator
Author
There was a problem hiding this comment.
This is not ok, it should use the same check as the non-runtime, but negated.
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
shiroyasha
commented
Feb 6, 2026
| tree, err := parser.Parse(expression) | ||
|
|
||
| if err != nil { | ||
| // If parsing fails, fall back to a string check to ensure malformed expressions are still deferred. |
Collaborator
Author
There was a problem hiding this comment.
Questionable if this is needed.
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.