forked from cadence-workflow/cadence-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server-like
make build
and ensuring builds are clean in CI (cadence…
…-workflow#1329) There's more work to be done, but it's a major step towards forcing stability. Oddly, missing the safe.directory git setting leads to Go failing to get version info, leading to errors building, but for some reason it doesn't show the error that git's reporting (missing safe directory). Just stuff like this with no other output: ``` error obtaining VCS status: Use -buildvcs=false to disable VCS stamping. ``` Once I fixed that, I learned that `go test -exec nonexistent ./... >/dev/null` errors, but the "FAIL: command nonexistent not found" error is.... reported on stdout, so it's hidden. And so is the "FAIL the/package/name" message. But if you have a failing build, the failure *is* printed to stderr: ``` ❯ go test -exec true ./... >/dev/null # go.uber.org/cadence/evictiontest evictiontest/workflow_cache_eviction_test.go:58:4: missing ',' in composite literal ``` I have no idea why `-exec nonexistent` isn't on stderr, but I left a comment in the makefile anyway. Quite a large amount of weird stuff condensed into a seemingly simple goal.
- Loading branch information
Showing
6 changed files
with
47 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# refresh deps | ||
make tidy | ||
# regenerate, format, and make sure everything builds | ||
make build | ||
|
||
# intentionally capture stderr, so status-errors are also PR-failing. | ||
# in particular this catches "dubious ownership" failures, which otherwise | ||
# do not fail this check and the $() hides the exit code. | ||
if [ -n "$(git status --porcelain 2>&1)" ]; then | ||
echo "There file changes after applying your diff and performing a build." | ||
echo "Please run this command and commit the changes:" | ||
echo "\tmake tidy && make build" | ||
git status --porcelain | ||
git --no-pager diff | ||
exit 1 | ||
fi |