File tree Expand file tree Collapse file tree 5 files changed +50
-12
lines changed
src/test/java/com/sap/ai/sdk/app/controllers Expand file tree Collapse file tree 5 files changed +50
-12
lines changed Original file line number Diff line number Diff line change 4444 id : run_tests
4545 run : |
4646 if [ "${{ matrix.environment }}" = "canary" ]; then
47- export AICORE_SERVICE_KEY=" ${{ secrets.AI_CORE_CANARY }}"
47+ export AICORE_SERVICE_KEY=' ${{ secrets.AI_CORE_CANARY }}'
4848 else
49- export AICORE_SERVICE_KEY=" ${{ secrets.AI_CORE_PRODUCTION }}"
49+ export AICORE_SERVICE_KEY=' ${{ secrets.AI_CORE_PRODUCTION }}'
5050 fi
5151
5252 MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} surefire:test -pl :spring-app -DskipTests=false"
7474 - name : " Start Application Locally"
7575 run : |
7676 if [ "${{ matrix.environment }}" = "canary" ]; then
77- export AICORE_SERVICE_KEY=" ${{ secrets.AI_CORE_CANARY }}"
77+ export AICORE_SERVICE_KEY=' ${{ secrets.AI_CORE_CANARY }}'
7878 else
79- export AICORE_SERVICE_KEY=" ${{ secrets.AI_CORE_PRODUCTION }}"
79+ export AICORE_SERVICE_KEY=' ${{ secrets.AI_CORE_PRODUCTION }}'
8080 fi
8181
8282 cd sample-code/spring-app
@@ -114,4 +114,4 @@ jobs:
114114 - type: "section"
115115 text:
116116 type: "plain_text"
117- text: "${{ steps.run_tests.outputs.error_message }}"
117+ text: "${{ steps.run_tests.outputs.error_message }} "
Original file line number Diff line number Diff line change 88 update-all-specs :
99 runs-on : ubuntu-latest
1010 permissions :
11- contents : write
12- pull-requests : write
11+ actions : write
1312
1413 strategy :
1514 matrix :
1615 file :
1716 - core
1817 - document-grounding
1918 - prompt-registry
19+ - orchestration
2020
2121 steps :
2222 - name : " Checkout repository"
2323 uses : actions/checkout@v4
2424
25+ - name : " Get orchestration version"
26+ if : matrix.file == 'orchestration'
27+ run : |
28+ ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}')
29+
30+ if [ -z "$ORCH_VERSION" ]; then
31+ echo "Failed to fetch orchestration version"
32+ exit 1
33+ fi
34+ echo "Orchestration version: $ORCH_VERSION"
35+ echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV
36+ env :
37+ TOKEN : ${{ secrets.GH_TOOLS_TOKEN }}
38+
39+
2540 - name : " Trigger spec update"
2641 run : |
42+ BRANCH="main"
43+ if [ "${{ matrix.file }}" = "orchestration" ]; then
44+ BRANCH="rel/$ORCH_VERSION"
45+ fi
46+ echo "Using branch: $BRANCH"
47+
2748 gh workflow run spec-update.yaml \
2849 --field file=${{ matrix.file }} \
29- --field file-ref=main \
50+ --field file-ref=$BRANCH \
3051 --field create-pr=true
3152 env :
3253 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
54+
55+ - name : " Slack Notification"
56+ if : failure()
57+ uses : slackapi/slack-github-action@v2.1.1
58+ with :
59+ webhook : ${{ secrets.SLACK_WEBHOOK }}
60+ webhook-type : incoming-webhook
61+ payload : |
62+ blocks:
63+ - type: "section"
64+ text:
65+ type: "mrkdwn"
66+ text: "⚠️ Weekly spec update failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>"
Original file line number Diff line number Diff line change 298298 <plugin >
299299 <groupId >org.openapitools</groupId >
300300 <artifactId >openapi-generator-maven-plugin</artifactId >
301- <version >7.14 .0</version >
301+ <version >7.15 .0</version >
302302 </plugin >
303303 </plugins >
304304 </pluginManagement >
@@ -749,7 +749,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
749749 <plugin >
750750 <groupId >com.github.spotbugs</groupId >
751751 <artifactId >spotbugs-maven-plugin</artifactId >
752- <version >4.9.3.2 </version >
752+ <version >4.9.4.0 </version >
753753 <configuration >
754754 <includeFilterFile >${project.rootdir} /.pipeline/spotbugs.xml</includeFilterFile >
755755 <!-- Exclude generated clients -->
Original file line number Diff line number Diff line change 3333 </developers >
3434 <properties >
3535 <project .rootdir>${project.basedir} /../../</project .rootdir>
36- <spring-boot .version>3.5.4 </spring-boot .version>
36+ <spring-boot .version>3.5.5 </spring-boot .version>
3737 <logback .version>1.5.18</logback .version>
3838 <cf-logging .version>3.8.6</cf-logging .version>
3939 <apache-tomcat-embed .version>11.0.10</apache-tomcat-embed .version>
Original file line number Diff line number Diff line change 2424import com .sap .ai .sdk .orchestration .model .GenericModuleResult ;
2525import java .io .IOException ;
2626import java .io .InputStream ;
27+ import java .net .HttpURLConnection ;
2728import java .net .URL ;
2829import java .nio .charset .StandardCharsets ;
2930import java .nio .file .Files ;
@@ -323,7 +324,10 @@ void testImageInputBase64() {
323324 String dataUrl = "" ;
324325 try {
325326 URL url = new URL ("https://upload.wikimedia.org/wikipedia/commons/c/c9/Sap-logo-700x700.jpg" );
326- try (InputStream inputStream = url .openStream ()) {
327+ // the "User-Agent" header is required to avoid a 403
328+ HttpURLConnection connection = (HttpURLConnection ) url .openConnection ();
329+ connection .setRequestProperty ("User-Agent" , "Test implementation" );
330+ try (InputStream inputStream = connection .getInputStream ()) {
327331 byte [] imageBytes = inputStream .readAllBytes ();
328332 byte [] encodedBytes = Base64 .getEncoder ().encode (imageBytes );
329333 String encodedString = new String (encodedBytes , StandardCharsets .UTF_8 );
You can’t perform that action at this time.
0 commit comments