-
Notifications
You must be signed in to change notification settings - Fork 403
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
[#5647] improvement(build): update the jar name to add gravitino prefix #5654
Conversation
I also encountered this network error on other pull requests. Is there a way to improve this?
It seems to be a network issue in the CI environment. |
It is occasional, maybe you can configure that gradle plugin to increase the timeout or add retry times (but it depends on if that plugin has such configurations). |
a267a77
to
5ad7d5e
Compare
I've discovered that the Additionally, the Therefore, setting the |
For some modules like spark, flink, we already added "gravitino-" as the project name, can you please check if your change will add the prefix again, also please align these modules with other modules. |
After looking into it, I found that the Moreover, it also looks like they need to do some custom work to get their naming conventions right. For example val scalaVersion: String = project.properties["scalaVersion"] as? String ?: extra["defaultScalaVersion"].toString()
val sparkVersion: String = libs.versions.spark33.get()
val sparkMajorVersion: String = sparkVersion.substringBeforeLast(".")
val baseName = "${rootProject.name}-spark-connector-runtime-${sparkMajorVersion}_$scalaVersion" |
build.gradle.kts
Outdated
@@ -413,6 +413,8 @@ subprojects { | |||
artifact(javadocJar) | |||
} | |||
|
|||
artifactId = "${rootProject.name.lowercase(Locale.getDefault())}-${project.name}" |
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.
Why the invocation to Locale.getDefault()
?
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 was following the code style in this script, where toLowerCase(Locale.getDefault())
is actually just toLowerCase()
.
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.
Specifying Local
for lowercase ()
API is a best practice in JVM language, otherwise we will get an expected result.
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.
Specify locale to en_us
specify Locale
I tested locally, LGTM, @orenccl do you have anything else needs to be addressed? |
Hi, @jerryshao |
@tengqm do you want to take another look? |
Good to learn this convention. |
p.s. I raised the question because I was checking the use case here. It is not about converting a general text message which are supposed to be localized. My understanding was that JAR names are always ASCII printable characters and we don't need (want to) over-engineer this to consider file names with "イ" or "い". |
I see. Yes, it depends. But some static check tools like error-prone, or IDEA itself may complain about this if the |
Hi @tengqm I'm going to merge this if there's no further comment. |
no objection from me |
What changes were proposed in this pull request?
As title
Why are the changes needed?
Fix: #5647
Does this PR introduce any user-facing change?
Makes users easy to know it is from Gravitino
How was this patch tested?
Execute Gradle command
./gradlew publishToMavenLocal -x test
then check in Maven local path.