-
Notifications
You must be signed in to change notification settings - Fork 805
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
Properly catch errors in ldflag-gathering and fail the build #5539
Conversation
The dubious-ownership issue in CI appears to be happening here too, and might be why some builds have "unknown" as their commit SHAs. Building this locally properly fails to build binaries when it cannot be gathered, and includes the data when it can: ``` VERSION: CLI feature version: 1.7.0 Release version: v1.2.7-prerelease2-dirty Build commit: 2023-12-22T20:30:21+00:00-d4d205fe3 ```
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.
LGTM with comment
hmmm
apparently there are still gaps in that. gonna hunt for a higher-level place to do it. |
much better:
gonna clean up a bit. though hmmmm. it should have failed before. checking further... |
dangit.
so we should probably just add shellcheck. |
dunno what this implies:
and going to ignore it for now. |
# that's fine, just override it if it looks like we're in buildkite. | ||
# elsewhere it's probably best to not touch this, and the path is likely wrong. | ||
if [ -n "$BUILDKITE" ]; then | ||
git config --global --add safe.directory /cadence |
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.
this is now done in the buildkite dockerfile, which appears to catch everything much more simply.
@@ -130,11 +130,11 @@ wait_for_postgres() { | |||
wait_for_es() { | |||
server=`echo $ES_SEEDS | awk -F ',' '{print $1}'` | |||
URL="http://$server:$ES_PORT" | |||
curl -s $URL 2>&1 > /dev/null | |||
curl -s $URL > /dev/null 2>&1 |
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.
TIL. I've gotta adjust my muscle memory apparently.
cadence-workflow#5539 / commit a8921b2 unfortunately has a bad bit of copypasta that changed the `cadence-server` build to make the CLI. This restores that makefile target to what it should be. tbh I'm not quite sure how this got past CI. Maybe we don't actually run the binary anywhere as part of an E2E test? It is fairly quick to notice at least though, since it causes problems quickly.
#5539 / commit a8921b2 unfortunately has a bad bit of copypasta that changed the `cadence-server` build to make the CLI. This restores that makefile target to what it should be. tbh I'm not quite sure how this got past CI. Maybe we don't actually run the binary anywhere as part of an E2E test? It is fairly quick to notice at least though, since it causes problems quickly.
The dubious-ownership issue in CI appears to be happening here too,
and might be why some builds have "unknown" as their commit SHAs.
Building this change locally properly fails to build binaries when
it cannot be gathered, and includes the data when it can:
Previously there were basically three issues at play:
safe.directory
thing, now applied everywhere rather than just one target(AFAICT) be completely undetectable elsewhere in Make.
Since fixing the "always include the version, fail build if it does not work" issue
involved discovering and fixing all three, they're all in this PR.
We should seriously consider adding shellcheck to our CI pipeline.