Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify spring configurations #22396

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
b4d8ccc
rename azure-identity-spring to azure-core-spring and move AzurePrope…
yiliuTo Jun 9, 2021
baa11b4
combine all properties in Configuration.java in azure-core
yiliuTo Jun 9, 2021
15f4bfb
expand AzureProperties and rename pkg to azure-spring-boot-core
yiliuTo Jun 9, 2021
ac1daa2
udpate spring cloud storage configuration
yiliuTo Jun 19, 2021
07efc00
read property value from AzureProperties in AAD
yiliuTo Jun 19, 2021
d3aa627
udapte kv configurations
yiliuTo Jun 20, 2021
b5e4151
move applicationid to azure-spring-boot-core
yiliuTo Jun 20, 2021
e0b98b6
fix compiler error
yiliuTo Jun 20, 2021
7d2dc74
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jun 20, 2021
c971937
fix readme link error
yiliuTo Jun 21, 2021
3f86762
update with comments
yiliuTo Jun 24, 2021
a08df38
refactor properties
yiliuTo Jun 27, 2021
423aeff
update credential property configuration except b2c and eh uts
yiliuTo Jun 29, 2021
dd4acdf
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jun 29, 2021
5b5a22b
fix unit tests
yiliuTo Jun 30, 2021
eae9c55
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jun 30, 2021
5dbca41
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jun 30, 2021
667de3c
disable ut temporally
yiliuTo Jun 30, 2021
90adbf2
Merge branch 'unify-spring-configurations' of https://github.com/yili…
yiliuTo Jul 1, 2021
3c3c26b
fix aad ut
yiliuTo Jul 1, 2021
8cc2696
update azure-spring-boot-core version to 1.0.0-beta.1
yiliuTo Jul 2, 2021
20ecadc
enable get authority host from environement property
yiliuTo Jul 2, 2021
48ad090
remove aggregated property of AzureSpringProperties
yiliuTo Jul 2, 2021
ef60999
support configuring authority host from environment
yiliuTo Jul 2, 2021
bcc55a3
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jul 2, 2021
5fdf7a5
unify configuration
stliu Jul 6, 2021
22c4a40
refactor AzureProperties
yiliuTo Jul 7, 2021
eafa6a4
refactor service properteis
yiliuTo Jul 8, 2021
d08d60f
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jul 8, 2021
64d3a94
fix ut
yiliuTo Jul 8, 2021
dadee07
add ut for service properties
yiliuTo Jul 9, 2021
991a194
fix kv IT failure
yiliuTo Jul 12, 2021
e4fc188
remove msiEnabled prop from unified properties
yiliuTo Jul 12, 2021
e30ea6a
remove AzureCloudUrls
yiliuTo Jul 12, 2021
de6501c
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-java in…
yiliuTo Jul 13, 2021
8a01e78
fix applicationit test
yiliuTo Jul 13, 2021
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 @@ -2277,9 +2277,6 @@

<!-- Exclude from spring related classes -->
<Match>
<Or>
<Class name="com.azure.spring.utils.PropertyLoader"/> <!-- false positive -->
</Or>
<Bug pattern="RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE,
NP_LOAD_OF_KNOWN_NULL_VALUE,
RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE,
Expand Down Expand Up @@ -2309,6 +2306,17 @@
<Bug pattern="NP_NULL_ON_SOME_PATH"/>
</Match>

<Match>
<Class name="com.azure.spring.identity.SpringCredentialBuilderBase"/>
<Field name="environment"/>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
</Match>

<Match>
<Class name="com.azure.spring.autoconfigure.cosmos.CosmosAutoConfiguration"/>
<Field name="azureProperties"/>
<Bug pattern="URF_UNREAD_FIELD"/>
</Match>
<!-- The transient fields are not used if deserialization happens. -->
<Match>
<Class name="com.azure.identity.implementation.MsalAuthenticationAccount"/>
Expand Down
4 changes: 2 additions & 2 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@

<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-identity-spring</artifactId>
<version>1.7.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;current} -->
<artifactId>azure-spring-boot-core</artifactId>
chenrujun marked this conversation as resolved.
Show resolved Hide resolved
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-core;current} -->
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
Expand Down
2 changes: 1 addition & 1 deletion eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ com.azure.spring:azure-spring-cloud-appconfiguration-config;2.0.0-beta.2;2.0.0-b
com.azure.spring:azure-spring-cloud-feature-management-web;2.0.0;2.1.0-beta.1
com.azure.spring:azure-spring-cloud-feature-management;2.0.0;2.1.0-beta.1
com.azure.spring:azure-spring-cloud-starter-appconfiguration-config;2.0.0-beta.2;2.0.0-beta.3
com.azure.spring:azure-identity-spring;1.6.0;1.7.0-beta.1
com.azure.spring:azure-spring-boot-core;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:azure-spring-boot-bom;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-boot-starter-active-directory-b2c;3.6.0;3.7.0-beta.1
com.azure.spring:azure-spring-boot-starter-active-directory;3.6.0;3.7.0-beta.1
Expand Down
11 changes: 8 additions & 3 deletions sdk/boms/azure-spring-cloud-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@
<azure.resourcemanager.version>2.6.0</azure.resourcemanager.version> <!-- {x-version-update;com.azure.resourcemanager:azure-resourcemanager;dependency} -->
<azure.spring.appconfigure.version>1.3.0</azure.spring.appconfigure.version> <!-- {x-version-update;com.microsoft.azure:spring-cloud-starter-azure-appconfiguration-config;dependency} -->
<azure.spring.cloud.version>${project.version}</azure.spring.cloud.version>
<azure.spring.identity.version>1.6.0</azure.spring.identity.version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;dependency} -->
<azure.spring.core.version>1.0.0</azure.spring.core.version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-core;dependency} -->
<azure.spring.appconfigure.version>1.3.0</azure.spring.appconfigure.version> <!-- {x-version-update;com.microsoft.azure:spring-cloud-starter-azure-appconfiguration-config;dependency} -->
<azure.core.version>1.17.0</azure.core.version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
<azure.eventhub.version>5.8.0</azure.eventhub.version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;dependency} -->
<azure.eventhub.checkpoint.version>1.8.0</azure.eventhub.checkpoint.version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;dependency} -->
<azure.servicebus.version>3.6.1</azure.servicebus.version> <!-- {x-version-update;com.microsoft.azure:azure-servicebus;external_dependency} -->
<azure.storage.queue.version>12.10.0</azure.storage.queue.version> <!-- {x-version-update;com.azure:azure-storage-queue;dependency} -->
</properties>

