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

Use minimal SDK #228

Merged
merged 1 commit into from
Nov 25, 2023
Merged

Use minimal SDK #228

merged 1 commit into from
Nov 25, 2023

Conversation

jonesbusy
Copy link
Contributor

Currently migrating to external storage (artifact, etc..) and want to migrate job caches to S3 endpoint

Similar to S3 publisher : https://plugins.jenkins.io/s3/dependencies/, no need to bring all AWS dependencies (https://plugins.jenkins.io/aws-java-sdk-minimal/).

I'm not sure if there is a better migration path expect asking consumer to install the minimal SDK.

Testing done

Submitter checklist

@jonesbusy jonesbusy requested a review from a team as a code owner September 26, 2023 04:23
@repolevedavaj
Copy link
Contributor

Sorry for not yet replying. I will check it in the next days.

@jonesbusy
Copy link
Contributor Author

@repolevedavaj Hi any update there ?

@repolevedavaj
Copy link
Contributor

@jonesbusy Yes i checked but wanted to contact you: What is the benefit of using the minimal plugin?

@jonesbusy
Copy link
Contributor Author

@repolevedavaj The size. The minimal was created to optimize the size. It only contains core and basic service like S3. All the rest is not used by this plugin

The difference is insane

3.68 MB for the minimal https://repo.jenkins-ci.org/artifactory/releases/org/jenkins-ci/plugins/aws-java-sdk/aws-java-sdk-minimal/1.12.586-413.v6a_6c3a_420126/
273.97 MB for the all https://repo.jenkins-ci.org/artifactory/releases/org/jenkins-ci/plugins/aws-java-sdk/1.12.586-413.v6a_6c3a_420126/

If you want to keep the all flavor (But I don't want to see a valid reason) can you perform the conditional check on the descriptor ?

From https://www.jenkins.io/doc/developer/plugin-development/optional-dependencies/

if (Jenkins.getInstance().getPlugin("aws-java-sdk") != null || Jenkins.getInstance().getPlugin("aws-java-sdk-minimal") != null ) {
    
}

It don't bring any benefits in my opinion. Having user installing the minimal one even if they have already the aws-java-sdk is not a big deal. But forcing user to add 200MB of size per instance is just a no go.

Thanks!

<artifactId>aws-java-sdk</artifactId>
<version>${aws-java-sdk.version}</version>
<groupId>org.jenkins-ci.plugins.aws-java-sdk</groupId>
<artifactId>aws-java-sdk-minimal</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Part of bom

@repolevedavaj
Copy link
Contributor

@jonesbusy OK I see your point and I agree that trying to maintain backwards compatibility in this case is probably not that useful.

@repolevedavaj repolevedavaj merged commit c3fde9f into jenkinsci:main Nov 25, 2023
16 checks passed
@jonesbusy jonesbusy deleted the feature/use-minimal-sdk branch November 25, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants