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

[JENKINS-37389] add @Symbol("custom") to CustomTool's descriptor #63

Merged
merged 1 commit into from Jul 26, 2023

Conversation

agabrys
Copy link
Contributor

@agabrys agabrys commented Jan 19, 2022

The @Symbol annotation defines a unique identifier which is used by DSL. Whit this commit it is possible to distinguish a difference between tools when the the tool step is called. Example:

  • tool name: 'myTool', type: 'jdk' ← returns JDK with id "myTool"
  • tool name: 'myTool', type: 'custom' ← returns custom tool with id "myTool"

Addresses JENKINS-37389 Add @Symbol("custom") to Custom Tool's ToolDescriptor.

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

I didn't add any tests. Every extension should be annotated with @Symbol. Its value must be unique within a specific extension point, and there are no other tools with custom identifier (the change is safe).

@agabrys
Copy link
Contributor Author

agabrys commented Jan 20, 2022

@oleg-nenashev could you take a look? A very small PR which makes the tools management safer.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

In principle it should be Okay. Maybe even 'customTool' so that avoid potential naming conflicts

The `@Symbol` annotation defines a unique identifier which is used by DSL. Whit this commit it is possible to distinguish a difference between tools when the the `tool` step is called. Example:
* tool name: 'myTool', type: 'jdk' <- returns JDK with id "myTool"
* tool name: 'myTool', type: 'custom' <- returns custom tool with id "myTool"
@agabrys
Copy link
Contributor Author

agabrys commented Jan 20, 2022

Jenkins failure is not related to the introduced changes. I have no powers to restart the build, so I force pushed the commit so scheduled it again.


If you prefer, I can change it from custom to customTool. However, it looks a little redundant to me:

tool name: 'xyz', type: 'custom'

vs.

tool name: 'xyz', type: 'customTool'

Where other don't use the suffix:

tool name: '17', type: 'jdk'
tool name: '3.2.5', type: 'maven'
tool name: '16', type: 'nodejs'

Please decide. I'll update (or not) based on the decision the PR and then we may merge it and maybe even release a new version (would be great) 🙂

@agabrys
Copy link
Contributor Author

agabrys commented Jun 21, 2022

Ping 🙂

@agabrys
Copy link
Contributor Author

agabrys commented Sep 16, 2022

Pong 🎾

@joel-schaal
Copy link

If there is no issue, can someone accept the PR ?
If I understand properly this conversation, this is the single thing that prevents to use Custom Tools in a declarative pipeline.

@pellared
Copy link

@oleg-nenashev Is there any reason that this PR is not merged yet?

@oleg-nenashev
Copy link
Member

Hello, there are 2.key reasons:

  1. This plugin is up for adoption, I no longer actively maintain it
  2. I am on sabbatical in the Jenkins community because of the war in Ukraine and the personal situation

All contributors interested in the plugin are welcome to step up as maintainers. Thanks for understanding

@pellared
Copy link

This plugin is up for adoption, I no longer actively maintain it

I would consider adding a notice in README.md telling that this repository is not actively and give a hyperlink to https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/.

I am on sabbatical in the Jenkins community because of the war in Ukraine and the personal situation

I wish you all the best ❤️

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

OLK, let's merge it so that it does not wait in the queue. I might get to releasing plugins during my vacation in Aug

@oleg-nenashev oleg-nenashev merged commit 27beb09 into jenkinsci:master Jul 26, 2023
11 checks passed
@agabrys agabrys deleted the feature/JENKINS-37389 branch July 26, 2023 08:02
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.

None yet

4 participants