-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix: cannot access HTTP template's outputs #7200
Conversation
Signed-off-by: book987 <book78987book@gmail.com>
🥇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@book987 Can you fix the lint issue? |
looks like lint job is timing out, if this passes lint locally, it probably is transient problem |
I think we need to increase the lint timeout: Line 4 in 57d894c
This could be fixed in this PR. |
Lint passed, I also increase timeout to 8m in this PR. |
Test failure:
|
Signed-off-by: book987 <book78987book@gmail.com>
Hi, this e2e test passed on my laptop, I need some help 😢 Is there any way we can get the full workflow yaml?
|
I wonder if test is not using executor image built? |
You're right, I found this in agent's log, it still put the result in https://github.com/argoproj/argo-workflows/runs/4208211529?check_suite_focus=true#step:15:3186 |
That's is odd. This works fine for other builds. I wonder if it fails on forks? |
Ok. So HTTP templates are run by the agent. Perhaps the agent does not have correct pull policy. |
Agent does not respect pull policy:
Can you please fix that in this PR too? |
Signed-off-by: book987 <book78987book@gmail.com>
awesome! fixed. |
test/e2e/testdata/http-outputs.yaml
Outdated
kind: Workflow | ||
metadata: | ||
generateName: http-outputs- | ||
labels: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please delete all the labels, not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
deleted
@@ -133,7 +134,7 @@ func (ae *AgentExecutor) executeHTTPTemplate(ctx context.Context, tmpl wfv1.Temp | |||
return nil, err | |||
} | |||
outputs := &wfv1.Outputs{} | |||
outputs.Parameters = append(outputs.Parameters, wfv1.Parameter{Name: "result", Value: wfv1.AnyStringPtr(response)}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarabala1979 is this a problem?
Signed-off-by: book987 <book78987book@gmail.com>
Hi, could you please take another look @alexec @sarabala1979 |
I've requested @sarabala1979 thoughts on this. Bala - can you please add to you TODO list? |
@@ -133,7 +134,7 @@ func (ae *AgentExecutor) executeHTTPTemplate(ctx context.Context, tmpl wfv1.Temp | |||
return nil, err | |||
} | |||
outputs := &wfv1.Outputs{} | |||
outputs.Parameters = append(outputs.Parameters, wfv1.Parameter{Name: "result", Value: wfv1.AnyStringPtr(response)}) | |||
outputs.Result = pointer.StringPtr(response) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is breaking change. it may break existing workflows. Please revert it. We did as a parameter so downline step can refer to it. But now it is too late to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've try access HTTP template's output with steps and getting same error Internal Server Error: templates.main.steps failed to resolve {{steps.good.outputs.parameters.result}}
, in v3.2.3 and v3.2.4. So looks like no one can use it's output in downline step currently. So this isn't a breaking change I think.
I rarely use steps, if I tested it in wrong way pls forgive me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is breaking change. it may break existing workflows. Please revert it. We did as a parameter so the downline step can refer to it. But now it is too late to change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But need sync with master.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
sync completed. |
@alexec Looks like it needs another review from you |
Signed-off-by: book987 <book78987book@gmail.com>
fix #7199
Signed-off-by: book987 book87987book@gmail.com
Don't bother creating a PR until you've done this:
make pre-commit -B
to fix codegen, lint, and commit message problems.Create your PR as a draft.
does not need to pass.
Tips: