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

ci: provide arm64 image build #6825

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aldy505
Copy link
Contributor

@aldy505 aldy505 commented Jan 25, 2025

Effort for getsentry/self-hosted#1585

Build result for arm64: https://github.com/getsentry/snuba/actions/runs/12960880084/job/36155350053?pr=6825

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@aldy505 aldy505 requested a review from a team as a code owner January 25, 2025 02:16
@aldy505
Copy link
Contributor Author

aldy505 commented Jan 25, 2025

cc @untitaker @BYK @hubertdeng123

Comment on lines +10 to +14
runs-on: |-
${{fromJson('{
"amd64": "ubuntu-22.04",
"arm64": "ubuntu-22.04-arm"
}')[matrix.arch] }}
Copy link
Member

Choose a reason for hiding this comment

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

🤯

Copy link
Member

Choose a reason for hiding this comment

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

if you want to see some real crazy usage of fromJson, check out what cargo-dist does. it seems that one can generate matrices programmatically, put them into job output and then reference them here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey, the credits goes to @Dav1dde lol

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Just to note, this is absolutely not necessary here, I did it this way to not have the runner show up in the generated job name in CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to note, this is absolutely not necessary here, I did it this way to not have the runner show up in the generated job name in CI.

No no, it's useful. We need to use the correct GHA runner with the corresponding arch name (amd64/arm64)

@BYK BYK requested a review from untitaker January 25, 2025 16:43
@BYK
Copy link
Member

BYK commented Jan 25, 2025

Yeah, I cannot really review this. Will leave to @untitaker

"ghcr.io/getsentry/snuba:amd64-${{ github.sha }}"

- name: Assemble Latest Image
if: github.ref_name == 'main'
Copy link
Member

Choose a reason for hiding this comment

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

our branch is called master (still)

"arm64": "ubuntu-22.04-arm"
}')[matrix.arch] }}
env:
IMG_VERSIONED: ghcr.io/getsentry/vroom:${{ matrix.arch }}-${{ github.sha }}
Copy link
Member

Choose a reason for hiding this comment

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

copypaste error, we're not vroom

- name: Assemble Latest Image
if: github.ref_name == 'main'
run: |
docker buildx imagetools create -t "ghcr.io/getsentry/snuba:latest" \
Copy link
Member

Choose a reason for hiding this comment

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

are you 100% sure that imagetools create pushes to the registry? though i don't see a --push flag avail

Copy link
Member

Choose a reason for hiding this comment

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

Yes it does, this is taken from Symbolicator and that's how it pushes its images.

@aldy505 aldy505 requested a review from untitaker January 30, 2025 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants