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

Add arm32v7 to release configurations #349

Merged
merged 4 commits into from
Jul 20, 2023
Merged

Add arm32v7 to release configurations #349

merged 4 commits into from
Jul 20, 2023

Conversation

Wal8800
Copy link
Contributor

@Wal8800 Wal8800 commented Jun 3, 2023

Summary

This pull request is looking to introduce arm32v7 release for otelcol and otel-contrib distribution.

The pull request builds on top of the changes in #146, I changed --platform to linux/arm/v7 to hopefully fix the CI build error.

Manual Tests

  • Able to build the new arm docker image locally with goreleaser release --clean --snapshot

@Wal8800 Wal8800 requested review from a team and MovieStoreGuy June 3, 2023 01:14
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@MovieStoreGuy MovieStoreGuy self-assigned this Jun 3, 2023
Comment on lines +152 to +158
case ArmArch:
for _, vers := range ArmVersions {
r = append(r, DockerImage(imagePrefixes, dist, arch, vers))
}
default:
r = append(r, DockerImage(imagePrefixes, dist, arch, ""))
}
Copy link
Contributor Author

@Wal8800 Wal8800 Jun 4, 2023

Choose a reason for hiding this comment

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

Initially, for including the optional arm version, I thought about creating a new configuration type to default the arm version to empty string. For example:

type DockerImageConfig struct {
  ImagePrefixes []string
  Dist string
  Arch string
  ArmVersion string
}

Then in the future we can add more optional values such as AMD64 versions. However, it seems like that's more complicated for the current usage, that is, in most cases we only pass around 3 values (imagePrefixes, dist and arch). So for now, I opted to add new argument to DockerImages instead. Happy to change it other suggestions/alternatives.

@jpkrohling
Copy link
Member

Can you please confirm we have this arch in the CI for both core and contrib repositories?

@Wal8800
Copy link
Contributor Author

Wal8800 commented Jun 9, 2023

Great question!

Currently, the CI for both core and contrib repositories specify arm in the architecture list but they don't specify the GOARM environment variable. This means it's using the default GOARM value. Interestingly, the default GOARM value depends on the platform that we are building on and there are changes to default to 7 for all non-arm systems in the upcoming golang version.

I'll try to add GOARM in the CI for both core and contrib so we can be explicit about the GOARM values. I will report back here once I completed the changes in the other repositories.

@jpkrohling jpkrohling marked this pull request as draft June 14, 2023 19:02
@jpkrohling
Copy link
Member

Thank you. In the meantime, I'm converting this to draft, to prevent it from being inadvertently merged.

@Wal8800
Copy link
Contributor Author

Wal8800 commented Jul 5, 2023

Ready for re-review.

Updated the ci in core and contrib to specifically for armv7:

Also, pulled in the latest main branch and rebase the pull request changes.

@Wal8800 Wal8800 marked this pull request as ready for review July 5, 2023 01:21
@jpkrohling
Copy link
Member

CI started

@Wal8800
Copy link
Contributor Author

Wal8800 commented Jul 5, 2023

Sorry, I didn't realise I need to update the list of GOARCH as we splitted the builds by arch. Now, I have updated the GOARCH list to include arm and modified the qemu setup set to include linux/arm/v7. Can we trigger the CI build again please.

@jpkrohling
Copy link
Member

CI started.

@Wal8800
Copy link
Contributor Author

Wal8800 commented Jul 7, 2023

The docker tag can't have / so I made some changes to remove them. Ran goreleaser release --snapshot --clean --timeout 2h locally to make sure it works this time.

Command output:

