-
Notifications
You must be signed in to change notification settings - Fork 1k
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 support for Step Summary #1642
Conversation
return false; | ||
} | ||
|
||
if (String.IsNullOrEmpty(filePath)) |
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 would combine all file exit/empty checks into a single if
and trace.
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.
@TingluoHuang I found the separate trace statements useful when testing/debugging. I guess now that I have unit tests for all of them, they might not be as useful any more. Is that what you're aiming at?
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.
we can revisit this when you inline all the methods. my main goal is to get the minimal key tracing, ex: we don't upload the summary because it's not there or empty.
* First prototype of step summary environment variable * Fix file contention issue * Try to simplify cleaning up file references * use step id as md file name, queue file attachment * separate logic into attachment summary func * Fix indentation * Add (experimental) feature flag support * reorganize summary upload determination logic * file i/o exception handling + pr feedback * Revert changes for now to reintroduce them later * Add skeleton SetStepSummaryCommand * Update step summary feature flag name * Port ShouldUploadAttachment from previous iteration * Port QueueStepSummaryUpload from previous iteration * Improve exception handling when uploading attachment * Add some minor logging improvements * Refuse to upload files larger than 128k * Implement secrets scrubbing * Add TODO comment to remove debugging temp files * Add first tests * Add test for secret masking * Add some naming/style fixes suggested in feedback * inline check for feature flag * Inline method for style consistency * Make sure that scrubbed file doesn't exist before creating it * Rename SetStepSummaryCommand to CreateStepSummaryCommand * Fix error handling messages * Fix file command name when registering extension * Remove unnecessary file deletion Co-authored-by: Rob Herley <robherley@github.com>
This is a work in progress: I'm opening this as a draft to get some feedback while figuring out how to properly test those changes.
What does this change?
The changes in this PR will generate a unique file name per step run and make it available via the
$GITHUB_STEP_SUMMARY
environment variable. After a step finished executing, the contents of the file are uploaded as an attachment.