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

Filter to the minimal required dependencies for REST/HTTP usage #6

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

jeromepochat
Copy link
Contributor

This excludes all dependencies that not used while using REST/HTTP mode.

Testing done

Submitter checklist

Preview Give feedback

<!-- provided by core -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

#5 (review) still stands.

Copy link
Contributor Author

@jeromepochat jeromepochat Dec 11, 2023

Choose a reason for hiding this comment

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

No strong opinion on that as both solutions have pros and cons, but I suggest to follow the approach already in place in other Google plugins. So my proposal to use Guava from core.

Copy link
Member

Choose a reason for hiding this comment

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

I guess you mean from core.

OK.

Copy link
Member

Choose a reason for hiding this comment

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

if you exclude guava here and the sdk requires a higher version you will not get a enforcer upper-bounds error when bumping. so you would need to check on each and every update to the library proposed by dependabot.
Whilst this is fine - you should leave a comment on the dependency so it is not forgotten (same for all others).

<!-- provided by core -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

if you exclude guava here and the sdk requires a higher version you will not get a enforcer upper-bounds error when bumping. so you would need to check on each and every update to the library proposed by dependabot.
Whilst this is fine - you should leave a comment on the dependency so it is not forgotten (same for all others).

<exclusions>

<!-- use plugin dependency instead -->
<exclusion>
Copy link
Member

@jtnord jtnord Dec 11, 2023

Choose a reason for hiding this comment

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

if this is excluded - you will not get an upper-bounds error. rather add this dependency before the google-cloud-one.

note this will likely break spotless - but dependency order probably does matter here (as the depth would be the same unclear if maven-hpi will take it from the plugin or not - probably falls back to first definition - check)!

@aneveux aneveux added the developer A pull request that is interesting to developers to have released label Dec 12, 2023
@aneveux aneveux merged commit ed54787 into jenkinsci:master Dec 12, 2023
13 checks passed
@jeromepochat jeromepochat deleted the minimal-dependencies branch December 12, 2023 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer A pull request that is interesting to developers to have released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants