Skip to content

WIP: tests: use onebranch amd64 runner for go build tasks#587

Draft
bfjelds wants to merge 1 commit into
mainfrom
user/bfjelds/use-default-runner-for-go-build-tasks
Draft

WIP: tests: use onebranch amd64 runner for go build tasks#587
bfjelds wants to merge 1 commit into
mainfrom
user/bfjelds/use-default-runner-for-go-build-tasks

Conversation

@bfjelds

@bfjelds bfjelds commented Apr 2, 2026

Copy link
Copy Markdown
Member

🔍 Description

We are currently using our own hosted pool for go builds. This leads to issues when onebranch decides to change things. It is better to use the default test runner if possible.

@bfjelds bfjelds requested a review from a team as a code owner April 2, 2026 15:53
Copilot AI review requested due to automatic review settings April 2, 2026 15:53
@bfjelds

bfjelds commented Apr 2, 2026

Copy link
Copy Markdown
Member Author

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 CI and local build behavior to stop relying on a custom hosted amd64 pool for Go build tasks and instead use the default OneBranch Linux runner, while also adjusting installer tool builds for Azure Linux environments.

Changes:

  • Switch amd64 pipeline jobs to rely on the default OneBranch Linux pool by removing explicit name / hostArchitecture settings.
  • Update Makefile installer tool builds to use GOEXPERIMENT=ms_nocgo_opensslcrypto when running on Azure Linux, otherwise continue using CGO_ENABLED=0.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
Makefile Adds Azure Linux detection to toggle Go build environment variables for installer tool binaries.
.pipelines/templates/stages/building_tools/building-tools.yml Removes explicit amd64 pool selection to use the default Linux runner for building Go tools.
.pipelines/templates/stages/azl_installer/build-installer-tools.yml Removes explicit amd64 pool selection to use the default Linux runner for installer tool builds.

Comment thread Makefile
Comment on lines +503 to +507
if cat /etc/os-release | grep -i azurelinux >/dev/null 2>&1; then \
GOEXPERIMENT=ms_nocgo_opensslcrypto go build -o $(CURDIR)/$(INSTALLER_OUT_DIR)/liveinstaller; \
else \
CGO_ENABLED=0 go build -o $(CURDIR)/$(INSTALLER_OUT_DIR)/liveinstaller; \
fi

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

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

The OS detection pipeline uses cat /etc/os-release | grep ... but only redirects grep’s output; if /etc/os-release is missing (e.g., non-Linux dev env), cat will still emit an error to stderr, adding noisy/confusing output to this target.
Suggestion: avoid cat and run grep directly against the file (and/or redirect file-read errors) so the check is quiet when the file doesn’t exist.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines +514 to +518
if cat /etc/os-release | grep -i azurelinux >/dev/null 2>&1; then \
GOEXPERIMENT=ms_nocgo_opensslcrypto go build -o $(CURDIR)/$(INSTALLER_OUT_DIR)/attendedinstaller-simulator attendedinstaller_simulator.go; \
else \
CGO_ENABLED=0 go build -o $(CURDIR)/$(INSTALLER_OUT_DIR)/attendedinstaller-simulator attendedinstaller_simulator.go; \
fi

Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

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

Same issue as above: the /etc/os-release check will still print cat errors to stderr if the file is absent because only grep output is redirected.
Suggestion: use grep -qi ... /etc/os-release 2>/dev/null (or similar) to keep this check quiet outside Azure Linux.

Copilot uses AI. Check for mistakes.
Comment thread Makefile
Comment on lines +519 to 520


Copilot AI Apr 2, 2026

Copy link

Choose a reason for hiding this comment

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

There’s trailing whitespace / an extra blank indented line here, which can create noisy diffs and fails some whitespace linters.
Suggestion: remove the trailing tab/whitespace on this blank line.

Suggested change

Copilot uses AI. Check for mistakes.
@bfjelds bfjelds marked this pull request as draft April 2, 2026 16:49
@bfjelds bfjelds changed the title tests: use onebranch amd64 runner for go build tasks WIP: tests: use onebranch amd64 runner for go build tasks Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants