Skip to content

feat: add automatic S3 request retry with exponential backoff #2294

feat: add automatic S3 request retry with exponential backoff

feat: add automatic S3 request retry with exponential backoff #2294

Workflow file for this run

name: Java CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
build:
name: Test on Java ${{ matrix.java-version }} in ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
java-version: ['8', '11', '17', '21', '25']
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- name: Check limited Guava usage
if: matrix.os == 'ubuntu-latest'
run: |
if grep --with-filename --line-number --no-messages --recursive --exclude-dir=.github "com.google.common.base.Objects" .; then
echo "Error: use java.util.Objects instead of com.google.common.base.Objects"
exit 1
fi
- name: Setup java 17 for building
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '17'
- name: Set environment variables on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
echo "DEV_VERSION=$(./gradlew properties | awk '/^version:/ { print $2 }')" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(./gradlew properties -Prelease | awk '/^version:/ { print $2 }')" >> $GITHUB_ENV
- name: Set environment variables on Windows
if: matrix.os == 'windows-latest'
run: |
$devVersion = (./gradlew.bat properties | Select-String '^version:').ToString().Split(' ')[1].Trim()
echo "DEV_VERSION=$devVersion" >> $Env:GITHUB_ENV
- name: Run build on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
./gradlew build
./gradlew build -Prelease
- name: Run build on Windows
if: matrix.os == 'windows-latest'
run: |
./gradlew.bat build
- name: Setup java ${{ matrix.java-version }} for testing
if: matrix.java-version != '17'
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Run tests on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
cd functional
curl -sSfLO https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.11.4/junit-platform-console-standalone-1.11.4.jar
curl -sSfLO https://repo1.maven.org/maven2/com/github/spotbugs/spotbugs-annotations/4.9.8/spotbugs-annotations-4.9.8.jar
javac -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${DEV_VERSION}-all.jar:../adminapi/build/libs/minio-admin-${DEV_VERSION}-all.jar:. FunctionalTest.java
java -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${DEV_VERSION}-all.jar:../adminapi/build/libs/minio-admin-${DEV_VERSION}-all.jar:. FunctionalTest
javac -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${DEV_VERSION}-all.jar:. ./TestUserAgent.java
java -Dversion=${DEV_VERSION} -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${DEV_VERSION}-all.jar:. TestUserAgent
javac -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${RELEASE_VERSION}-all.jar:. ./TestUserAgent.java
java -Dversion=${RELEASE_VERSION} -cp spotbugs-annotations-4.9.8.jar:junit-platform-console-standalone-1.11.4.jar:../api/build/libs/minio-${RELEASE_VERSION}-all.jar:. TestUserAgent
- name: Run tests on Windows
if: matrix.os == 'windows-latest'
run: |
cd functional
curl -sSfLO https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.11.4/junit-platform-console-standalone-1.11.4.jar
curl -sSfLO https://repo1.maven.org/maven2/com/github/spotbugs/spotbugs-annotations/4.9.8/spotbugs-annotations-4.9.8.jar
javac -encoding UTF-8 -cp "spotbugs-annotations-4.9.8.jar;junit-platform-console-standalone-1.11.4.jar;../api/build/libs/minio-$Env:DEV_VERSION-all.jar;../adminapi/build/libs/minio-admin-$Env:DEV_VERSION-all.jar;." FunctionalTest.java
java -cp "spotbugs-annotations-4.9.8.jar;junit-platform-console-standalone-1.11.4.jar;../api/build/libs/minio-$Env:DEV_VERSION-all.jar;../adminapi/build/libs/minio-admin-$Env:DEV_VERSION-all.jar;." FunctionalTest