Skip to content

Fix cleanup in critest#7232

Merged
fuweid merged 1 commit intocontainerd:mainfrom
mxpv:ci-logs
Jul 29, 2022
Merged

Fix cleanup in critest#7232
fuweid merged 1 commit intocontainerd:mainfrom
mxpv:ci-logs

Conversation

@mxpv
Copy link
Copy Markdown
Member

@mxpv mxpv commented Jul 29, 2022

In Github Actions run jobs end on first non-zero exit code.
This means that the code like this:

sudo -E PATH=$PATH critest --report-dir "${{github.workspace}}/critestreport" --runtime-endpoint=unix:///${BDIR}/c.sock --parallel=8
...
test $TEST_RC -ne 0 && cat ${BDIR}/containerd-cri.log

will never produce logs if critest fails.

This change uses trap to properly clean resources and cat containerd logs.
Here is an output examples when job fails before and after applying this fix.

Signed-off-by: Maksym Pavlenko <[email protected]>
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM

@fuweid fuweid merged commit 4d395bf into containerd:main Jul 29, 2022
@mxpv mxpv deleted the ci-logs branch July 29, 2022 23:06
@mxpv mxpv added cherry-picked/1.5.x PR commits are cherry-picked into release/1.5 branch cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch and removed cherry-pick/1.5.x labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/1.5.x PR commits are cherry-picked into release/1.5 branch cherry-picked/1.6.x PR commits are cherry-picked into release/1.6 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants