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

Remove <optional> from config-file-provider dependency #1414

Closed
wants to merge 1 commit into from
Closed

Remove <optional> from config-file-provider dependency #1414

wants to merge 1 commit into from

Conversation

strangelookingnerd
Copy link
Contributor

Remove the optional flag from the config-file-provider dependency.
To my understanding this dependency is directly referenced in ExecuteDslScripts as well as JenkinsDslScriptLoader and for that reason should not be optional.

Resolves jenkinsci/custom-folder-icon-plugin#280

Testing done

Ran existing tests without any errors.

Submitter checklist

@strangelookingnerd strangelookingnerd requested a review from a team as a code owner January 8, 2024 11:42
@strangelookingnerd
Copy link
Contributor Author

@jenkinsci/job-dsl-plugin-developers any chance this can be reviewed, merged & released?

@jonesbusy
Copy link
Contributor

Not a maintainer of job-dsl-plugin but it's weird for me to hard depends on the config-file-provider

What about

&& Jenkins.get().getPluginManager().getPlugin("config-file-provider") != null) {

This check if the plugin is installed

Also here :

GlobalConfigFiles globalConfigFiles = GlobalConfigFiles.get();

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

@strangelookingnerd
Copy link
Contributor Author

strangelookingnerd commented Aug 27, 2024

This plugin seems to comply with https://www.jenkins.io/doc/developer/plugin-development/optional-dependencies/ before this PR.

This is true, however I'd argue that the ExecuteDslScripts and JenkinsDslScriptLoader can be considered core functionallities of this plugin. If these fail to load in case the optional dependency is not present, I don't see the point in them being optional.

@basil
Copy link
Member

basil commented Aug 27, 2024

If these fail to load in case the optional dependency is not present, I don't see the point in them being optional.

Based on the Jenkins.get().getPluginManager().getPlugin("config-file-provider") != null) guard, they seem like they should load as described in https://www.jenkins.io/doc/developer/plugin-development/optional-dependencies/ -- are you saying that they aren't loading when the optional dependency is not present?

@strangelookingnerd
Copy link
Contributor Author

Based on the Jenkins.get().getPluginManager().getPlugin("config-file-provider") != null) guard, they seem like they should load as described in https://www.jenkins.io/doc/developer/plugin-development/optional-dependencies/ -- are you saying that they aren't loading when the optional dependency is not present?

I was under the assumption, yes. However I fail to reproduce the error from jenkinsci/custom-folder-icon-plugin#280 / jenkinsci/maven-hpi-plugin#391

Closing the PR 👍🏼

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.

custom-folder-icon 2.11 fails tests in plugin bill of materials
3 participants