-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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-26100] Switch buildEnvVars and others to Run #492
Conversation
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK except for requested buildEnvVars
rename.
pom.xml
Outdated
@@ -24,7 +24,8 @@ | |||
<inceptionYear>2007</inceptionYear> | |||
|
|||
<properties> | |||
<jenkins.version>1.625.3</jenkins.version> | |||
<jenkins-core.version>2.58-20170501.171905-3</jenkins-core.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released --> | |||
<jenkins-war.version>2.58-20170501.171927-3</jenkins-war.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released --> | |||
<java.level>7</java.level> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8
@@ -470,7 +470,7 @@ protected String getCacheEntry() { | |||
} | |||
|
|||
protected static File getCacheDir(String cacheEntry) { | |||
Jenkins jenkins = Jenkins.getInstance(); | |||
Jenkins jenkins = Jenkins.getInstanceOrNull(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these should actually be getInstance()
with no null check, but good enough for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went for the most stupidly non-logic-altering Findbugs fix I could. =) Wasn't 100% sure there weren't some cases where they might be expecting the existing behavior with a possibly null jenkins
instance, so hey, better safe than sorry.
Not your fault, just a sign that this plugin’s buildPlugin(jenkinsVersions: [null, '2.32.3']) |
Last time I enabled the plugin compat tests, it failed because the combination of tests and compilation took more than an hour to complete. The ci.jenkins.io jobs (correctly) limit themselves to not more than an hour elapsed time for the total job. Plugin compat testing is enabled again, and we'll see if it performs better now. |
But |
With plugin compat enabled, it now does not timeout (maybe a false recollection on my part). It reports findbugs warnings on the 2.46.1 build which it does not report on other builds. Unfortunately, my first attempts to duplicate that result locally have failed. My findbugs is silent, even when I set My second attempt shows how to duplicate the problem. I mistakenly used -DskipTests, forgetting that it excludes findbugs runs for speed. If I run with at least one test, or with I suspect I won't have time to explore fixes until after the end of the working day today. Short term, I've stopped failing on findbugs warning messages. See daf202d |
The most common introduced FB error is due to @stephenc’s messing around with @SuppressFBWarnings(value="RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE", justification="TODO 1.653+ switch to Jenkins.getInstanceOrNull") Yes this is obnoxious which is why I asked him to leave existing methods alone, and rely on deprecations if necessary, but he insisted… |
FTR my NetBeans action binding for checking FindBugs:
|
I'm not sure that action binding will work with the git plugin's current pom. As far as I can tell, once My solution was |
This works in other plugins. FindBugs is skipped only if |
Thanks for the education! Inattentional blindness problem on my part. I saw the |
pom.xml
Outdated
<jenkins.version>1.625.3</jenkins.version> | ||
<java.level>7</java.level> | ||
<jenkins-core.version>2.58-20170502.192524-8</jenkins-core.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released --> | ||
<jenkins-war.version>2.58-20170502.192544-8</jenkins-war.version> <!-- TODO: Switch to release once https://github.com/jenkinsci/jenkins/pull/2730 is merged and released --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.61
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2.60 I meant.
Hudson hudson = Hudson.getInstance(); | ||
if (hudson == null) { | ||
Jenkins jenkins = Jenkins.getInstance(); | ||
if (jenkins == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just revert changes in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'k
buildEnvironment(build, env); | ||
} | ||
|
||
public void buildEnvironment(Run<?, ?> build, java.util.Map<String, String> env) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put in the usual TODOs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'k
Conflicts: pom.xml
looking forward to be published soon ==== |
Conflicts: pom.xml
@reviewbybees done @MarkEWaite Can I persuade you to merge this? =) |
It will be several days (at least) before I have a chance to review it. Can the merge wait until next week? What if it needs to wait another week beyond that? |
@MarkEWaite No rush at all - just wanted to make sure this wasn't lost. |
pom.xml
Outdated
<optional>true</optional> | ||
<<<<<<< HEAD | ||
</dependency> | ||
======= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad merge conflict resolution!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:shipit:
@MarkEWaite Any news? =) |
@abayer, sorry, but no progress on this pull request yet. Is it urgent, or blocking other work that I should place it ahead of other things in my queue (like the submodule checkout regression or the credential exclusion issue)? |
JENKINS-26100
Downstream of jenkinsci/jenkins#2730
cc @reviewbybees esp @MarkEWaite @jglick