-
Notifications
You must be signed in to change notification settings - Fork 695
Change macOS version and deal with code-signing #1484
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
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.
Pull Request Overview
This PR updates the macOS CI environment and addresses code-signing issues on newer macOS versions. The changes ensure tests can run properly by conditionally using go run
instead of executing unsigned binaries.
- Updated macOS version from 13.5 to 15 for ARM64 builds
- Added conditional logic to handle code-signing requirements on newer macOS
- Modified test execution to use
go run
when code-signing is available
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
File | Description |
---|---|
.semaphore/semaphore.yml | Updated macOS machine type from 13.5 to 15 for ARM64 |
.semaphore/semaphore_commands.sh | Added conditional code-signing logic for test execution |
.semaphore/semaphore_integration_commands.sh | Added conditional code-signing logic for integration test execution |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
# If we're on newer macOS, avoid running binaries that are not code-signed, rather, use go run. | ||
# Running go-kafkacat with `go run` needs some `go get` commands, so just check existence instead. | ||
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi |
Copilot
AI
Oct 13, 2025
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 line is extremely long and difficult to read. Consider breaking it into multiple lines or using separate conditional blocks for better readability and maintainability.
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi | |
if [[ $(command -v codesign) ]]; then | |
which go-kafkacat | |
go run $GO_TAGS examples/library-version/library-version.go | |
(go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false) | |
else | |
go-kafkacat --help | |
library-version | |
(library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false) | |
fi |
Copilot uses AI. Check for mistakes.
|
||
# If we're on newer macOS, avoid running binaries that are not code-signed, rather, use go run. | ||
# Running go-kafkacat with `go run` needs some `go get` commands, so just check existence instead. | ||
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi |
Copilot
AI
Oct 13, 2025
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 line is extremely long and difficult to read. Consider breaking it into multiple lines or using separate conditional blocks for better readability and maintainability.
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi | |
if [[ $(command -v codesign) ]]; then | |
which go-kafkacat | |
go run $GO_TAGS examples/library-version/library-version.go | |
if ! go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO"; then | |
echo "Incorrect linkage, expected $EXPECT_LINK_INFO" | |
false | |
fi | |
else | |
go-kafkacat --help | |
library-version | |
if ! library-version | grep "$EXPECT_LINK_INFO"; then | |
echo "Incorrect linkage, expected $EXPECT_LINK_INFO" | |
false | |
fi | |
fi |
Copilot uses AI. Check for mistakes.
|
||
# If we're on newer macOS, avoid running binaries that are not code-signed, rather, use go run. | ||
# Running go-kafkacat with `go run` needs some `go get` commands, so just check existence instead. | ||
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi |
Copilot
AI
Oct 13, 2025
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.
The command go run examples/library-version/library-version.go
is executed twice in the same line, which is inefficient. Consider storing the output in a variable and reusing it.
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi | |
if [[ $(command -v codesign) ]]; then | |
which go-kafkacat | |
output="$(go run $GO_TAGS examples/library-version/library-version.go)" | |
echo "$output" | |
(echo "$output" | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false) | |
else | |
go-kafkacat --help | |
library-version | |
(library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false) | |
fi |
Copilot uses AI. Check for mistakes.
|
||
# If we're on newer macOS, avoid running binaries that are not code-signed, rather, use go run. | ||
# Running go-kafkacat with `go run` needs some `go get` commands, so just check existence instead. | ||
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi |
Copilot
AI
Oct 13, 2025
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.
The command go run examples/library-version/library-version.go
is executed twice in the same line, which is inefficient. Consider storing the output in a variable and reusing it.
if [[ $(command -v codesign) ]]; then which go-kafkacat; go run $GO_TAGS examples/library-version/library-version.go; (go run $GO_TAGS examples/library-version/library-version.go | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi | |
if [[ $(command -v codesign) ]]; then which go-kafkacat; output=$(go run $GO_TAGS examples/library-version/library-version.go); echo "$output"; (echo "$output" | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); else go-kafkacat --help; library-version; (library-version | grep "$EXPECT_LINK_INFO") || (echo "Incorrect linkage, expected $EXPECT_LINK_INFO" ; false); fi |
Copilot uses AI. Check for mistakes.
What
Checklist
References
JIRA:
Test & Review
Open questions / Follow-ups