[1.14] Cherrypick into release (#1240)

* Remove duplicate workflow build for pushes to master branch. (#1237)

Signed-off-by: Artur Souza <asouza.pro@gmail.com>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* DaprBot pushing tag or to branch already triggers build. (#1238)

Signed-off-by: Artur Souza <asouza.pro@gmail.com>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* fix release

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* remove springboot v3.2.6 and use dapr-sdk-parent version

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

* fix orphaned channel

Signed-off-by: Cassandra Coyle <cassie@diagrid.io>

---------

Signed-off-by: Artur Souza <asouza.pro@gmail.com>
Signed-off-by: Cassandra Coyle <cassie@diagrid.io>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
This commit is contained in:
Cassie Coyle 2025-03-07 13:07:28 -06:00 committed by GitHub
parent 0b757ec0f3
commit 35b1c92a2b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 33 additions and 60 deletions

View File

@ -32,6 +32,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.DAPR_BOT_TOKEN }}
persist-credentials: false
- name: Set up OpenJDK ${{ env.JDK_VER }}
uses: actions/setup-java@v4
with:
@ -48,24 +50,7 @@ jobs:
git config user.email "daprweb@microsoft.com"
git config user.name "Dapr Bot"
# Update origin with token
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git remote set-url origin https://x-access-token:${{ secrets.DAPR_BOT_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
# Copy first to allow automation to use the latest version and not the release branch's version.
cp -R ./.github/scripts ${RUNNER_TEMP}/
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}
trigger:
name: Triggers the Dapr SDK build
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Identify build ref to trigger build and release.
run: |
if [[ "${{ inputs.rel_version }}" == *"SNAPSHOT"* ]]; then
echo "BUILD_GIT_REF=master" >> $GITHUB_ENV
else
echo "BUILD_GIT_REF=v${{ inputs.rel_version }}" >> $GITHUB_ENV
fi
- name: Triggers the build and release.
env:
GITHUB_TOKEN: ${{ secrets.DAPR_BOT_TOKEN }}
run: |
gh workflow run build.yml --repo ${GITHUB_REPOSITORY} --ref v$(echo '${{ env.BUILD_GIT_REF }}' | sed -r 's/^[vV]?([0-9].+)$/\1/')
${RUNNER_TEMP}/scripts/create-release.sh ${{ inputs.rel_version }}

View File

@ -18,6 +18,7 @@ import io.dapr.exceptions.DaprErrorDetails;
import io.dapr.exceptions.DaprException;
import io.dapr.serializer.DaprObjectSerializer;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.AfterEach;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
@ -27,6 +28,16 @@ import static org.mockito.Mockito.when;
public class DaprClientBuilderTest {
private DaprClient client;
@AfterEach
public void cleanup() throws Exception {
if (client != null) {
client.close();
client = null;
}
}
@Test
public void build() {
DaprObjectSerializer objectSerializer = mock(DaprObjectSerializer.class);
@ -35,17 +46,17 @@ public class DaprClientBuilderTest {
DaprClientBuilder daprClientBuilder = new DaprClientBuilder();
daprClientBuilder.withObjectSerializer(objectSerializer);
daprClientBuilder.withStateSerializer(stateSerializer);
DaprClient daprClient = daprClientBuilder.build();
assertNotNull(daprClient);
client = daprClientBuilder.build();
assertNotNull(client);
}
@Test
public void buildWithOverrideSidecarIP() {
DaprClientBuilder daprClientBuilder = new DaprClientBuilder();
daprClientBuilder.withPropertyOverride(Properties.SIDECAR_IP, "unknownhost");
DaprClient daprClient = daprClientBuilder.build();
assertNotNull(daprClient);
DaprException thrown = assertThrows(DaprException.class, () -> { daprClient.getMetadata().block(); });
client = daprClientBuilder.build();
assertNotNull(client);
DaprException thrown = assertThrows(DaprException.class, () -> { client.getMetadata().block(); });
assertTrue(thrown.toString().contains("UNAVAILABLE"), thrown.toString());
}

View File

@ -12,9 +12,6 @@
<name>consumer-app</name>
<description>Spring Boot, Testcontainers and Dapr Integration Examples :: Consumer App</description>
<properties>
<springboot.version>3.2.6</springboot.version>
</properties>
<dependencyManagement>
<dependencies>
@ -37,12 +34,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.dapr.spring</groupId>
<artifactId>dapr-spring-boot-starter</artifactId>
<version>${dapr-java-sdk.alpha-version}</version>
</dependency>
<dependency>
<groupId>io.dapr.spring</groupId>
<artifactId>dapr-spring-boot-starter</artifactId>
@ -93,14 +84,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>

View File

@ -13,21 +13,26 @@
<version>0.14.0-rc-3</version>
<packaging>pom</packaging>
<properties>
<maven.deploy.skip>true</maven.deploy.skip>
</properties>
<modules>
<module>producer-app</module>
<module>consumer-app</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>

View File

@ -13,9 +13,6 @@
<name>producer-app</name>
<description>Spring Boot, Testcontainers and Dapr Integration Examples :: Producer App</description>
<properties>
<springboot.version>3.2.6</springboot.version>
</properties>
<dependencyManagement>
<dependencies>
@ -80,14 +77,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>