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

Module updates for M1 native metricbeat build #28689

Closed
wants to merge 5 commits into from

Conversation

matschaffer
Copy link
Contributor

@matschaffer matschaffer commented Oct 28, 2021

What does this PR do?

Updates dependency versions to yield a functional native M1 metricbeat binary.

What I did here was just this:

go get -u github.com/shirou/gopsutil                                                                                                                   
go get github.com/tklauser/go-sysconf 

Since shirou/gopsutil#1042 already addresses the TARGET_OS_MAC build error I hit on master.

There may be other breakages to account for, but with this change I can at least get a functional build to work on the modules related to stack monitoring.

Why is it important?

I ended up on an M1 loaner while my i9 went in for repairs. So I did this to help make headway on elastic/kibana#113149

Checklist

  • 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.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • See what CI thinks
  • maybe merge it if green
  • ???
  • Profit

How to test this PR locally

Assuming you're on an M1 running in native mode (not rosetta terminal, arch should report arm64).

cd metricbeat
mage build
./metricbeat version

The output should show something like

metricbeat version 8.1.0 (arm64), libbeat 8.1.0 [b5b6144b131505ba666bfd6de5ca3650185a037b built 2021-10-28 05:29:05 +0000 UTC]

Related issues

Use cases

Screenshots

Logs

@matschaffer matschaffer added enhancement Team:Elastic-Agent Label for the Agent team labels Oct 28, 2021
@matschaffer matschaffer self-assigned this Oct 28, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent (Team:Elastic-Agent)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 28, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2021

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

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 28, 2021
@matschaffer matschaffer added backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify and removed backport-skip Skip notification from the automated backport with mergify labels Oct 28, 2021
@matschaffer matschaffer changed the title Module updates for M1 native metricbeat Module updates for M1 native metricbeat build Oct 28, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 28, 2021

💔 Build Failed

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

Expand to view the summary

Build stats

  • Start Time: 2021-11-09T01:04:46.403+0000

  • Duration: 18 min 49 sec

  • Commit: b7eb634

Test stats 🧪

Test Results
Failed 0
Passed 3
Skipped 0
Total 3

Steps errors 38

Expand to view the steps failures

Show only the first 10 steps failures

x-pack/metricbeat-lint - make -C x-pack/metricbeat check;make -C x-pack/metricbeat update;make -C
  • Took 3 min 19 sec . View more details here
  • Description: make -C x-pack/metricbeat check;make -C x-pack/metricbeat update;make -C metricbeat check;make -C metricbeat update;make check-no-changes;
Find files in the workspace
  • Took 0 min 0 sec . View more details here
  • Description: build/system-tests-*.tar.gz
x-pack/osquerybeat-lint - make -C x-pack/osquerybeat check;make -C x-pack/osquerybeat update;make
  • Took 1 min 24 sec . View more details here
  • Description: make -C x-pack/osquerybeat check;make -C x-pack/osquerybeat update;make check-no-changes;
Find files in the workspace
  • Took 0 min 0 sec . View more details here
  • Description: build/system-tests-*.tar.gz
x-pack/packetbeat-lint - make -C packetbeat check;make -C packetbeat update;make check-no-changes;
  • Took 2 min 39 sec . View more details here
  • Description: make -C packetbeat check;make -C packetbeat update;make check-no-changes;
Find files in the workspace
  • Took 0 min 0 sec . View more details here
  • Description: build/system-tests-*.tar.gz
x-pack/winlogbeat-lint-immutable && ubuntu-18 - make -C x-pack/winlogbeat check;make -C x-pack/winl
  • Took 2 min 7 sec . View more details here
  • Description: make -C x-pack/winlogbeat check;make -C x-pack/winlogbeat update;make -C winlogbeat check;make -C winlogbeat update;make check-no-changes;
Find files in the workspace
  • Took 0 min 0 sec . View more details here
  • Description: build/system-tests-*.tar.gz
make check-default
  • Took 2 min 43 sec . View more details here
  • Description: make check-default
Error signal
  • Took 0 min 0 sec . View more details here
  • Description: Error 'hudson.AbortException: script returned exit code 2'

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@matschaffer
Copy link
Contributor Author

/test

@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2021

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 26683-m1-native-build upstream/26683-m1-native-build
git merge upstream/master
git push upstream 26683-m1-native-build

@mergify
Copy link
Contributor

mergify bot commented Nov 3, 2021

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 26683-m1-native-build upstream/26683-m1-native-build
git merge upstream/master
git push upstream 26683-m1-native-build

@mtojek
Copy link
Contributor

mtojek commented Nov 8, 2021

/test

@matschaffer
Copy link
Contributor Author

Just noting that I won't have an M1 to test on soon. The one I had was a loaner and it should go back this week. The test failures appeared to be unrelated so I've merged upstream to see if that helps.

@matschaffer
Copy link
Contributor Author

I'll close this down since my i9 is back so I have no M1 anymore.

@matschaffer matschaffer removed their assignment Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.16.0 Automated backport with mergify backport-v8.0.0 Automated backport with mergify enhancement Team:Elastic-Agent Label for the Agent team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants