Skip to content

chore(java): provide tar.gz artifact in releases - #2538

Open
bcmedeiros wants to merge 3 commits into
open-telemetry:mainfrom
bcmedeiros:add-tar-gz-java
Open

chore(java): provide tar.gz artifact in releases#2538
bcmedeiros wants to merge 3 commits into
open-telemetry:mainfrom
bcmedeiros:add-tar-gz-java

Conversation

@bcmedeiros

Copy link
Copy Markdown

Solution for #2536

@bcmedeiros
bcmedeiros requested a review from a team as a code owner August 16, 2026 12:32
@github-actions github-actions Bot added java Pull requests that update Java code ci labels Aug 16, 2026
@wpessers

Copy link
Copy Markdown
Member

@bcmedeiros in the workaround you mention in that issue you explicitly add the --chmod=755 arg. I think that something similar would still be required when trying to use this archive in your Dockerfile directly.

It looks like gradle's default file permissions make it so our wrapper scripts are all 644 (not executable)... When we use them inside a lambda layer there's no issue because aws lambda seems to automatically do some sort of normalization of permissions when extracting layer contents.

I think we can make the script files in the archive executable though, look at this example from gradle docs: https://docs.gradle.org/current/userguide/working_with_files.html#using_copyspec_dir_permissions
I'd suggest doing something similar to configure 755 permissions for our scripts, in that copySpec block.

Comment thread java/layer-wrapper/build.gradle.kts Outdated
@bcmedeiros

Copy link
Copy Markdown
Author

The tar.gz package will preserve the original permissions of the file as committed in git, while zip will not, that's probably why the workout was needed in my example.
I'm pretty sure I tested the tar had 755 scripts, but I'm on my phone now, I can't check how the files are in git.
Anyway, we could apply your suggestion, it won't cause any harm.

Co-authored-by: Warre Pessers <45464718+wpessers@users.noreply.github.com>
@bcmedeiros

Copy link
Copy Markdown
Author

you were right, @wpessers, Gradle's from("scripts") normalizes the file permissions. I've accepted your proposed changes.

@tylerbenson tylerbenson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for taking care of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants