Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/actions/setup-maven/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Setup Maven mirror
description: |
Configure ~/.m2/settings.xml with the Maven Central repo1 mirror. Used by
every Maven CI job to pin against the same fast mirror and avoid the
occasional Maven Central CDN flake the SDK builds have hit historically.
runs:
using: composite
steps:
- name: Configure Maven mirror
shell: bash
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
48 changes: 3 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,7 @@ jobs:
cache: 'maven'

- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
uses: ./.github/actions/setup-maven

- name: Build with Maven
run: |
Expand Down Expand Up @@ -113,21 +99,7 @@ jobs:
cache: 'maven'

- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
uses: ./.github/actions/setup-maven

- name: Check code formatting
run: |
Expand Down Expand Up @@ -162,21 +134,7 @@ jobs:
cache: 'maven'

- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
uses: ./.github/actions/setup-maven

- name: Package JAR
run: |
Expand Down
32 changes: 2 additions & 30 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,7 @@ jobs:
cache: 'maven'

- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
uses: ./.github/actions/setup-maven

# `-DskipUnitTests=true` is now a real toggle (bound to surefire's
# <skipTests> via pom.xml); previously it was a no-op flag and unit
Expand Down Expand Up @@ -103,21 +89,7 @@ jobs:
cache: 'maven'

- name: Configure Maven mirror
run: |
mkdir -p ~/.m2
cat > ~/.m2/settings.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<mirrors>
<mirror>
<id>central-mirror</id>
<name>Maven Central Mirror (repo1)</name>
<url>https://repo1.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
EOF
uses: ./.github/actions/setup-maven

# 3-attempt retry for transient Maven Central flakes — same pattern
# ci.yml's `Build with Maven` and `Run unit tests` use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.getaxonflow.sdk.AxonFlow;
import com.getaxonflow.sdk.AxonFlowConfig;
import com.getaxonflow.sdk.exceptions.AuthenticationException;
import com.getaxonflow.sdk.exceptions.AxonFlowException;
import com.getaxonflow.sdk.exceptions.ConnectionException;
import com.getaxonflow.sdk.exceptions.PolicyViolationException;
import com.getaxonflow.sdk.types.ClientRequest;
Expand Down Expand Up @@ -108,9 +109,9 @@ private static void proxyLLMCallStep(AxonFlow client, String clientId) {
// These are real failures: bad creds or stack down. Fail loud.
System.err.println("proxyLLMCall failed: " + e.getMessage());
System.exit(1);
} catch (RuntimeException e) {
// Other runtime failures (e.g. agent returns non-2xx because no
// LLM provider is configured) — log and continue. Tightening
} catch (AxonFlowException e) {
// Other SDK-level failures (e.g. agent returns non-2xx because
// no LLM provider is configured) — log and continue. Tightening
// this further requires capability detection from /health,
// tracked in axonflow-sdk-java#146.
System.out.println(" proxyLLMCall non-success: " + e.getMessage());
Expand All @@ -131,7 +132,7 @@ private static void listConnectorsStep(AxonFlow client) {
} catch (AuthenticationException | ConnectionException e) {
System.err.println("listConnectors failed: " + e.getMessage());
System.exit(1);
} catch (RuntimeException e) {
} catch (AxonFlowException e) {
System.out.println(" listConnectors non-success: " + e.getMessage());
}
}
Expand Down
Loading