[JIRA] (JENKINS-57959) Upgrade past args4j 2.32

16 views
Skip to first unread message

me@basilcrow.com (JIRA)

unread,
Jun 11, 2019, 9:41:02 AM6/11/19
to jenkinsc...@googlegroups.com
Basil Crow started work on Task JENKINS-57959
 
Change By: Basil Crow
Status: Open In Progress
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

me@basilcrow.com (JIRA)

unread,
Jun 11, 2019, 9:41:06 AM6/11/19
to jenkinsc...@googlegroups.com
Basil Crow created an issue
 
Jenkins / Task JENKINS-57959
Upgrade past args4j 2.32
Issue Type: Task Task
Assignee: Basil Crow
Components: core, remoting
Created: 2019-06-11 13:40
Priority: Minor Minor
Reporter: Basil Crow

Problem

After an attempted upgrade of args4j in jenkinsci/swarm-plugin#120, the following exception was thrown:

java.lang.IllegalStateException: Cannot set value to a final field 'hudson.remoting.jnlp.Main.urls'.
        at org.kohsuke.args4j.spi.Setters.create(Setters.java:32)
        at org.kohsuke.args4j.ClassParser.parse(ClassParser.java:34)
        at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:96)
        at org.kohsuke.args4j.CmdLineParser.<init>(CmdLineParser.java:71)
        at hudson.remoting.jnlp.Main._main(Main.java:215)
        at hudson.remoting.jnlp.Main.main(Main.java:188)
        at hudson.plugins.swarm.SwarmClient.connect(SwarmClient.java:325)
        at hudson.plugins.swarm.Client.run(Client.java:193)
        at hudson.plugins.swarm.Client.main(Client.java:130)

Evaluation

As of args4j 2.32, "final fields can no longer be set." If an args4j field is marked with the final keyword, an IllegalStateException is thrown.

Solution

Remove the final keyword from the fields that we expect args4j to set.

Phase 1

Implemented in jenkinsci/remoting#326. See the PR for testing done.

Phase 2

Once this change is merged and released, we can proceed with updating args4j in Jenkins core, which also involves updating the args4j dependency in Remoting. I'm explicitly postponing that work to a future PR, since at the present time Jenkins core is not using the latest version of Remoting due to a Remoting bug (see jenkinsci/jenkins#4047).

jthompson@cloudbees.com (JIRA)

unread,
Jun 19, 2019, 6:46:04 PM6/19/19
to jenkinsc...@googlegroups.com
Jeff Thompson reopened an issue
Change By: Jeff Thompson
Resolution: Fixed
Status: Resolved Reopened

jthompson@cloudbees.com (JIRA)

unread,
Jun 19, 2019, 6:46:04 PM6/19/19
to jenkinsc...@googlegroups.com
Jeff Thompson resolved as Fixed
Change By: Jeff Thompson
Status: In Progress Resolved
Resolution: Fixed
Released As: Remoting 3.32

jthompson@cloudbees.com (JIRA)

unread,
Jun 19, 2019, 6:46:04 PM6/19/19
to jenkinsc...@googlegroups.com
Jeff Thompson commented on Task JENKINS-57959
 
Re: Upgrade past args4j 2.32

Remoting side is released in 3.32. Not yet included into master.

jthompson@cloudbees.com (JIRA)

unread,
Jun 19, 2019, 6:47:02 PM6/19/19
to jenkinsc...@googlegroups.com
Jeff Thompson updated an issue
Change By: Jeff Thompson
Comment:
Remoting side is released in 3.32. Not yet included into master.

jthompson@cloudbees.com (JIRA)

unread,
Jun 20, 2019, 12:46:02 PM6/20/19
to jenkinsc...@googlegroups.com

The Remoting side of this change was released in version 3.33 of Remoting, where it upgraded to args4j version 2.33. 

me@basilcrow.com (JIRA)

unread,
Jun 20, 2019, 12:59:02 PM6/20/19
to jenkinsc...@googlegroups.com

The Swarm side was merged in jenkinsci/swarm-plugin#120 and jenkinsci/swarm-plugin#135. All integration tests passing and should be released eventually in Swarm 3.18.

dbeck@cloudbees.com (JIRA)

unread,
Jun 24, 2019, 7:24:14 AM6/24/19
to jenkinsc...@googlegroups.com
Daniel Beck resolved as Fixed
Change By: Daniel Beck
Status: Reopened Resolved
Resolution: Fixed
Released As: Remoting 3.32 , jenkins-2.182
Reply all
Reply to author
Forward
0 new messages