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

Disable CGO in cloudbeat binary #2253

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Conversation

moukoublen
Copy link
Member

Summary of your changes

Screenshot/Data

Related Issues

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary README/documentation (if appropriate)

Introducing a new rule?

@moukoublen moukoublen requested a review from a team as a code owner June 3, 2024 15:37
Copy link

mergify bot commented Jun 3, 2024

This pull request does not have a backport label. Could you fix it @moukoublen? 🙏
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 8./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip label Jun 3, 2024
Copy link
Collaborator

@orouz orouz left a comment

Choose a reason for hiding this comment

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

🫡

Copy link

github-actions bot commented Jun 3, 2024

📊 Allure Report - 💚 No failures were reported.

Result Count
🟥 Failed 0
🟩 Passed 359
⬜ Skipped 33

@moukoublen moukoublen merged commit 0aa3c2c into elastic:main Jun 3, 2024
24 checks passed
@moukoublen moukoublen deleted the disable_cgo branch June 3, 2024 18:46
@moukoublen
Copy link
Member Author

moukoublen commented Jun 4, 2024

Comparison of sizes

Before cgo disablement

$ du -h build/golang-crossbuild/*
287M    build/golang-crossbuild/cloudbeat-linux-amd64
276M    build/golang-crossbuild/cloudbeat-linux-arm64

After cgo disablement

$ docker run \
  --rm --interactive --tty \
  --platform linux/arm64 \
  --entrypoint /bin/bash \
  docker.elastic.co/elastic-agent/elastic-agent-complete:8.15.0-SNAPSHOT \
    -c 'du -h $(dirname $(readlink $(which elastic-agent)))/components/cloudbeat'
    
208M	/usr/share/elastic-agent/data/elastic-agent-fa8549/components/cloudbeat
docker run \
  --rm --interactive --tty \
  --platform linux/amd64 \
  --entrypoint /bin/bash \
  docker.elastic.co/elastic-agent/elastic-agent-complete:8.15.0-SNAPSHOT \
    -c 'du -h $(dirname $(readlink $(which elastic-agent)))/components/cloudbeat'

218M	/usr/share/elastic-agent/data/elastic-agent-fa8549/components/cloudbeat
amd64: 287M => 218M
arm64: 276M => 208M

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants