[JIRA] (JENKINS-51931) Directive Generator produces NPE with `when --> allOf --> (nothing else)`

2 views
Skip to first unread message

kshultz@cloudbees.com (JIRA)

unread,
Jun 13, 2018, 2:37:01 PM6/13/18
to jenkinsc...@googlegroups.com
Karl Shultz created an issue
 
Jenkins / Bug JENKINS-51931
Directive Generator produces NPE with `when --> allOf --> (nothing else)`
Issue Type: Bug Bug
Assignee: Andrew Bayer
Attachments: image-2018-06-13-14-36-02-967.png
Components: pipeline-model-definition-plugin
Created: 2018-06-13 18:36
Environment: Jenkins:
- Core 2.127
- Experimental UC plugins
- Declarative at 1.3.0-SNAPSHOT, which was master at commit eeb92e42
Priority: Minor Minor
Reporter: Karl Shultz

Summary
When using the Directive Generator, building a when / allOf directive with no conditions attached produces a NPE. This was another accidental find.

Steps to recreate
1. Go to the Declarative Directive Generator via http://1.2.3.4:8080/job/your-pipeline-job/directive-generator/

2. Set it up as follows:

  • Sample Directive: when
  • whenCondition: allOf
  • Execute the stage if all nested conditions are true: no selections made

3. And press the Generate Declarative Directive button, you'll get a NPE in your sample:

when {
  // ERROR TRANSLATING CONDITIONAL: java.lang.NullPointerException
}

Accidental find.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 9:44:02 AM8/7/18
to jenkinsc...@googlegroups.com
Change By: Andrew Bayer
Status: In Progress Review
This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 9:44:02 AM8/7/18
to jenkinsc...@googlegroups.com
Andrew Bayer started work on Bug JENKINS-51931
 
Change By: Andrew Bayer
Status: Open In Progress

andrew.bayer@gmail.com (JIRA)

unread,
Aug 7, 2018, 9:45:02 AM8/7/18
to jenkinsc...@googlegroups.com

andrew.bayer@gmail.com (JIRA)

unread,
Aug 13, 2018, 12:09:01 PM8/13/18
to jenkinsc...@googlegroups.com
 

This'll be in 1.3.2

Change By: Andrew Bayer
Status: In Review Resolved
Resolution: Fixed

bitwiseman@gmail.com (JIRA)

unread,
Oct 22, 2019, 11:24:13 PM10/22/19
to jenkinsc...@googlegroups.com
Liam Newman closed an issue as Fixed
 

Bulk closing resolved issues.

Change By: Liam Newman
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages