-
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
Allow optional output parameters by specifying a default value #954
Comments
This is essentially the same issue as #897. Will duplicate and target this for v2.2 |
Actually reading it closer, @gaoning777 i think we are on opposite ends of what we feel is the right behavior.
This is not ideal. For artifacts, the desired behavior is that if someone specifies an artifact path which doesn't exist, then it is considered a user error. Bug #897 is about the fact that we continue down the workflow even though the artifact path does not exist. For parameters, I think this is also the right behavior, which according to your observations, is already happening for parameters. One thing we might consider is having default values for output parameters. So if you have the following:
if /hello.json does not exist, then we would return empty string, which I think addresses your use case. |
In terms of workflow continuing when the artifact path is not found, I think it is reasonable to continue the workflow because the correctness of the whole workflow might not depend on the existence of a certain artifact. Users might simply want to output an artifact for some other purposes. Take a step back, it might make sense to make it configurable whether users want the workflow to stop if no artifacts are found. |
jessesuen@, yes I think that would solve the problem. Thanks! |
@gaoning777 reopening because if we allow default values for outputs, then it should satisfy yours and @vicaire's request. I think this is a reasonable request. |
Oh, right, this is to-be-added feature. |
This should be now doable with PR: #1277 |
hi,@jessesuen i also have a similar problem, i want to pass some failed log messages to global output, so that other container can access the log messages. i follow your advice for default value,but it still fails with “failed to save outputs: exit status 2”. the yaml snippet is as follows,waiting for your help,thanks! |
* feat: Add string comparators EqualTo and NotEqualTo Signed-off-by: Javier Salinas <jsalinaspolo@gmail.com> * Use regex for match for EqualTo or NotEqualTo in String comparator Signed-off-by: Javier Salinas <jsalinaspolo@gmail.com>
BUG REPORT
When the output resource is not generated in the container, the whole workflow failed.
For example:
When hello.json is not output in the container, the whole job is failed.
Is there anyway to tell argo to continue the workflow/output an empty string when the resource is not found. I believe the output artifact simply generates an empty tar ball when no resource is found.
Environment:
v2.1.1
Client: 1.11
Server: 1.9+
Other debugging information (if applicable):
argo get
:failed to save outputs: exit status 2
The text was updated successfully, but these errors were encountered: