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-40109] Make compilation errors serializable #54

Merged
merged 10 commits into from Oct 2, 2018

Conversation

Projects
None yet
5 participants
@dwnusbaum
Copy link
Member

dwnusbaum commented Oct 1, 2018

See JENKINS-40109. Subsumes #53 (CC @rudolfwalter).

This PR uses the exception introduced in jenkinsci/workflow-cps-plugin#250 to make compilation errors thrown during shared library loading serializable. The PR also updates some dependencies to satisfy the Maven enforcer and incrementalifies the plugin.

@reviewbybees

@dwnusbaum dwnusbaum requested a review from abayer Oct 1, 2018

@@ -1 +1 @@
buildPlugin(jenkinsVersions: [null, '2.60.3', '2.89'])
buildPlugin(jenkinsVersions: [null, '2.138.1'])

This comment has been minimized.

Copy link
@dwnusbaum

dwnusbaum Oct 1, 2018

Author Member

Current baseline is 2.60.3, so there's no point to test against it twice, and I figured 2.89 was probably added to test against newer Jenkins versions so I went ahead and updated to the latest LTS.

This comment has been minimized.

Copy link
@svanoort

svanoort Oct 2, 2018

Member

🤷‍♂️

@dwnusbaum

This comment has been minimized.

Copy link
Member Author

dwnusbaum commented Oct 1, 2018

Test failures are legitimate, probably caused by the dependency updates. I'm looking into them.

@abayer

This comment has been minimized.

Copy link
Member

abayer commented Oct 1, 2018

@dwnusbaum It's the core version - needs to be 2.62 or higher thanks to workflow-cps.

@dwnusbaum

This comment has been minimized.

Copy link
Member Author

dwnusbaum commented Oct 1, 2018

@abayer Yeah I saw that, and tested out bumping it, but still had some issues locally (probably because I didn't clean out build artifacts correctly before updating it). I am rerunning tests locally against 2.73.x. EDIT: Seems like my first run against 2.73.x was a fluke, second run passed with no issues.

@dwnusbaum

This comment has been minimized.

Copy link
Member Author

dwnusbaum commented Oct 2, 2018

Looks like a test not directly to this change (SCMRetrieverTest) is failing because a path is too long for Windows:

stderr: C:/Jenkins/workspace/cps-global-lib-plugin_PR-54-NAGP2QJUN4SJP4A3KASYPBGZI57HSOSNKF5LUE7P53LG3GKFD6KQ/target/tmp/jenkinsTests.tmp/jenkins6108956040851236483test/workspace/mp_branch-TTIP6J74P423JEJOPRQJUYPNRMKWAGJEYWO2IWTIU6S3CBQSL2UQ@script/.git/refs: Filename too long

I'll take a look and see what I can do to shorten it.

@@ -49,6 +51,7 @@

@Url("https://stackoverflow.com/a/49112612/12916")
@Test public void selfTestLibraries() throws Exception {
Assume.assumeFalse("File names are too long for Windows", Functions.isWindows());

This comment has been minimized.

Copy link
@dwnusbaum

dwnusbaum Oct 2, 2018

Author Member

It doesn't feel right to try to nickel-and-dime the file names to save a few characters ("mp" -> "m", "branch" -> "b", "master" -> "m"), when the main issue (I think) is due to having 2 hashes included from branch-api in the path (One for ci.jenkins.io, and one for the test itself) in addition to the integer suffix on the JenkinsRule's JENKINS_HOME directory. AIUI jenkinsci/branch-api-plugin#129 might make this better.

This comment has been minimized.

Copy link
@jglick

jglick Oct 2, 2018

Member

jenkinsci/plugin-pom#125 may help somewhat.

This comment has been minimized.

Copy link
@jglick

jglick Oct 2, 2018

Member

3.24 now

This comment has been minimized.

Copy link
@dwnusbaum

dwnusbaum Oct 2, 2018

Author Member

Updated and unignored the test in 1be0912. Thanks for the heads up about the parent pom change!

This comment has been minimized.

Copy link
@dwnusbaum

dwnusbaum Oct 2, 2018

Author Member

Still failing, will probably just revert and leave the test ignored for now on Windows. It seems strange that there are nested junit folders in the workspace, but I'm not sure if that is related to any of the recent changes: ...\target\tmp\junit5127255811482076289\junit7031506459549069085

@abayer

abayer approved these changes Oct 2, 2018

@abayer

abayer approved these changes Oct 2, 2018

@svanoort
Copy link
Member

svanoort left a comment

LGTM, please feel free to merge/release

@dwnusbaum dwnusbaum merged commit 569c490 into jenkinsci:master Oct 2, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@dwnusbaum dwnusbaum deleted the dwnusbaum:JENKINS-40109 branch Oct 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.