Skip to content

Commit d497aac

Browse files
authored
Merge branch 'main' into dependabot/github_actions/actions/download-artifact-5
2 parents ce95ef6 + 1af4595 commit d497aac

File tree

8 files changed

+36
-23
lines changed

8 files changed

+36
-23
lines changed

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@v5
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL

.github/workflows/main-build-and-deploy-oss.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
# timeout-minutes: 15
1616
# steps:
1717
# - name: Checkout
18-
# uses: actions/checkout@v4
18+
# uses: actions/checkout@v5
1919
# - name: Scan With Black Duck
2020
# uses: ./.github/actions/scan-with-blackduck
2121
# with:
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
steps:
3030
- name: Checkout
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
3232
with:
3333
token: ${{ secrets.GH_TOKEN }}
3434
- name: Update version

.github/workflows/main-build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
java-version: [ 17, 21 ]
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121

2222
- name: Build
2323
uses: ./.github/actions/build
@@ -40,7 +40,7 @@ jobs:
4040
# timeout-minutes: 15
4141
# steps:
4242
# - name: Checkout
43-
# uses: actions/checkout@v4
43+
# uses: actions/checkout@v5
4444
# - name: Scan
4545
# uses: ./.github/actions/scan-with-blackduck
4646
# with:
@@ -54,10 +54,10 @@ jobs:
5454
needs: [build] # [build, scan]
5555
steps:
5656
- name: Checkout
57-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
5858

5959
- name: Set up Java ${{ env.JAVA_VERSION }}
60-
uses: actions/setup-java@v4
60+
uses: actions/setup-java@v5
6161
with:
6262
java-version: ${{ env.JAVA_VERSION }}
6363
distribution: sapmachine

.github/workflows/pull-request-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
steps:
2020
- name: Checkout
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222

