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 install on Mac OS to ensure that the /usr/local/bin exists #2490

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Apr 12, 2023

What does this PR do?

Ensures that the /usr/local/bin directory exists on Mac OS before it places the /usr/local/bin/elastic-agent symlink.

Why is it important?

On a fresh installation of Mac OS the /usr/local/bin doesn't exist causing the install subcommand to fail to complete installation.

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/fragments using the changelog tool
  • [ ] I have added an integration test or an E2E test

Related issues

@blakerouse blakerouse added the backport-v8.7.0 Automated backport with mergify label Apr 12, 2023
@blakerouse blakerouse self-assigned this Apr 12, 2023
@blakerouse blakerouse marked this pull request as ready for review April 12, 2023 14:52
@blakerouse blakerouse requested a review from a team as a code owner April 12, 2023 14:52
@blakerouse blakerouse requested review from AndersonQ and pchila and removed request for a team April 12, 2023 14:52
@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 12, 2023

💚 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 preview

Expand to view the summary

Build stats

  • Start Time: 2023-04-12T15:04:26.616+0000

  • Duration: 18 min 11 sec

Test stats 🧪

Test Results
Failed 0
Passed 5451
Skipped 23
Total 5474

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

  • /package : Generate the packages.

  • run integration tests : Run the Elastic Agent Integration tests.

  • run end-to-end tests : Generate the packages and run the E2E Tests.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@ycombinator ycombinator left a comment

Choose a reason for hiding this comment

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

Left a nitpick but LGTM.

@elasticmachine
Copy link
Contributor

elasticmachine commented Apr 12, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 98.507% (66/67) 👍
Files 69.432% (159/229) 👍
Classes 68.65% (300/437) 👍
Methods 54.14% (922/1703) 👍
Lines 39.318% (10361/26352) 👎 -0.019
Conditionals 100.0% (0/0) 💚

@pierrehilbert pierrehilbert added the bug Something isn't working label Apr 12, 2023
@blakerouse
Copy link
Contributor Author

I was able to test this on freshly deployed M1 mac on AWS. Installation worked successfully, both with the /usr/local/bin present before the install and also not-present before the installation.

@blakerouse blakerouse merged commit f9bc516 into elastic:main Apr 12, 2023
mergify bot pushed a commit that referenced this pull request Apr 12, 2023
* Fix install on Mac OS to ensure that the /usr/local/bin exists.

* Add changelog.

* Fix changelog. More DRY for install.

(cherry picked from commit f9bc516)
@blakerouse blakerouse deleted the fix-2487 branch April 12, 2023 19:48
blakerouse added a commit that referenced this pull request Apr 13, 2023
#2494)

* Fix install on Mac OS to ensure that the /usr/local/bin exists.

* Add changelog.

* Fix changelog. More DRY for install.

(cherry picked from commit f9bc516)

Co-authored-by: Blake Rouse <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.7.0 Automated backport with mergify bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MAC]: Unable to install agents on MAC hardware.
4 participants