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
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ String findCompatibleSpringCloudVersion(String springBootVersion) {
*/
boolean isVersionSupported(String springBootVersion) {
Version version = Version.parse(springBootVersion);
return version.compareTo(Version.parse("3.5.0")) >= 0
&& version.compareTo(Version.parse("4.0.0")) < 0;
return version.compareTo(Version.parse("3.5.0")) >= 0;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
public class SpringCloudAzureCurrentVersionReader {

static final Pattern SPRING_BOOT_DEPENDENCIES_PATTERN =
Pattern.compile("(springboot3_org.springframework.boot:spring-boot-dependencies;)([.\\-\\w]+)");
Pattern.compile("(org.springframework.boot:spring-boot-dependencies;)([.\\-\\w]+)");
static final Pattern SPRING_CLOUD_DEPENDENCIES_PATTERN =
Pattern.compile("(springboot3_org.springframework.cloud:spring-cloud-dependencies;)([.\\-\\w]+)");
Pattern.compile("(org.springframework.cloud:spring-cloud-dependencies;)([.\\-\\w]+)");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should they be changed to springboot4_org ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, change to spring-boot4_org will cause test failure. Here is the screenshot:

image

Use org will not have test failure:

image

It's just used to match string pattern:

image

private final RestTemplate restTemplate;
private final String externalDependenciesFileUrl;
private String externalDependenciesFileContent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public SpringProjectMetadataReader(RestTemplate restTemplate,

/**
* Get {@link SpringReleaseMetadata} from https://spring.io/project_metadata/{projectId}
* @param projectId the project id, such as "spring-boot", "spring-cloud"
* @return the list of releases of the given project
*/
public List<ProjectRelease> getProjectReleases() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,24 +72,6 @@ void testSetNewStatusWithTodo() {
Assertions.assertEquals(lists.get(0).getSupportStatus(), SupportStatus.TODO);
}

@Test
void testMaintainVersions() {
SpringCloudAzureSupportMetadata data1 = new SpringCloudAzureSupportMetadata();
data1.setSpringBootVersion("2.5.15");
SpringCloudAzureSupportMetadata data2 = new SpringCloudAzureSupportMetadata();
data2.setSpringBootVersion("2.6.15");
SpringCloudAzureSupportMetadata data3 = new SpringCloudAzureSupportMetadata();
data3.setSpringBootVersion("2.7.15");
Map<String, SpringCloudAzureSupportMetadata> map = Map.of("2.5.15", data1, "2.6.15", data2, "2.7.15", data3);
List<SpringCloudAzureSupportMetadata> lists = new ArrayList<>();

runner.maintainVersions(lists, map);

Assertions.assertTrue(lists.contains(data1));
Assertions.assertTrue(lists.contains(data2));
Assertions.assertFalse(lists.contains(data3));
}

@Test
void testIsVersionSupported() {
// Test versions that should be supported (3.5.0 or above)
Expand Down