-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Spring Cloud Azure App Configuration 4.0 #33337
Conversation
{ | ||
"code": "java.class.externalClassExposedInAPI", | ||
"new": "class com.azure.data.appconfiguration.models.SettingSelector", | ||
"justification": "This is an Azure SDK class that is used in the public API." | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use one rule as following for them?
{
"regex": true,
"code": "java\\.class\\.externalClassExposedInAPI",
"new": "(interface|class|enum) com\\.azure\\.(communication\\.common|core|cosmos|data\\.schemaregistry|json|messaging\\.eventgrid|messaging\\.eventhubs|messaging\\.servicebus|resourcemanager|security\\.keyvault|storage).*",
"justification": "SDK classes are allowed to be exposed by dependencies using them."
},
Or simply modify that rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should avoid regex as it increases the revapi time. See Alan's post about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this mean we should avoid regex,
When adding many suppressions determine if they can be compacted with existing suppressions for that kind
- RevApi has regex suppressions
- Checkstyle uses
- Spotbugs has regex suppressions
But I checked the PR, he is using code to address the external APIs. See eng/code-quality-reports/src/main/java/com/azure/tools/revapi/transforms/AzureSdkAllowedExternalApis.java
in #33130.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can wait until #33130 gets merged.
@@ -4,16 +4,12 @@ stages: | |||
- template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we delete this file now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the SDK also use that file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be kept and the Artifacts
that were removed should instead be replaced with
Artifacts:
- name: azure-data-appconfiguration
groupId: com.azure
safeName: azuredataappconfiguration
sdk/spring/spring-cloud-azure-appconfiguration-config-web/pom.xml
Outdated
Show resolved
Hide resolved
@@ -1,10 +1,10 @@ | |||
// Copyright (c) Microsoft Corporation. All rights reserved. | |||
// Licensed under the MIT License. | |||
package com.azure.spring.cloud.config.web.pullrefresh; | |||
package com.azure.spring.cloud.config.web.implementation.pullrefresh; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you think refresh.pull
and refresh.push
would be better as the package names?
...ppconfiguration-config-web/src/main/java/com/azure/spring/cloud/config/web/package-info.java
Show resolved
Hide resolved
@@ -8,10 +8,10 @@ | |||
public interface KeyVaultSecretProvider { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for resolving key vault references without connecting to key vault. It has no "client", it is instead of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But internally we will build the KV clients?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the way this works is before we check if a client even exists we pass the KV Reference to the KeyVaultSecretProvider, if it returns any non-Null value than that is returned as the secret. If nothing is returned or this isn't configured only then do we create a client or check if one has already been made.
...ity-reports/src/main/java/com/azure/tools/revapi/transforms/AzureSdkAllowedExternalApis.java
Show resolved
Hide resolved
/** | ||
* Indicator class of App Configuration | ||
*/ | ||
public final class AppConfigurationConfigHealthIndicator implements HealthIndicator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this into the impl package. I know the other classes were exposed as public API, but we have changed their visibility in Spring Boot 3 branch. So for the new classes added to the actuator module, let's keep them in the impl package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can as then spring-cloud-azure-actuator-autoconfigure
would be trying to access a private class of another package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about moving it to the implementation package then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we didn't access implementation code of other packages?
...cloud/actuator/autoconfigure/appconfiguration/AppConfigurationConfigHealthConfiguration.java
Outdated
Show resolved
Hide resolved
/azp run java - spring - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - spring - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - spring - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run java - spring - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
This updates the App Configuration Spring Provider to the 4.0 format, adds support for global properties
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines