Skip to content
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

fix: Force PLATFORMS environment variable when we build Elastic Agent dependencies on arm64 #26415

Merged
merged 5 commits into from
Jun 30, 2021

Conversation

kuisathaverat
Copy link
Contributor

@kuisathaverat kuisathaverat commented Jun 22, 2021

What does this PR do?

It forces the PALFORMS env var when we build the Elastic Agent beats dependencies in an arm64 host.

Why is it important?

The current code tries to build amd64 packages in ARM architecture, we only support cross-compile for all architectures on amd64 machines. This causes that the mage package fails when you make it on an ARM host. The change in this PR build only amd64 binary dependencies in arm64.

Checklist

  • My code follows the style guidelines of this project
  • [ X 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

  • Launch a ubuntu-18.04/amd64 VM

  • Enter on x-pack/elastic-agent

  • Run mage package

  • It will build filebeat, metricbeat, heartbeat, and elastic-agent

  • Launch a ubuntu-18.04/arm64 VM

  • Enter on x-pack/elastic-agent

  • Run mage package

  • It will build Elastic-Agent only

Related issues

Use cases

Screenshots

Logs

@kuisathaverat kuisathaverat self-assigned this Jun 22, 2021
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 22, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 22, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: kuisathaverat commented: /test

  • Start Time: 2021-06-28T18:06:13.508+0000

  • Duration: 55 min 11 sec

  • Commit: 39273d5

Test stats 🧪

Test Results
Failed 0
Passed 871
Skipped 2
Total 873

Trends 🧪

Image of Build Times

Image of Tests

💚 Flaky test report

Tests succeeded.

Expand to view the summary

Test stats 🧪

Test Results
Failed 0
Passed 871
Skipped 2
Total 873

@kuisathaverat
Copy link
Contributor Author

Greeeeeeen!!!!!

Screenshot 2021-06-23 at 12 14 01

@kuisathaverat kuisathaverat changed the title fix: build elastic agent dependencies on the architecture you are run… fix: Force PLATFORMS environment variable when we build Elastic Agent dependencies on arm64 Jun 23, 2021
Copy link
Member

@v1v v1v left a comment

Choose a reason for hiding this comment

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

+1

@jsoriano jsoriano added the Team:Automation Label for the Observability productivity team label Jun 24, 2021
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 24, 2021
@kuisathaverat kuisathaverat requested a review from urso June 28, 2021 10:57
@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat kuisathaverat added the Team:Elastic-Agent Label for the Agent team label Jun 29, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/agent (Team:Agent)

@kuisathaverat kuisathaverat added backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify labels Jun 30, 2021
@kuisathaverat kuisathaverat merged commit 5488dcf into elastic:master Jun 30, 2021
mergify bot pushed a commit that referenced this pull request Jun 30, 2021
… dependencies on arm64 (#26415)

* fix: build elastic agent dependencies on the architecture you are running

* fix: format

* fix: build ARM on ARM

* fix: format

* chore: backup the platforms env var

(cherry picked from commit 5488dcf)
mergify bot pushed a commit that referenced this pull request Jun 30, 2021
… dependencies on arm64 (#26415)

* fix: build elastic agent dependencies on the architecture you are running

* fix: format

* fix: build ARM on ARM

* fix: format

* chore: backup the platforms env var

(cherry picked from commit 5488dcf)
mdelapenya added a commit to mdelapenya/beats that referenced this pull request Jun 30, 2021
* master: (25 commits)
  fix: Force PLATFORMS environment variable when we build Elastic Agent dependencies on arm64 (elastic#26415)
  macos for metricbeat to run in the extended meta-stage (elastic#26573)
  Packaging: add arm7 platform in the main pipeline (elastic#26575)
  [Heartbeat] Skip flakey timer queue test (elastic#26592)
  Update to "read_pipeline" permission (elastic#26465) (elastic#26580)
  API keys do not reflect the need for read_pipeline (elastic#26466) (elastic#26582)
  Add Fleet agent.id to Agent monitoring data (elastic#26548)
  Add kinesis metricset (elastic#25989)
  Refactor of system/memory metricset (elastic#26334)
  Introduce httpcommon package in libbeat (add support for Proxy) (elastic#25219)
  [Filebeat] change multiline configuration in awss3 input to parsers (elastic#25873)
  docs: Hint for the error "Error extracting container id" (elastic#25824)
  [Docs] Fixed metricbeat redis exported field CPU descriptions (elastic#25846) (elastic#26496)
  Update urllib to 1.26.5. (elastic#26380)
  Update golang.org/x/crypto (elastic#26448)
  [Filebeat] Update Fortinet Ingest Pipeline (elastic#24816)
  Move parsers outside of filestream input so others can use them as well (elastic#26541)
  [Filebeat] Fix `threatintel.indicator.url.full` field not populating (elastic#26508)
  [Filebeat] Add network direction processor to Zeek and Suricata modules (elastic#24620)
  Logging code cleanup related to Nomad auto-discovery (elastic#26498)
  ...
kuisathaverat added a commit that referenced this pull request Jun 30, 2021
… dependencies on arm64 (#26415) (#26602)

* fix: build elastic agent dependencies on the architecture you are running

* fix: format

* fix: build ARM on ARM

* fix: format

* chore: backup the platforms env var

(cherry picked from commit 5488dcf)

Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
kuisathaverat added a commit that referenced this pull request Jun 30, 2021
… dependencies on arm64 (#26415) (#26603)

* fix: build elastic agent dependencies on the architecture you are running

* fix: format

* fix: build ARM on ARM

* fix: format

* chore: backup the platforms env var

(cherry picked from commit 5488dcf)

Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify Team:Automation Label for the Observability productivity team Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Elastic Agent ARM package are failling
7 participants