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
2 changes: 0 additions & 2 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ commons-net:commons-net;3.9.0
io.cloudevents:cloudevents-api;2.2.0
io.cloudevents:cloudevents-core;2.2.0
io.fabric8:kubernetes-client;6.12.1
io.netty:netty-bom;4.1.130.Final
io.netty:netty-buffer;4.1.130.Final
io.netty:netty-common;4.1.130.Final
io.netty:netty-codec;4.1.130.Final
Expand All @@ -58,7 +57,6 @@ io.netty:netty-transport;4.1.130.Final
io.netty:netty-transport-native-epoll;4.1.130.Final
io.netty:netty-transport-native-unix-common;4.1.130.Final
io.netty:netty-transport-native-kqueue;4.1.130.Final
io.projectreactor:reactor-bom;2024.0.9
io.projectreactor.netty:reactor-netty-http;1.2.13
io.projectreactor:reactor-core;3.7.14
io.vertx:vertx-codegen;4.5.23
Expand Down
34 changes: 22 additions & 12 deletions sdk/spring/scripts/compatibility_insert_dependencymanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,26 @@ def add_dependency_management_for_file(file_path, spring_boot_dependencies_versi
# dependencyManagement already exists, insert new dependencies inside it
log.info("Found existing dependencyManagement in " + file_path + ". Inserting new dependencies.")
dependencies_in_dm_start = pom_file_content.find('<dependencies>', dependency_management_start)
if dependencies_in_dm_start == -1:
log.warn("No dependencies section found in dependencyManagement for " + file_path + ". Skipping.")
return

# Find the position to insert (after <dependencies> opening tag)
insert_position = dependencies_in_dm_start + len('<dependencies>')
insert_content = get_dependency_content_for_existing_management()
dependency_content = pom_file_content[:insert_position] + insert_content + pom_file_content[insert_position:]
if dependencies_in_dm_start == -1:
# No dependencies section in dependencyManagement, create one
log.info("No dependencies section found in dependencyManagement for " + file_path + ". Creating new dependencies section.")
dependency_management_end = pom_file_content.find('</dependencyManagement>', dependency_management_start)
if dependency_management_end == -1:
log.warn("No closing dependencyManagement tag found for " + file_path + ". Skipping.")
return
insert_position = dependency_management_end
insert_content = " <dependencies>\n{} </dependencies>\n".format(get_dependency_content_for_existing_management())
dependency_content = pom_file_content[:insert_position] + insert_content + pom_file_content[insert_position:]
else:
# Find the position to insert (before </dependencies> closing tag)
dependencies_in_dm_end = pom_file_content.find('</dependencies>', dependencies_in_dm_start)
if dependencies_in_dm_end == -1:
log.warn("No closing dependencies tag found in dependencyManagement for " + file_path + ". Skipping.")
return
insert_position = dependencies_in_dm_end
insert_content = get_dependency_content_for_existing_management()
dependency_content = pom_file_content[:insert_position] + insert_content + pom_file_content[insert_position:]
else:
# No dependencyManagement exists, create new one
log.info("No existing dependencyManagement in " + file_path + ". Creating new one.")
Expand Down Expand Up @@ -211,8 +223,7 @@ def update_spring_boot_starter_parent_for_file(file_path, spring_boot_dependenci

def get_dependencies_content():
"""Returns the dependency entries without any wrapping tags."""
return """
<dependency>
return """ <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
Expand All @@ -226,7 +237,7 @@ def get_dependencies_content():
<type>pom</type>
<scope>import</scope>
</dependency>
"""
"""


def get_dependency_management_content():
Expand Down Expand Up @@ -254,8 +265,7 @@ def get_properties_contend_with_tag(spring_boot_dependencies_version, spring_clo


def get_properties_contend(spring_boot_dependencies_version, spring_cloud_dependencies_version):
return """
<spring.boot.version>{}</spring.boot.version>
return """ <spring.boot.version>{}</spring.boot.version>
<spring.cloud.version>{}</spring.cloud.version>
""".format(spring_boot_dependencies_version, spring_cloud_dependencies_version)

Expand Down
19 changes: 0 additions & 19 deletions sdk/spring/spring-cloud-azure-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,6 @@
<spotless.skip>true</spotless.skip>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-bom</artifactId>
<version>2024.0.9</version> <!-- {x-version-update;io.projectreactor:reactor-bom;external_dependency} -->
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.1.130.Final</version> <!-- {x-version-update;io.netty:netty-bom;external_dependency} -->
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,14 @@ protected void exchangeMessageAndVerify(String activeProfile,
Sinks.Many<Message<String>> manyTopic) throws InterruptedException {
GenericMessage<String> genericMessage = new GenericMessage<>(message);

Thread.sleep(2000);

LOGGER.info("Send a message:" + message + " to the queue.");
manyQueue.emitNext(genericMessage, Sinks.EmitFailureHandler.FAIL_FAST);
LOGGER.info("Send a message:" + message + " to the topic.");
manyTopic.emitNext(genericMessage, Sinks.EmitFailureHandler.FAIL_FAST);

assertThat(LATCH.get(activeProfile).await(30, TimeUnit.SECONDS)).isTrue();
assertThat(LATCH.get(activeProfile).await(100, TimeUnit.SECONDS)).isTrue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ protected void exchangeMessageAndVerify(String activeProfile,
Sinks.Many<Message<String>> manyTopic) throws InterruptedException {
GenericMessage<String> genericMessage = new GenericMessage<>(MESSAGE);

Thread.sleep(2000);

LOGGER.info("Send a message:" + MESSAGE + " to the queue.");
manyQueue.emitNext(genericMessage, Sinks.EmitFailureHandler.FAIL_FAST);
LOGGER.info("Send a message:" + MESSAGE + " to the topic.");
manyTopic.emitNext(genericMessage, Sinks.EmitFailureHandler.FAIL_FAST);

assertThat(TestServiceBusSingleBinder.LATCH.get(activeProfile).await(30, TimeUnit.SECONDS)).isTrue();
assertThat(TestServiceBusSingleBinder.LATCH.get(activeProfile).await(100, TimeUnit.SECONDS)).isTrue();
}
}
Loading