-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
8338603: DiagnosticCommandMBean operations should standardize types for parameters #21040
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back kevinw! A progress list of the required criteria for merging this PR into |
@kevinjwalls This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 44 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
@kevinjwalls The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
DiagnosticCommandMBean provides JMX/MBean access to DiagnosticCommands, aka jcmds, as operations. The range of types for operation parameters is not well specified. In "dcmd.arg.type" it is: "the name of a type recognized by the diagnostic command parser. These types are not Java types and are implementation dependent." We never clarify the range of type names an application can see via the MBean. JMC for example has a historical connection, so it just knows the implementation-specific parameter types to expect. I suggested in a jcmd change that we add a FILE parameter type, it is informative for humans and can have specific meaning internally in addition to being a String. However we find JMC does not recognise it and does not permit editing that operation parameter. It wasn't clear to me at the time that these jcmd/DCmd parameter type names were consumed by other software (i.e. not just appearing in the help, for humans). Standardising or at least ensuring the parameter type list is stable, is needed. No need to change the documentation at this stage, this can be still be implementation dependent. We can't standardise on Java or OpenType names or applications such as JMC will break significantly. But we can standardise on the core list of parameter types that we have: BOOLEAN, STRING and INT are the main types. (JULONG had been added, but was not handled by apps e.g. JMC, and replacement with INT is in progress separately, JDK-8340113.) If a DiagnosticCommand parameter has a type which is outside the standard list, it should publish it via the MBean Operation with a dcmd.arg.type of STRING to avoid confusing applications. An existing test (DcmdMBeanTest.java) finds dcmds and shows parameters, e.g. dcmd.arg.type=STRING |
Webrevs
|
Hi, |
DiagnosticCommandImpl should only publish parameter types in a known standard set, and use "STRING" on anything else.
e.g. We can say "FILE" in the help output for jcmd, as that's for humans, but the MBean parameter info should contain "STRING".
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21040/head:pull/21040
$ git checkout pull/21040
Update a local copy of the PR:
$ git checkout pull/21040
$ git pull https://git.openjdk.org/jdk.git pull/21040/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 21040
View PR using the GUI difftool:
$ git pr show -t 21040
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21040.diff
Webrev
Link to Webrev Comment