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

feat: Add os and arch to the meta.* data sent #200

Merged
merged 1 commit into from
Jul 17, 2023
Merged

Conversation

ismith
Copy link
Contributor

@ismith ismith commented Jul 15, 2023

Which problem is this PR solving?

We live in a multiarch world now! I'm currently thinking about migrating a bunch of CI runners over from x86->arm64, and I can see a few uses for having machine architecture in my buildevents data.

  1. What parts of my CI runs are on an x86 vs arm executor? What's been migrated, which spots are still to be done? (I expect this to be a gradual migration as various dependencies - mostly docker images - become available for arm.)

  2. Performance improvements - can we compare run time of one arch versus another?

Both of these will be easily answered by buildevents data if these fields are present.

Short description of the changes

Takes runtime.{GOOS,GOARCH}, and puts those values into meta.os and meta.arch. I believe performance impact will be negligible - both of these are constants set by the golang runtime on startup.


We live in a multiarch world now! I'm currently thinking about migrating
a bunch of CI runners over from x86->arm64, and I can see a few uses for
this in my buildevents data.

1. What parts of my CI runs are on an x86 vs arm executor? What's been
migrated, which spots are still to be done? (I expect this to be a
gradual migration as various dependencies - mostly docker images -
become available for arm.)

2. Performance improvements - can we compare run time of one arch versus
another?

Both of these will be easily queried in buildevents data if these fields
are present.

Since this PR uses runtime.{GOOS,GOARCH}, I believe performance impact
will be negligible - both of these are constants set by the golang
runtime on startup, we're just using them.
@ismith ismith requested a review from a team July 15, 2023 06:46
@ismith ismith changed the title Add os and arch to the meta.* data sent [feat] Add os and arch to the meta.* data sent Jul 15, 2023
@ismith ismith removed the request for review from a team July 15, 2023 06:48
@ismith ismith changed the title [feat] Add os and arch to the meta.* data sent feat: Add os and arch to the meta.* data sent Jul 15, 2023
@ismith ismith marked this pull request as ready for review July 15, 2023 06:51
@ismith ismith requested a review from a team as a code owner July 15, 2023 06:51
Copy link
Contributor

@jharley jharley left a comment

Choose a reason for hiding this comment

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

Thanks for this, @ismith!

@jharley jharley merged commit 1ccd288 into main Jul 17, 2023
6 of 8 checks passed
@jharley jharley deleted the ismith.arch-metadata branch July 17, 2023 12:55
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.

2 participants