Skip to content

Conversation

@dwhyrock
Copy link
Contributor

@dwhyrock dwhyrock commented Sep 4, 2025

What does this PR do?

The goal of this PR is to get Elastic Agent building and packaging a Windows ARM artifact.

Both Beats and Endpoint are currently producing Windows/arm64 artifacts that can be packaged.

This is producing a valid Elastic Agent build that has Agentbeat, OsQuerybeat, and Endpoint components packaged with it: https://buildkite.com/elastic/elastic-agent/builds/27828#01999b48-3d7d-424d-b2b1-aa1c97d29b09

NOTE: There is currently no CI support for Windows/arm64, so testing in CI has not been added. Also, this support for Windows/arm64 is not fully supported for customer use, so there will be no changelog added since it won't be published on the download pages until it's fully vetted/tested/etc.

This PR does the following:

  • Updates packaging step names in .buildkite/bk.integration.pipeline.yml to reflect windows architecture
  • Adding a packaging-windows-arm64 step to .buildkite/integration.pipeline.yml
  • Added windows/arm64 as a PLATFORMS list item for build-dra-snapshot-arm step in .buildkite/pipeline.elastic-agent-binary-dra.yml
  • Added windows/arm64 as a PLATFORMS list item to package-elastic-agent-arm step in .buildkite/pipeline.elastic-agent-package.yml
  • Added windows/arm64 case for crossbuilding in dev-tool/mage/crossbuild.go
  • Added windows/arm64 entries to various structs in dev-tools/mage and dev-tools/packaging
  • Added windows-arm64 as valid platforms item in dev-tools/packaging/packages.yml
  • Updated fleet-server to support all the valid platforms, except the new windows/arm64 one
  • Updated files in pkg/ to support windows/arm64 and not error out when encountering it
  • Updated specs/endpoint-security.spec.yml to not error out if windows/arm64 is the OS/arch
  • Updated magefile.go to support windows/arm64 in building and packaging logic

Why is it important?

Getting lots of demand for the ability to run on Windows OS w/ arm64 architecture.

Checklist

  • I have read and understood the pull request guidelines of this project.
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in ./changelog/fragments using the changelog tool
  • I have added an integration test or an E2E test

Disruptive User Impact

How to test this PR locally

Related issues

Questions to ask yourself

  • How are we going to support this in production?
  • How are we going to measure its adoption?
  • How are we going to debug this?
  • What are the metrics I should take care of?
  • ...

@mergify
Copy link
Contributor

mergify bot commented Sep 4, 2025

This pull request does not have a backport label. Could you fix it @dwhyrock? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-./d./d is the label that automatically backports to the 8./d branch. /d is the digit
  • backport-active-all is the label that automatically backports to all active branches.
  • backport-active-8 is the label that automatically backports to all active minor branches for the 8 major.
  • backport-active-9 is the label that automatically backports to all active minor branches for the 9 major.

@mergify
Copy link
Contributor

mergify bot commented Sep 10, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b add-endpoint-agent-windows-arm-package upstream/add-endpoint-agent-windows-arm-package
git merge upstream/main
git push upstream add-endpoint-agent-windows-arm-package

@mergify
Copy link
Contributor

mergify bot commented Sep 12, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b add-endpoint-agent-windows-arm-package upstream/add-endpoint-agent-windows-arm-package
git merge upstream/main
git push upstream add-endpoint-agent-windows-arm-package

@mergify
Copy link
Contributor

mergify bot commented Sep 14, 2025

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b add-endpoint-agent-windows-arm-package upstream/add-endpoint-agent-windows-arm-package
git merge upstream/main
git push upstream add-endpoint-agent-windows-arm-package

@dwhyrock dwhyrock mentioned this pull request Sep 30, 2025
8 tasks
@pierrehilbert pierrehilbert added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Oct 1, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@dwhyrock dwhyrock added the backport-9.2 Automated backport to the 9.2 branch label Oct 2, 2025
@dwhyrock
Copy link
Contributor Author

dwhyrock commented Oct 2, 2025

I've added the backport-9.2 label. Please let me know if that's incorrect for getting this backported to the 9.2 branch.

@michalpristas
Copy link
Contributor

we should probably run at least unit test on windows arm as well, similar to what we have for ubuntu and mac

@swiatekm
Copy link
Contributor

swiatekm commented Oct 3, 2025

I've added the backport-9.2 label. Please let me know if that's incorrect for getting this backported to the 9.2 branch.

Why do you need it in the 9.2 branch? Are there plans to publish a 9.2 patch release with support for this platform?

@dwhyrock
Copy link
Contributor Author

dwhyrock commented Oct 3, 2025

we should probably run at least unit test on windows arm as well, similar to what we have for ubuntu and mac

There is currently no support for Windows ARM in our Buildkite CI. That is being worked on by the DevFlow team, and can be added to Agent's CI once it's ready.

Why do you need it in the 9.2 branch? Are there plans to publish a 9.2 patch release with support for this platform?

It's my understanding that we want to have Agent artifacts on Windows/arm64 available in DRA builds for 9.2. Some folks may give these artifacts to select customers as a beta test, but not do a public release and not publish them on the main downloads page. cc @cmacknz @nfritts

@blakerouse
Copy link
Contributor

I am actively reviewing this PR and testing it out. I would say based on the diff, I can tell that this is not setup enough for it to work with the mage integration:test from a local machine.

@blakerouse
Copy link
Contributor

Seems that Windows arm64 support on GCP is not even provided by Microsoft as a base image to launch, making it very difficult to be used with mage integration:test. This makes me worried about supporting this until with can get actual integration testing.

@swiatekm
Copy link
Contributor

swiatekm commented Oct 3, 2025

I tested the changes locally and built the package without problems. The changes to the build system look good to me as well, and I don't mind building the package during the packaging CI step. I'm less enthused about including this target in the actual packaging pipeline. From the description, we don't need these in the DRA right now.

We don't want to ship anything to customers, even as a closed beta, without first verifying that agent integration tests pass for this target. I'd be willing to accept the packaging changes after that happens.

@cmacknz
Copy link
Member

cmacknz commented Oct 3, 2025

The agreement that we have right now is that staging or snapshot builds of this will be given to individual interested Defend customers and that this will not appear publicly available on the agent downloads page even as technical preview until we have windows/arm CI runners we can actually test against.

I am fine with the capability to build this going in to serve this purpose but there is no expectation of quality with this right now beyond "it compiled!" which while a nice step is not the ultimate definition of done.

Copy link
Contributor

@blakerouse blakerouse left a comment

Choose a reason for hiding this comment

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

Being that we are going to skip the integration tests for now for an early preview, this looks good to me.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

History

cc @dwhyrock

@cmacknz cmacknz merged commit 53d140d into main Oct 7, 2025
21 checks passed
@cmacknz cmacknz deleted the add-endpoint-agent-windows-arm-package branch October 7, 2025 17:28
mergify bot pushed a commit that referenced this pull request Oct 7, 2025
* Save current work

* add a platformpackage for windows/arm64

* Trying new image in observability-ci namespace

* Updating packages spec

* Package windows/arm64

* Update windows step keys

* Change host image for windows/arm64 packaging

* Update test and switch image settings for windows/arm

* machineType -> instanceType

* trigger a new build after container update

* trigger a new build after container update

* add go build -x

* trigger a new build after container update

* Bump version of winperfcounters to support arm

* less noise please

* set cgo_enabled for windows

* trigger a new build after container update

* trigger a new build after container update

* trigger a new build after container update

* trigger a new build after container update

* Add arm64 to allowed archs for Zip

* go mod tidy

* Build elastic-agent-archive-root for windows/arm64

* Cleaning up comments and debug logs

* Cleaning up

* Cleaning up and setting agentbeat to all platforms

* Agentbeat not yet in DRA for windows/arm64

* Beats DRA now published, so try agentbeat w/ all platforms

* Cleaning up and linting

* Temp trying new .package-version w/ windows/arm beats

* Cleaning up code

* Cleaning up log messages

* Restoring previous comment

* Adding in support for windows/arm in spec file for Endpoint

* fixing spacing

(cherry picked from commit 53d140d)
dwhyrock added a commit that referenced this pull request Oct 9, 2025
* Save current work

* add a platformpackage for windows/arm64

* Trying new image in observability-ci namespace

* Updating packages spec

* Package windows/arm64

* Update windows step keys

* Change host image for windows/arm64 packaging

* Update test and switch image settings for windows/arm

* machineType -> instanceType

* trigger a new build after container update

* trigger a new build after container update

* add go build -x

* trigger a new build after container update

* Bump version of winperfcounters to support arm

* less noise please

* set cgo_enabled for windows

* trigger a new build after container update

* trigger a new build after container update

* trigger a new build after container update

* trigger a new build after container update

* Add arm64 to allowed archs for Zip

* go mod tidy

* Build elastic-agent-archive-root for windows/arm64

* Cleaning up comments and debug logs

* Cleaning up

* Cleaning up and setting agentbeat to all platforms

* Agentbeat not yet in DRA for windows/arm64

* Beats DRA now published, so try agentbeat w/ all platforms

* Cleaning up and linting

* Temp trying new .package-version w/ windows/arm beats

* Cleaning up code

* Cleaning up log messages

* Restoring previous comment

* Adding in support for windows/arm in spec file for Endpoint

* fixing spacing

(cherry picked from commit 53d140d)

Co-authored-by: Doug W <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-9.2 Automated backport to the 9.2 branch skip-changelog Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants