-
Notifications
You must be signed in to change notification settings - Fork 137
Pin AL2 Version for Linux builds #910
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
base: mainline
Are you sure you want to change the base?
Conversation
Problem: During new image creation it is possible (but unlikely) that the AL2 version could change between image builds which could lead to published images with version differences. aws-for-fluent-bit images using AL2: - fluent-bit build (release/debug/init) - fluent bit plugin build (kinesis/firehose/cloudwatch) - fluent-bit container image (all variants) Fix: Introduce a new field (al2_version) into linux.version file that takes an AL2 version tag from ECR to be used to pull a specific container image to be used across all image builds. The build process (makefile) can parse the al2_version and pass it as a docker build argument. This value is used to override the previous 2 tag. Example: // If not set we use 2 ARG AL2_VERSION=2 FROM public.ecr.aws/amazonlinux/amazonlinux:${AL2_VERSION} This fix will also allow using Github version tags to rebuild the exact container image version as we can target the exact AL2 version used during container image creation. Testing: - all linux make variants (dev/debug/release) Image pull with changes: => [stage-1 1/18] FROM public.ecr.aws/amazonlinux/amazonlinux:2.0.20250305.0@sha256:ce9ae961378607d8207804db40cb0e117a32f862631c034b6 0.0s
There's use in this for when we need to migrate to AL2023, but I'm inclined against pinning to specific versions within the same OS. Would prefer to just set this to 2 in the Linux version profile and remove the changes to generate_changelog.sh. AL2 is constantly pushing security updates which we can't refuse to ingest, so at any given time the best AL2 version is the latest one; if there are ever eg availability issues from this then our only option is to reallocate to fix them so we can ingest the new version. Given that, pinning to a subversion of AL2 doesn't give us any more control over what version we release, and it increases both the manual effort required for CVE updates and the chance of forgetting to update the pin (risking security issues for customers). Separately, could you elaborate on the scenario you're seeing where we would have version differences? fluent-bit upstream doesn't use AL2, and the Go plugins are built into the aws-for-fluent-bit images themselves. |
Pinning versions give us guarantees that on rebuild we are building the same version of fluent-bit with the same version of AL2 which we currently lack.
This change goes in parallel with updating our internal release process for aws-for-fluent-bit container images. Part of that process would be to select/update the
This is specifically an "us" problem and we build and package using AL2. Two scenarios:
|
Can you elaborate on how having this guarantee improves our ops or availability, given that we put images through our test pipeline before releasing them?
+1, if we merge this change recommend doing so after #912 so this PR can add the required changes to |
Problem:
During new image creation it is possible (but unlikely) that the AL2 version could change between image builds which could lead to published images with version differences.
aws-for-fluent-bit images using AL2:
Fix:
Introduce a new field (al2_version) into linux.version file that takes an AL2 version tag from ECR to be used to pull a specific container image to be used across all image builds. The build process (makefile) can parse the al2_version and pass it as a docker build argument. This value is used to override the previous 2 tag.
Example:
// If not set we use 2
ARG AL2_VERSION=2
FROM public.ecr.aws/amazonlinux/amazonlinux:${AL2_VERSION}
This fix will also allow using Github version tags to rebuild the exact container image version as we can target the exact AL2 version used during container image creation.
Testing:
Image pull with changes:
=> [stage-1 1/18] FROM public.ecr.aws/amazonlinux/amazonlinux:2.0.20250305.0@sha256:ce9ae961378607d8207804db40cb0e117a32f862631c034b6 0.0s
Summary
Issue #, if available:
Testing
make debug
succeeded:Integ tests succeeded:
New tests cover the changes:
Description for the changelog
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.