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

Idea: Do not use version in dd-java-agent-<version>.jar #323

Closed
tjuchniewicz opened this issue Jul 9, 2024 · 4 comments · Fixed by #330
Closed

Idea: Do not use version in dd-java-agent-<version>.jar #323

tjuchniewicz opened this issue Jul 9, 2024 · 4 comments · Fixed by #330
Labels
note:good-first-issue A good first issue to get started with note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement

Comments

@tjuchniewicz
Copy link
Contributor

My idea would be to skip version number in dd-java-agent-<version>.jar file used by this BP.

Describe the Enhancement

This would allow to overwrite BP_NATIVE_IMAGE_BUILD_ARGUMENTS without knowing DD agent version. Currently to use BP_NATIVE_IMAGE_BUILD_ARGUMENTS we have to repeat DD agent parameter including version number which is not known before build:

 <BP_NATIVE_IMAGE_BUILD_ARGUMENTS>
                    -O3
                    -J-Xmx14g
                    -J-javaagent:/layers/paketo-buildpacks_datadog/datadog-agent-java/dd-java-agent-${datadog-agent.version}.jar
</BP_NATIVE_IMAGE_BUILD_ARGUMENTS>

On every DD agent update we have to provide new value for datadog-agent.version in our CI.

Motivation

This solution would be a workaround for native-image BP: paketo-buildpacks/native-image#302

@dmikusa
Copy link
Contributor

dmikusa commented Jul 14, 2024

I don't think we can have the JAR file w/out a version number because we want the things on disk to be as clear as possible about what they are, but we could perhaps add a symlink where the symlink doesn't have a version number. That would give something consistent to point to.

@dmikusa dmikusa added the type:enhancement A general enhancement label Jul 14, 2024
@tjuchniewicz
Copy link
Contributor Author

tjuchniewicz commented Jul 15, 2024

This would simplify our CI a lot. can we expect this will be implemented?

@dmikusa
Copy link
Contributor

dmikusa commented Jul 15, 2024

It's a reasonable thing to implement so eventually, yes, I think it'll get implemented. Being realistic, it's OSS software so there are no timelines or guarantees we can provide. If this is time-critical for you, you can submit a PR and we'll do our best to review that and get it merged.

I suspect that the symlink would get added here and then test coverage.

@dmikusa dmikusa added note:good-first-issue A good first issue to get started with note:ideal-for-contribution An issue that a contributor can help us with labels Jul 15, 2024
@tjuchniewicz
Copy link
Contributor Author

@dmikusa Looks manageable for me. I will create PR next weeks. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note:good-first-issue A good first issue to get started with note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants