-
Notifications
You must be signed in to change notification settings - Fork 4
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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!
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 ahoneycomb-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.