Skip to content

Conversation

ShelbyZ
Copy link
Contributor

@ShelbyZ ShelbyZ commented Sep 19, 2025

Summary

Add additional sync task steps for BUILD_VERSION=3 with failure handling to allow syncing newer images when available in ecr/dockerhub. Added some sync skips related to missing images in dockerhub/ecr to avoid failures and prevent stable syncing on BUILD_VERSION=3.

Testing

Local pipeline testing of sync task to ensure using the new BUILD_VERSION=3 with nonexistent images in ecr/dockerhub should not fail

Description for the changelog

Enhancement: Add support for syncing BUILD_VERSION=3 images

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@ShelbyZ ShelbyZ requested a review from a team as a code owner September 19, 2025 20:34
@ShelbyZ ShelbyZ added the fluent-bit 4.x Part of the fluent-bit 4.x migration work label Sep 19, 2025
@ShelbyZ ShelbyZ added this to the 3.0.0 milestone Sep 19, 2025
# Check if tag in public ECR before attempting to pull
if ! docker manifest inspect public.ecr.aws/aws-observability/aws-for-fluent-bit:${tag} > /dev/null 2>&1; then
echo "Warning: BUILD_VERSION=3 image ${tag} not found in public ECR, skipping sync"
return 0
Copy link

Choose a reason for hiding this comment

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

Just curious, do we want to eventually return/exit with a non-zero code here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think post launch we may revisit these workarounds and either remove entirely or error

@prateekchaudhry
Copy link
Contributor

prateekchaudhry commented Sep 19, 2025

I think the way this script evaluates latest and is plugged in publish.sh, this will never actually sync?

Is that right? Looks like the get_latest_dockerhub_version.py would always assign latest to numerically highest 🤔

I wonder how it affects which version we end up syncing with respect to AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR var. Maybe we need to re-write some logic here?

@ShelbyZ
Copy link
Contributor Author

ShelbyZ commented Sep 22, 2025

I think the way this script evaluates latest and is plugged in publish.sh, this will never actually sync?

Is that right? Looks like the get_latest_dockerhub_version.py would always assign latest to numerically highest 🤔

I wonder how it affects which version we end up syncing with respect to AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR var. Maybe we need to re-write some logic here?

Tested offline, lines 1-57 of publish.sh, and it should not be an issue:

--- BUILD VERSION 2 ---
=== BUILD_VERSION=2 Test Results ===
BUILD_VERSION=2
AWS_FOR_FLUENT_BIT_VERSION=2.34.0
AWS_FOR_FLUENT_BIT_STABLE_VERSION=2.33.2
PUBLISH_LATEST=true
AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR=2.34.0

--- BUILD VERSION 3 ---
=== BUILD_VERSION=3 Test Results ===
BUILD_VERSION=3
AWS_FOR_FLUENT_BIT_VERSION=3.0.0
AWS_FOR_FLUENT_BIT_STABLE_VERSION=2.33.2
PUBLISH_LATEST=false
AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR=2.34.0
PUBLISH_NON_LATEST=false

--- BUILD VERSION UNSET ---
=== BUILD_VERSION=unset Test Results ===
BUILD_VERSION=unset
AWS_FOR_FLUENT_BIT_VERSION=2.34.0
AWS_FOR_FLUENT_BIT_STABLE_VERSION=2.33.2
PUBLISH_LATEST=true
AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR=2.34.0

PUBLISH_NON_LATEST=false for BUILD_VERSION=3 because the version did not exist in dockerhub which makes sense for now (3.0.0) does not exist when it is published that value would be true and would also be AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR 3.0.0.

I did run an example with an older version for BUILD_VERSION=3

AWS_FOR_FLUENT_BIT_VERSION=2.31.12.20231011
AWS_FOR_FLUENT_BIT_STABLE_VERSION=2.33.2
PUBLISH_LATEST=false
AWS_FOR_FLUENT_BIT_VERSION_PUBLIC_ECR=2.31.12.20231011
PUBLISH_NON_LATEST=true

@ShelbyZ ShelbyZ merged commit f53c548 into aws:mainline Sep 23, 2025
@ShelbyZ ShelbyZ deleted the build-version-3 branch September 23, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fluent-bit 4.x Part of the fluent-bit 4.x migration work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants