-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Fixed: failed to save outputs: verify serviceaccount default:default has necessary privileges #1362
Changes from 12 commits
00f08b1
e7ac42a
d956bfc
be9b3b5
0d15503
d967df3
4c9b645
c40cc5f
51e2d5f
8713b45
471ff0a
afdf279
479d3e4
27845e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package commands | ||
|
||
import ( | ||
"github.com/argoproj/argo/errors" | ||
"time" | ||
|
||
"github.com/argoproj/pkg/stats" | ||
|
@@ -31,40 +32,41 @@ func waitContainer() error { | |
// Wait for main container to complete | ||
err := wfExecutor.Wait() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
|
||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to wait for main container to complete ")) | ||
// do not return here so we can still try to kill sidecars & save outputs | ||
} | ||
err = wfExecutor.KillSidecars() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container kill failed")) | ||
// do not return here so we can still try save outputs | ||
} | ||
logArt, err := wfExecutor.SaveLogs() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to save the logs")) | ||
return err | ||
} | ||
// Saving output parameters | ||
err = wfExecutor.SaveParameters() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to save the parameters")) | ||
return err | ||
} | ||
// Saving output artifacts | ||
err = wfExecutor.SaveArtifacts() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to save the artifacts")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to wrap errors coming from our own libraries. |
||
return err | ||
} | ||
// Capture output script result | ||
err = wfExecutor.CaptureScriptResult() | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to capture the script results")) | ||
return err | ||
} | ||
err = wfExecutor.AnnotateOutputs(logArt) | ||
if err != nil { | ||
wfExecutor.AddError(err) | ||
wfExecutor.AddError(errors.Wrap(err, errors.CodeInternal, " Wait container failed to annotate the outputs")) | ||
return err | ||
} | ||
return nil | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,7 +180,7 @@ func (we *WorkflowExecutor) LoadArtifacts() error { | |
if art.Mode != nil { | ||
err = os.Chmod(artPath, os.FileMode(*art.Mode)) | ||
if err != nil { | ||
return errors.InternalWrapError(err) | ||
return errors.InternalWrapError(err, "Container failed to load the artifacts") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave original code |
||
} | ||
} | ||
} | ||
|
@@ -205,7 +205,7 @@ func (we *WorkflowExecutor) StageFiles() error { | |
} | ||
err := ioutil.WriteFile(filePath, body, 0644) | ||
if err != nil { | ||
return errors.InternalWrapError(err) | ||
return errors.InternalWrapError(err, "Container failed to load the stage files") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please leave original code |
||
} | ||
return nil | ||
} | ||
|
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.
No need to wrap errors in our own libraries.