click here to see
  • starting release...
  • loading config file                              file=.goreleaser.yaml
  • loading environment variables
  • getting and validating git state
    • ignoring errors because this is a snapshot     error=git doesn't contain any tags. Either add a tag or use --snapshot
    • building...                                    commit=145f6ed8620be1ef2d83c026ab58b0790038f4b9 latest tag=v0.0.0
    • pipe skipped                                   reason=disabled during snapshot mode
  • parsing tag
  • setting defaults
  • snapshotting
    • building snapshot...                           version=0.0.0-SNAPSHOT-145f6ed
  • checking distribution directory
    • cleaning dist
  • loading go mod information
  • build prerequisites
  • writing effective config file
    • writing                                        config=dist/config.yaml
  • building binaries
    • building                                       binary=dist/otelcol_linux_arm64/otelcol
    • building                                       binary=dist/otelcol_linux_386/otelcol
    • building                                       binary=dist/otelcol_darwin_amd64_v1/otelcol
    • building                                       binary=dist/otelcol_darwin_arm64/otelcol
    • building                                       binary=dist/otelcol_linux_amd64_v1/otelcol
    • building                                       binary=dist/otelcol_linux_arm_7/otelcol
    • building                                       binary=dist/otelcol_linux_ppc64le/otelcol
    • building                                       binary=dist/otelcol_windows_386/otelcol.exe
    • building                                       binary=dist/otelcol_windows_amd64_v1/otelcol.exe
    • building                                       binary=dist/otelcol-contrib_darwin_amd64_v1/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_darwin_arm64/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_linux_386/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_linux_amd64_v1/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_linux_arm_7/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_linux_arm64/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_linux_ppc64le/otelcol-contrib
    • building                                       binary=dist/otelcol-contrib_windows_386/otelcol-contrib.exe
    • building                                       binary=dist/otelcol-contrib_windows_amd64_v1/otelcol-contrib.exe
    • took: 46s
  • archives
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_darwin_amd64.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_amd64.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_windows_amd64.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_darwin_arm64.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_386.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_arm64.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_windows_386.tar.gz
    • creating                                       archive=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_armv7.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_386.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_darwin_amd64.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_darwin_arm64.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_windows_386.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_windows_amd64.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_armv7.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_arm64.tar.gz
    • creating                                       archive=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_amd64.tar.gz
    • took: 32s
  • linux packages
    • creating                                       package=otelcol format=apk arch=ppc64le file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.apk
    • creating                                       package=otelcol format=deb arch=386 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_386.deb
    • creating                                       package=otelcol format=apk arch=386 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_386.apk
    • creating                                       package=otelcol format=apk arch=arm7 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_armv7.apk
    • creating                                       package=otelcol format=apk arch=arm64 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_arm64.apk
    • creating                                       package=otelcol format=apk arch=amd64v1 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_amd64.apk
    • creating                                       package=otelcol format=deb arch=ppc64le file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.deb
    • creating                                       package=otelcol format=deb arch=arm64 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_arm64.deb
    • creating                                       package=otelcol format=deb arch=amd64v1 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_amd64.deb
    • creating                                       package=otelcol format=deb arch=arm7 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_armv7.deb
    • creating                                       package=otelcol format=rpm arch=arm64 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_arm64.rpm
    • creating                                       package=otelcol format=rpm arch=amd64v1 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_amd64.rpm
    • creating                                       package=otelcol format=rpm arch=arm7 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_armv7.rpm
    • creating                                       package=otelcol format=rpm arch=386 file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_386.rpm
    • creating                                       package=otelcol format=rpm arch=ppc64le file=dist/otelcol_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.rpm
    • creating                                       package=otelcol-contrib format=apk arch=arm7 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_armv7.apk
    • creating                                       package=otelcol-contrib format=apk arch=amd64v1 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_amd64.apk
    • creating                                       package=otelcol-contrib format=apk arch=arm64 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_arm64.apk
    • creating                                       package=otelcol-contrib format=deb arch=arm7 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_armv7.deb
    • creating                                       package=otelcol-contrib format=apk arch=386 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_386.apk
    • creating                                       package=otelcol-contrib format=apk arch=ppc64le file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.apk
    • creating                                       package=otelcol-contrib format=deb arch=386 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_386.deb
    • creating                                       package=otelcol-contrib format=deb arch=amd64v1 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_amd64.deb
    • creating                                       package=otelcol-contrib format=deb arch=ppc64le file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.deb
    • creating                                       package=otelcol-contrib format=deb arch=arm64 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_arm64.deb
    • creating                                       package=otelcol-contrib format=rpm arch=arm7 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_armv7.rpm
    • creating                                       package=otelcol-contrib format=rpm arch=386 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_386.rpm
    • creating                                       package=otelcol-contrib format=rpm arch=amd64v1 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_amd64.rpm
    • creating                                       package=otelcol-contrib format=rpm arch=ppc64le file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_ppc64le.rpm
    • creating                                       package=otelcol-contrib format=rpm arch=arm64 file=dist/otelcol-contrib_0.0.0-SNAPSHOT-145f6ed_linux_arm64.rpm
    • took: 9s
  • calculating checksums
    • took: 1s
  • docker images
    • building docker image                          image=otel/opentelemetry-collector:0.0.0-SNAPSHOT-145f6ed-386
    • building docker image                          image=otel/opentelemetry-collector:0.0.0-SNAPSHOT-145f6ed-arm64
    • building docker image                          image=otel/opentelemetry-collector:0.0.0-SNAPSHOT-145f6ed-ppc64le
    • building docker image                          image=otel/opentelemetry-collector-contrib:0.0.0-SNAPSHOT-145f6ed-386
    • building docker image                          image=otel/opentelemetry-collector:0.0.0-SNAPSHOT-145f6ed-armv7
    • building docker image                          image=otel/opentelemetry-collector:0.0.0-SNAPSHOT-145f6ed-amd64
    • building docker image                          image=otel/opentelemetry-collector-contrib:0.0.0-SNAPSHOT-145f6ed-amd64
    • building docker image                          image=otel/opentelemetry-collector-contrib:0.0.0-SNAPSHOT-145f6ed-armv7
    • building docker image                          image=otel/opentelemetry-collector-contrib:0.0.0-SNAPSHOT-145f6ed-arm64
    • building docker image                          image=otel/opentelemetry-collector-contrib:0.0.0-SNAPSHOT-145f6ed-ppc64le
    • took: 2m36s
  • storing release metadata
    • writing                                        file=dist/artifacts.json
    • writing                                        file=dist/metadata.json
  • release succeeded after 4m3s
  • thanks for using goreleaser!

@jpkrohling
Copy link
Member

CI started

@jpkrohling
Copy link
Member

@MovieStoreGuy , would you like to take a final look at this one as well?

@jpkrohling
Copy link
Member

I'm merging this, but I'd still appreciate an OK from @MovieStoreGuy after the merge.

@jpkrohling jpkrohling merged commit 0450858 into open-telemetry:main Jul 20, 2023
13 checks passed
@Wal8800 Wal8800 deleted the armv7-release branch July 21, 2023 22:36
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.

3 participants