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

maint: remove interstitial linux subdir from S3 publish #110

Merged
merged 1 commit into from
Oct 18, 2022

Conversation

robbkidd
Copy link
Member

@robbkidd robbkidd commented Oct 13, 2022

This is a follow-up fix to the build/release overhaul in #103.

A similar change was made in multiple places, but the publish_s3 job was missed:

With this PR's change, the built artifacts will appear in S3 directly under the honeycomb-lambda-extension/<VERSION> subdirectory of the honeycomb-builds bucket to match the contents for past releases as opposed to in a honeycomb-lambda-extension/<VERSION>/linux subdirectory. This gets things back into alignment with the download URL given in docs for retrieving the layer contents for use in custom Docker images.

@robbkidd robbkidd requested review from a team and kentquirk October 13, 2022 23:11
@robbkidd robbkidd added no-changelog Omit this PR from changelog/release notes. type: maintenance The necessary chores to keep the dust off. labels Oct 13, 2022
@@ -92,7 +92,7 @@ jobs:
ls -l ~/artifacts/*
- run:
name: "S3 Release"
command: aws s3 cp ~/artifacts s3://honeycomb-builds/honeycombio/honeycomb-lambda-extension/${CIRCLE_TAG}/ --recursive
command: aws s3 cp ~/artifacts/linux s3://honeycomb-builds/honeycombio/honeycomb-lambda-extension/${CIRCLE_TAG}/ --recursive
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate a bit more, please? Like, why doesn't this change need to be made in multiple places, and what is the actual effect of eliminating these 6 characters? Are they just meaningless? Why were they there in the first place?

Copy link
Member Author

@robbkidd robbkidd Oct 18, 2022

Choose a reason for hiding this comment

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

Yes! I should have elaborated from the beginning.

If what I write below makes sense, I'll copy some or all of it to the PR description for merge-commit-message posterity.

Quick Answers:

why doesn't this change need to be made in multiple places

The change was previously made in multiple places (in #103 and in 53da4b2 which was a follow-up change/fix like this one); this spot is a place that was missed.

what is the actual effect of eliminating these 6 characters?

The built artifacts will appear directly in S3 under the honeycomb-lambda-extension/<VERSION> subdirectory of the honeycomb-builds bucket (which matches the contents for past releases) instead of in a honeycomb-lambda-extension/<VERSION>/linux subdirectory. This gets things back into alignment with the download URL given in docs for retrieving the layer contents for use in custom Docker images.

Are they just meaningless? Why were they there in the first place?

A longer story …

A fair amount of build and release fiddly bits changed in #103. One major change was moving the compile/build and creation of ZIP files for layer publishing to the Makefile. Because the compile/build can happen for any GOOS, I wanted to put guard rails up to prevent us from accidentally pushing up, say, a macOS darwin build in a published release layer. It only makes sense to publish linux-flavored layers. With all the building and zipping happening in the Makefile, I leveraged target file paths to sorta-kinda namespace compiled executables by their GOOS value and to declare the ZIP file targets as linux-only (in 46d7dbc).

So, GOOS appears in paths in the CI build environment, but any GOOS other than linux is useless/breaking in the context of release artifacts. Therefore, the publsh_* jobs need to publish only linux things and ought not to include "linux" in the paths for release artifacts because that's always been assumed.

Copy link
Contributor

@kentquirk kentquirk 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 the explanation!

@robbkidd robbkidd merged commit 33e6beb into main Oct 18, 2022
@robbkidd robbkidd deleted the robb.fix-publish-s3 branch October 18, 2022 19:48
@robbkidd robbkidd added the version: no bump A PR with maintenance or doc changes that aren't included in a release. label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Omit this PR from changelog/release notes. type: maintenance The necessary chores to keep the dust off. version: no bump A PR with maintenance or doc changes that aren't included in a release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants