From 3b7c550b052e34e67c43e377354b66f04d74fcfa Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Tue, 24 Mar 2026 21:46:26 -0400 Subject: [PATCH 1/2] [ci] CI should fail on bad builds Signed-off-by: Chris Cranford --- Rakefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index d5f051f32d6..4bfc61dcdc5 100644 --- a/Rakefile +++ b/Rakefile @@ -45,13 +45,13 @@ task :default => :build desc 'Install the environment to run Jekyll' task :install do system 'bundle install' - exit 0 + exit 1 unless $?.success? end desc 'Update the environment to run Jekyll' task :update do system 'bundle update' - exit 0 + exit 1 unless $?.success? end desc 'Build and preview the site locally in development mode' @@ -61,7 +61,11 @@ task :preview do create_context7_files() system 'bundle install' + exit 1 unless $?.success? + system "#{$use_bundle_exec ? 'bundle exec ' : ''}jekyll serve --host 0.0.0.0 --livereload" or raise "Jekyll build failed" + exit 1 unless $?.success? + end desc 'Build the site for the given environment: development (the default), staging, or production' @@ -70,7 +74,11 @@ task :build, [:environment] do |task, args| run_antora system 'bundle install' + exit 1 unless $?.success? + system "JEKYLL_ENV=#{args[:environment]} bundle exec jekyll build" + exit 1 unless $?.success? + clone_versions create_context7_files() From 62fe4eea7ce2d77f55f83567401b5d872c415b51 Mon Sep 17 00:00:00 2001 From: Chris Cranford Date: Tue, 24 Mar 2026 22:03:41 -0400 Subject: [PATCH 2/2] [ci] When Maven Central is under load, curl requests are throttled Signed-off-by: Chris Cranford --- _scripts/create-snapshot-links.sh | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/_scripts/create-snapshot-links.sh b/_scripts/create-snapshot-links.sh index 19f9f3f564d..0ec549a7364 100755 --- a/_scripts/create-snapshot-links.sh +++ b/_scripts/create-snapshot-links.sh @@ -16,10 +16,30 @@ update_snapshot_link() { local COMPONENT=$1 local ARTIFACT_ID=$2 local CLASSIFIER=$3 + local MAX_RETRIES=3 + local RETRY_DELAY=5 + + echo "Fetching $COMPONENT metadata" + for ((i=1; i<=MAX_RETRIES; i++)); do + SNAPSHOT_VERSION=$(curl --connect-timeout 10 --max-time 30 --silent -fSL $MAVEN_REPO/$GROUP_ID/$ARTIFACT_ID/$DEBEZIUM_VERSION/maven-metadata.xml | awk -F'<[^>]+>' '/tar.gz<\/extension>/ {getline; print $2; exit}') + + if [[ -n "$SNAPSHOT_VERSION" ]]; then + break + fi + + echo " Attempt $i/$MAX_RETRIES failed for $COMPONENT, retrying" + sleep "$RETRY_DELAY" + RETRY_DELAY=$((RETRY_DELAY * 2)) + done + + if [[ -z "$SNAPSHOT_VERSION" ]]; then + echo "ERROR: Failed to resolve snapshot for $COMPONENT after $MAX_RETRIES retries" + return 1 + fi - SNAPSHOT_VERSION=$(curl --silent -fSL $MAVEN_REPO/$GROUP_ID/$ARTIFACT_ID/$DEBEZIUM_VERSION/maven-metadata.xml | awk -F'<[^>]+>' '/tar.gz<\/extension>/ {getline; print $2; exit}') SNAPSHOT_LINK="$MAVEN_REPO/$GROUP_ID/$ARTIFACT_ID/$DEBEZIUM_VERSION/$ARTIFACT_ID-${SNAPSHOT_VERSION}${CLASSIFIER}.tar.gz" sed -i "s#link-$COMPONENT-snapshot:.*#link-$COMPONENT-snapshot: \'$SNAPSHOT_LINK\'#" $ANTORA_FILE + echo "Updated $COMPONENT as $SNAPSHOT_LINK" } for CONNECTOR in "${CONNECTORS[@]}"; do