Skip to content

Commit

Permalink
Remove armeria-brave module (#5453)
Browse files Browse the repository at this point in the history
Motivation:

armeria-brave was changed in a unique way in 1.27.1 to pin an old version of the library, even though there are no code compatibility issues.

What happened was some folks at LINE have a metrics library, and instead of depending on zipkin-reporter, they relied on brave's indirect dependency version. In a rush to fix this quick, brave-armeria was reverted to 5.x and a new module was made for brave6. Another was also made for brave5 despite almost certainly no more released on that line of code.

The problem is that a normal person would expect "armeria-brave" to have the more recent version of brave, and instead they will be pinned and not receive code updates. They will have no easy way to find this out because there is no code in "armeria-brave" to mark deprecated. This basically means people will unknowingly always stay at an old version.

Another choice would have been to still make the separate modules, but make the main "armeria-brave" tactically set the old dependency it had before. This is better because it allows a migration without serious impact. This is what I believe would have been the choice if it wasn't rushed to stop a fire at LINE.

I hope people can consider this and merge it with any modifications that keep LINE not having to manage versions, yet not pin the rest of the world to an old library.

If not, I hope people can be transparent with who is making the decision and literally what the problem is, as this doesn't seem difficult to fix from how it was described in #5438. Maybe others who know the library like @kojilin can explain if somehow managing a dependency like this uniquely cannot work at LINE. I often promote armeria as a project for everyone, not just LINE, and hope we can turn this around.

Modifications:

- Remove `armeria-brave` module

Result:

- (Breaking) The `armeria-brave` module has been fully removed. Please switch to using `armeria-brave6` along with additional dependencies:
  - `zipkin-reporter` if you are utilizing `AsyncZipkinSpanHandler`.
  - `zipkin` if you are utilizing `ZipkinSpanHandler`.
  - Alternatively, use `armeria-brave5` if you wish to retain the previous module functionality.
Co-authored-by: minux <songmw725@gmail.com>
  • Loading branch information
codefromthecrypt and minwoox committed Mar 12, 2024
1 parent 53d7cad commit 7dc4c87
Show file tree
Hide file tree
Showing 8 changed files with 128 additions and 13 deletions.
3 changes: 0 additions & 3 deletions brave/brave/build.gradle

This file was deleted.

18 changes: 11 additions & 7 deletions brave/brave5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ dependencies {
}

def brave6ProjectDir = "${rootProject.projectDir}/brave/brave6"
tasks.compileJava.source "${brave6ProjectDir}/src/main/java"
tasks.processResources.from "${brave6ProjectDir}/src/main/resources"
tasks.compileTestJava.source "${brave6ProjectDir}/src/test/java"
tasks.processTestResources.from "${brave6ProjectDir}/src/test/resources"
tasks.sourcesJar.from "${brave6ProjectDir}/src/main/java"
tasks.sourcesJar.from "${brave6ProjectDir}/src/main/resources"
tasks.javadoc.source "${brave6ProjectDir}/src/main/java"

tasks.register('generateSources', Copy.class) {
from "${brave6ProjectDir}/src"
into "${project.ext.genSrcDir}"
exclude '**/package-info.java'
}

tasks.compileJava.dependsOn(generateSources)
tasks.processResources.dependsOn(generateSources)
tasks.compileTestJava.dependsOn(generateSources)
tasks.processTestResources.dependsOn(generateSources)

ext {
testThriftSrcDirs = ["$brave6ProjectDir/src/test/thrift"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.client.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.common.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.internal.common.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright 2019 LINE Corporation
*
* LINE Corporation licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/

/**
* Distributed tracing services based on <a href="https://github.com/openzipkin/brave">Brave</a>,
* a Java tracing library compatible with <a href="http://zipkin.io/">Zipkin</a>.
*
* @deprecated Use armeria-brave6 module.
* See <a href="https://armeria.dev/release-notes/1.28.0#%EF%B8%8F-breaking-changes">
* 1.28 Breaking Changes</a> for more information.
*/
@Deprecated
@NonNullByDefault
package com.linecorp.armeria.server.brave;

import com.linecorp.armeria.common.annotation.NonNullByDefault;
2 changes: 1 addition & 1 deletion dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ assertj = "3.25.2"
awaitility = "4.2.0"
blockhound = "1.0.8.RELEASE"
bouncycastle = "1.70"
brave5 = "5.18.0"
brave5 = "5.18.1"
brave6 = "6.0.0"
brotli4j = "1.15.0"
bucket4j = "7.6.0"
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ includeWithFlags ':version-catalog', 'version-catalog'

// Published Java projects
includeWithFlags ':annotation-processor', 'java', 'publish', 'relocate'
includeWithFlags ':brave', 'java', 'publish', 'relocate', 'no_aggregation'
project(':brave').projectDir = file('brave/brave')
includeWithFlags ':brave5', 'java', 'publish', 'relocate', 'no_aggregation'
project(':brave5').projectDir = file('brave/brave5')
includeWithFlags ':brave6', 'java', 'publish', 'relocate', 'native'
Expand Down

0 comments on commit 7dc4c87

Please sign in to comment.