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

Bump errorProneVersion from 2.23.0 to 2.24.0 #3471

Merged
merged 4 commits into from
Dec 22, 2023
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: 1 addition & 1 deletion agent/agent-gc-monitor/gc-monitor-api/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file is expected to be part of source control.
com.azure:azure-sdk-bom:1.2.19=runtimeClasspath
com.fasterxml.jackson:jackson-bom:2.16.0=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.23.0=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.24.0=runtimeClasspath
com.google.guava:guava-bom:33.0.0-jre=runtimeClasspath
io.netty:netty-bom:4.1.104.Final=runtimeClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.32.0-alpha=runtimeClasspath
Expand Down
2 changes: 1 addition & 1 deletion agent/agent-gc-monitor/gc-monitor-core/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file is expected to be part of source control.
com.azure:azure-sdk-bom:1.2.19=runtimeClasspath
com.fasterxml.jackson:jackson-bom:2.16.0=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.23.0=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.24.0=runtimeClasspath
com.google.guava:guava-bom:33.0.0-jre=runtimeClasspath
io.netty:netty-bom:4.1.104.Final=runtimeClasspath
io.opentelemetry.instrumentation:opentelemetry-instrumentation-bom-alpha:1.32.0-alpha=runtimeClasspath
Expand Down
2 changes: 1 addition & 1 deletion agent/agent-tooling/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ com.github.oshi:oshi-core:6.4.9=runtimeClasspath
com.github.spotbugs:spotbugs-annotations:4.8.3=runtimeClasspath
com.github.stephenc.jcip:jcip-annotations:1.0-1=runtimeClasspath
com.google.code.findbugs:jsr305:3.0.2=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.23.0=runtimeClasspath
com.google.errorprone:error_prone_annotations:2.24.0=runtimeClasspath
com.google.guava:guava-bom:33.0.0-jre=runtimeClasspath
com.microsoft.azure:msal4j-persistence-extension:1.2.0=runtimeClasspath
com.microsoft.azure:msal4j:1.14.0=runtimeClasspath
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,19 @@ static void overlayFromEnv(Configuration config, Path baseDir) throws IOExceptio
StringLookup stringLookup =
StringLookupFactory.INSTANCE.interpolatorStringLookup(stringLookupMap, null, false);
StringSubstitutor stringSubstitutor = new StringSubstitutor(stringLookup);
config.connectionString =
overlayConnectionStringFromEnv(stringSubstitutor.replace(config.connectionString));
String replacedConnectionString = stringSubstitutor.replace(config.connectionString);
if (replacedConnectionString != null
&& !replacedConnectionString.startsWith("InstrumentationKey=")
&& config.connectionString.equals(replacedConnectionString)) {
throw new FriendlyException(
"Error loading connection string from a file (\""
+ config.connectionString
+ "\").\n"
+ "Please use this format instead:"
+ "\n{ \"connectionString\": \"${file:connection-string-file.txt}\" }\n",
"Learn more about configuration options here: " + CONFIGURATION_OPTIONS_LINK);
}
config.connectionString = overlayConnectionStringFromEnv(replacedConnectionString);
if (isTrimEmpty(config.role.name)) {
// only use WEBSITE_SITE_NAME as a fallback
config.role.name = getWebsiteSiteNameEnvVar();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,25 +162,31 @@ void testOverlayWithEnvVarWithGoodFileStringLookupFormat() throws Exception {
@Test
void testOverlayWithEnvVarWithBadFileStringLookupFormat() throws Exception {
Configuration configuration = new Configuration();
configuration.connectionString = "${file:" + connectionStringFile.getAbsolutePath();
ConfigurationBuilder.overlayFromEnv(configuration, Paths.get("."));
assertThat(configuration.connectionString).isEqualTo(configuration.connectionString);
String filename = "${file:" + connectionStringFile.getAbsolutePath();
configuration.connectionString = filename;
assertFriendlyExceptionThrown(configuration, filename);

configuration.connectionString = "${xyz:" + connectionStringFile.getAbsolutePath() + "}";
ConfigurationBuilder.overlayFromEnv(configuration, Paths.get("."));
assertThat(configuration.connectionString).isEqualTo(configuration.connectionString);
filename = "${xyz:" + connectionStringFile.getAbsolutePath() + "}";
configuration.connectionString = filename;
assertFriendlyExceptionThrown(configuration, filename);

configuration.connectionString = "file:" + connectionStringFile.getAbsolutePath() + "}";
ConfigurationBuilder.overlayFromEnv(configuration, Paths.get("."));
assertThat(configuration.connectionString).isEqualTo(configuration.connectionString);
filename = "file:" + connectionStringFile.getAbsolutePath() + "}";
configuration.connectionString = filename;
assertFriendlyExceptionThrown(configuration, filename);

configuration.connectionString = "file:" + connectionStringFile.getAbsolutePath();
ConfigurationBuilder.overlayFromEnv(configuration, Paths.get("."));
assertThat(configuration.connectionString).isEqualTo(configuration.connectionString);
filename = "file:" + connectionStringFile.getAbsolutePath();
configuration.connectionString = filename;
assertFriendlyExceptionThrown(configuration, filename);

configuration.connectionString = CONNECTION_STRING;
ConfigurationBuilder.overlayFromEnv(configuration, Paths.get("."));
assertThat(configuration.connectionString).isEqualTo(configuration.connectionString);
assertThat(configuration.connectionString).isEqualTo(CONNECTION_STRING);
}

private static void assertFriendlyExceptionThrown(Configuration configuration, String filename) {
assertThatThrownBy(() -> ConfigurationBuilder.overlayFromEnv(configuration, Paths.get(".")))
.isInstanceOf(FriendlyException.class);
assertThat(configuration.connectionString).isEqualTo(filename);
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ val DEPENDENCY_BOMS = listOf(

val autoServiceVersion = "1.1.1"
val autoValueVersion = "1.10.4"
val errorProneVersion = "2.23.0"
val errorProneVersion = "2.24.0"
val byteBuddyVersion = "1.12.18"
val jmhVersion = "1.37"
val mockitoVersion = "4.11.0"
Expand Down
4 changes: 2 additions & 2 deletions licenses/more-licenses.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# agent
## Dependency License Report
_2023-12-19 13:41:29 PST_
_2023-12-22 03:05:53 UTC_
## Apache License, Version 2.0

**1** **Group:** `com.fasterxml.jackson.core` **Name:** `jackson-annotations` **Version:** `2.16.0`
Expand Down Expand Up @@ -41,7 +41,7 @@ _2023-12-19 13:41:29 PST_
> - **POM Project URL**: [http://findbugs.sourceforge.net/](http://findbugs.sourceforge.net/)
> - **POM License**: Apache License, Version 2.0 - [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)

**7** **Group:** `com.google.errorprone` **Name:** `error_prone_annotations` **Version:** `2.23.0`
**7** **Group:** `com.google.errorprone` **Name:** `error_prone_annotations` **Version:** `2.24.0`
> - **Manifest Project URL**: [https://errorprone.info/error_prone_annotations](https://errorprone.info/error_prone_annotations)
> - **Manifest License**: Apache License, Version 2.0 (Not Packaged)
> - **POM License**: Apache License, Version 2.0 - [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
Expand Down
Loading