2323
- name: Build
2424
uses: ./.github/actions/build

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ Please see [Validation of VMR Provisioning](https://help.sap.com/docs/sap-integr
101101

102102
Additional configuration options for the messaging service are:
103103

104-
Property | Type | Description |
105-
| --- | --- | --- |
104+
Property | Type | Description |
105+
|---------------------------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------------------------|
106106
| `cds.messaging.services.<key>.connection.properties.skipManagement` | `boolean` | If set to `true`, the plugin will not create a queue or subscription. This is useful if you want to manage these resources manually, default: `false` |
107+
| `cds.messaging.services.<key>.connection.properties.subaccountId` | `String` | If set to a subaccount ID, the plugin will call the validation service with that given value, default: `null` |
107108

108109

109110
## Support, Feedback, Contributing

cds-feature-advanced-event-mesh/src/main/java/com/sap/cds/feature/messaging/aem/client/AemValidationClient.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
package com.sap.cds.feature.messaging.aem.client;
22

3+
import com.google.common.base.Strings;
34
import com.sap.cloud.environment.servicebinding.api.ServiceBinding;
45
import com.sap.cloud.sdk.cloudplatform.connectivity.ServiceBindingDestinationOptions;
56
import java.io.IOException;
67
import java.net.URI;
78
import java.net.URISyntaxException;
9+
import java.util.HashMap;
810
import java.util.Map;
911

1012
public class AemValidationClient extends RestClient {
@@ -13,9 +15,15 @@ public AemValidationClient(ServiceBinding binding) {
1315
super(ServiceBindingDestinationOptions.forService(binding).build());
1416
}
1517

16-
public void validate(String managementUri) throws IOException, URISyntaxException {
18+
public void validate(String managementUri, String subaccountId) throws IOException, URISyntaxException {
1719
URI uri = new URI(managementUri);
18-
String payload = this.mapper.writeValueAsString(Map.of("hostName", uri.getHost()));
20+
Map<String, String> payloadMap = new HashMap<>(Map.of("hostName", uri.getHost()));
21+
22+
if (!Strings.isNullOrEmpty(subaccountId)) {
23+
payloadMap.put("subaccountId", subaccountId);
24+
}
25+
26+
String payload = this.mapper.writeValueAsString(payloadMap);
1927

2028
// The response is not used, only the status code is relevant. If there is a status code not
2129
// equal to 200,

cds-feature-advanced-event-mesh/src/main/java/com/sap/cds/feature/messaging/aem/service/AemMessagingService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public class AemMessagingService extends AbstractMessagingService {
3838
private volatile BrokerConnection connection;
3939
private volatile Boolean aemBrokerValidated = false;
4040
private volatile Boolean skipManagement = false;
41+
private volatile String subaccountId = null;
4142

4243
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
4344
protected AemMessagingService(
@@ -57,6 +58,9 @@ protected AemMessagingService(
5758
String skipManagementProperty = properties.get("skipManagement");
5859
String skip_ManagementProperty = properties.get("skip-management");
5960
this.skipManagement = Boolean.parseBoolean(skipManagementProperty) || Boolean.parseBoolean(skip_ManagementProperty);
61+
String subaccountId = properties.getOrDefault("subaccountId", null);
62+
String subaccount_Id = properties.getOrDefault("subaccount-id", null);
63+
this.subaccountId = subaccountId != null ? subaccountId : subaccount_Id;
6064
}
6165

6266
@VisibleForTesting
@@ -163,7 +167,7 @@ private void validate(String endpoint) {
163167
AemValidationClient validationClient = new AemValidationClient(this.validationBinding);
164168

165169
try {
166-
validationClient.validate(endpoint);
170+
validationClient.validate(endpoint, this.subaccountId);
167171
this.aemBrokerValidated = true;
168172
} catch (IOException | URISyntaxException e) {
169173
throw new ServiceException("Failed to validate the AEM endpoint.", e);

pom.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
<maven.compiler.release>${java.version}</maven.compiler.release>
2929
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3030

31-
<cds.services.version>4.1.1</cds.services.version>
31+
<cds.services.version>4.3.1</cds.services.version>
3232
<cds.install-cdsdk.version>8.7.3</cds.install-cdsdk.version>
33-
<qpid.version>2.7.0</qpid.version> <!-- https://central.sonatype.com/artifact/org.apache.qpid/qpid-jms-client/versions -->
33+
<qpid.version>2.9.0</qpid.version> <!-- https://central.sonatype.com/artifact/org.apache.qpid/qpid-jms-client/versions -->
3434
<com.google.code.findbugs.jsr305.version>3.0.2</com.google.code.findbugs.jsr305.version>
3535
</properties>
3636

@@ -60,15 +60,15 @@
6060
<dependency>
6161
<groupId>com.sap.cloud.sdk</groupId>
6262
<artifactId>sdk-bom</artifactId>
63-
<version>5.20.0</version>
63+
<version>5.22.0</version>
6464
<type>pom</type>
6565
<scope>import</scope>
6666
</dependency>
6767

6868
<dependency>
6969
<groupId>org.mockito</groupId>
7070
<artifactId>mockito-bom</artifactId>
71-
<version>5.18.0</version>
71+
<version>5.20.0</version>
7272
<type>pom</type>
7373
<scope>import</scope>
7474
</dependency>
@@ -117,7 +117,7 @@
117117
<dependency>
118118
<groupId>org.assertj</groupId>
119119
<artifactId>assertj-core</artifactId>
120-
<version>3.27.3</version>
120+
<version>3.27.6</version>
121121
<scope>test</scope>
122122
</dependency>
123123

@@ -212,11 +212,11 @@
212212
</plugin>
213213
<plugin>
214214
<artifactId>maven-javadoc-plugin</artifactId>
215-
<version>3.11.2</version>
215+
<version>3.12.0</version>
216216
</plugin>
217217
<plugin>
218218
<artifactId>maven-surefire-plugin</artifactId>
219-
<version>3.5.2</version>
219+
<version>3.5.4</version>
220220
</plugin>
221221
<plugin>
222222
<artifactId>maven-pmd-plugin</artifactId>
@@ -229,7 +229,7 @@
229229
<plugin>
230230
<groupId>org.codehaus.mojo</groupId>
231231
<artifactId>flatten-maven-plugin</artifactId>
232-
<version>1.7.1</version>
232+
<version>1.7.3</version>
233233
</plugin>
234234
<plugin>
235235
<groupId>org.jacoco</groupId>
@@ -239,12 +239,12 @@
239239
<plugin>
240240
<groupId>org.pitest</groupId>
241241
<artifactId>pitest-maven</artifactId>
242-
<version>1.20.0</version>
242+
<version>1.20.3</version>
243243
</plugin>
244244
<plugin>
245245
<groupId>com.github.spotbugs</groupId>
246246
<artifactId>spotbugs-maven-plugin</artifactId>
247-
<version>4.9.3.2</version>
247+
<version>4.9.6.0</version>
248248
</plugin>
249249
</plugins>
250250
</pluginManagement>

0 commit comments

Comments
 (0)