Expand Down Expand Up @@ -178,8 +183,8 @@
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>azure-identity-spring</artifactId>
<version>${azure.spring.identity.version}</version>
<artifactId>azure-spring-boot-core</artifactId>
<version>${azure.spring.core.version}</version>
</dependency>

<!--Azure SDK-->
Expand Down
32 changes: 0 additions & 32 deletions sdk/spring/azure-identity-spring/CHANGELOG.md

This file was deleted.

3 changes: 3 additions & 0 deletions sdk/spring/azure-spring-boot-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release History

## 1.0.0-beta.1 (Unreleased)
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Azure Identity Spring Integration client library for Java

[Source code][src]
# Azure Spring Boot Core client library for Java
yiliuTo marked this conversation as resolved.
Show resolved Hide resolved

## Getting started

Expand All @@ -23,5 +21,4 @@ To suggest a new feature or changes that could be made, file an issue the same w
You can participate community driven [![Gitter](https://badges.gitter.im/Microsoft/spring-on-azure.svg)](https://gitter.im/Microsoft/spring-on-azure)

<!-- LINKS -->
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is a big change, we should write some context here

Choose a reason for hiding this comment

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

How about writing in changelog?

Copy link
Member

Choose a reason for hiding this comment

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

I like @backwind1233 's idea, we usually should keep the README file to do it's own job -- give reader more context aobut what is this project for ?

[src]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/spring/azure-identity-spring/src
[environment_checklist]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/spring/ENVIRONMENT_CHECKLIST.md#ready-to-run-checklist
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
</parent>

<groupId>com.azure.spring</groupId>
<artifactId>azure-identity-spring</artifactId>
<version>1.7.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-identity-spring;current} -->
<artifactId>azure-spring-boot-core</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure.spring:azure-spring-boot-core;current} -->
<packaging>jar</packaging>

<name>Azure Identity Spring Integration Library</name>
<description>Azure Identity Spring Integration Library</description>
<name>Azure Spring Boot Core Library</name>
<description>Azure Spring Boot Core Library</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<properties>
<jacoco.min.linecoverage>0.10</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.10</jacoco.min.branchcoverage>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.5.2</version> <!-- {x-version-update;org.springframework.boot:spring-boot;external_dependency} -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand All @@ -40,6 +39,7 @@
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.3.3</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>compile</scope>
</dependency>

<!-- TEST-->
Expand Down Expand Up @@ -69,6 +69,18 @@
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.spring.utils;
package com.azure.spring.core;

import java.util.Optional;

/**
* Util class for ApplicationId
* Util class for ApplicationId perfix
*/
public class ApplicationId {
// There is 24 char limitation about the app id. So some abbreviation needs to be applied:
Expand All @@ -15,29 +15,35 @@ public class ApplicationId {
// sc: for Spring Cloud
// sd: for Spring Data
// ss: for Spring Streams
// si: for Spring Integration
// kv: for Key Vault
// sb: for Storage Blobs
// sf: for Storage Files
// sq: for Storage Queue
// eh: for Event Hub
// bus: for Service Bus
// cfg: for App Config
// cos: for Cosmos
// aad: for AAD
// b2c: for AAD B2C
public static final String VERSION = Optional.of(ApplicationId.class)
.map(Class::getPackage)
.map(Package::getImplementationVersion)
.orElse("unknown");
public static final String AZURE_SPRING_KEY_VAULT = "az-sp-kv/" + VERSION;
yiliuTo marked this conversation as resolved.
Show resolved Hide resolved
public static final String AZURE_SPRING_SERVICE_BUS = "az-sp-bus/" + VERSION;
public static final String AZURE_SPRING_STORAGE_BLOB = "az-sp-sb/" + VERSION;
public static final String AZURE_SPRING_STORAGE_FILES = "az-sp-sf/" + VERSION;

/**
* AZURE_SPRING_AAD does not contain VERSION, because AAD server support 2 headers:
* 1. x-client-SKU;
* 2. x-client-VER;
*/
public static final String AZURE_SPRING_AAD = "az-sp-aad";
public static final String AZURE_SPRING_B2C = "az-sp-b2c";
public static final String AZURE_SPRING_EVENT_HUB = "az-sc-eh/;";
yiliuTo marked this conversation as resolved.
Show resolved Hide resolved
public static final String AZURE_SPRING_KEY_VAULT = "az-sp-kv/";
public static final String AZURE_SPRING_SERVICE_BUS = "az-sp-bus/";
public static final String AZURE_SPRING_STORAGE_BLOB = "az-sp-sb/";
public static final String AZURE_SPRING_STORAGE_FILES = "az-sp-sf/";
public static final String AZURE_SPRING_STORAGE_QUEUE = "az-si-sq/";

//TODO: version should contains each starter library's version
public static final String VERSION = Optional.of(ApplicationId.class)
.map(Class::getPackage)
.map(Package::getImplementationVersion)
.orElse("unknown");
}
Loading