-
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
Add AutoArchiveLogs option to send all workflow pod logs to Artifact Repository #1791
Changes from all commits
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 |
---|---|---|
|
@@ -834,6 +834,9 @@ func (woc *wfOperationCtx) addArchiveLocation(pod *apiv1.Pod, tmpl *wfv1.Templat | |
break | ||
} | ||
} | ||
if woc.artifactRepository.AutoArchiveLogs != nil && *woc.artifactRepository.AutoArchiveLogs { | ||
needLocation = true | ||
} | ||
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. Hmmm, currently it's not clear that even when enabling tmpl.ArchiveLocation = &wfv1.ArtifactLocation{
ArchiveLogs: woc.artifactRepository.ArchiveLogs || woc.artifactRepository.AutoArchiveLogs,
} Or something similar 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. Agreed on clarity. I think your proposal sounds reasonable. |
||
if !needLocation { | ||
woc.log.Debugf("archive location unnecessary") | ||
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.
Maybe
ForceArchiveLogs
is more explicit?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.
How about
DefaultArchiveLogs
? This change wouldn't force logs to be archived (users explicitly setting s3/artifactory destinations in template wouldn't be covered by this).