-
Notifications
You must be signed in to change notification settings - Fork 22
Fix broken test and report CI failing correctly #207
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Toshikuni Fukaya <[email protected]>
LGTM |
Could someone review this? |
Could some one take a look at this PR? It's a small PR and we can't detect some CI failures without applying it. |
@@ -86,8 +90,9 @@ linters(){ | |||
ci-checks(){ | |||
echo "-------- beginning preflight checks" | |||
lint | |||
test | |||
build | |||
test || RET=$? |
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.
perhaps safer to define local RET=0
in all those functions instead of setting a global var?
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.
Yeah, It is preferable. I'll fix them
) | ||
return $? |
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.
It looks like the goal here is to try to build every pkg, even when 1 or more fails. But the err returned is for the last failure only. Perhaps we should fail on the 1st build error, or return a list of error strings of a format like: "$p: $?". What do you think?
Same comment for test() below.
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.
My intention is to report the build status to CI.
If use fail-fast manner, it is sufficient for the purpose, however, it breaks current behavior which tries to build all packages.
I don't want to change the behavior because some tools may depend on such behavior.
And I personally prefer that all build error is reported.
For 2nd suggestion, it is not effective, IMO.
The script already does echo for package names, and Go also reports which package fails.
Because the script
hack/go.sh ci-checks
does not report its failure by the exit code, we can not notice a CI failure.This fixes the issue and also fixes found broken tests.
Signed-off-by: Toshikuni Fukaya [email protected]