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-54484] - Java 10 Support + clean + verify compatibility with old Program.Dat #77

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
3fcfc2e
[JENKINS-52001] - Update JBoss Marshalling to 2.0.5.Final in order to…
oleg-nenashev Jun 18, 2018
38984f8
[JENKINS-52001] - Bump to the core versions with new BCT
oleg-nenashev Jun 18, 2018
b10885c
Initial fixes to allow build with rough Java10 support
svanoort Jun 18, 2018
bda50b2
Merge pull request #64 from oleg-nenashev/java10/JENKINS-52001
svanoort Jun 18, 2018
bacb9d9
Disable broken unit tests to permit us to deploy an Incremental
svanoort Jun 18, 2018
9c0d5f5
[JENKINS-52001] - Skip Tests in buildPlugin()
oleg-nenashev Jun 19, 2018
5c80fa9
[JENKINS-52001] - Kickstart the build after the Pipeline Library update
oleg-nenashev Jun 19, 2018
e017dc5
Merge commit 'bda50b2b5be5324b3075af7cd01256dccea6711e' into java10/J…
oleg-nenashev Jun 19, 2018
be9a5ea
Merge pull request #66 from oleg-nenashev/java10/JENKINS-52001
svanoort Jun 19, 2018
34609aa
Consume new animalsniffer dependency and re-enable testing
svanoort Jun 22, 2018
f6d88d0
Pick up core incremental build for now
svanoort Jun 22, 2018
4420c05
Remove core dependency so we can run this on current Jenkins and re-e…
svanoort Jun 26, 2018
be6f10c
Prevent enforcer failure due to multi-release JAR for JBoss Marshalling
svanoort Jun 27, 2018
43d37d4
Merge commit '8105510ba5617c19e90c8cf5ee467fb559833d8d' into java10-s…
oleg-nenashev Sep 20, 2018
d243824
Mark compatiblesince for change in serialization
svanoort Sep 22, 2018
8880828
Tests come back?
svanoort Sep 22, 2018
96d1cab
Merge remote-tracking branch 'svanoort/java10-support-clean' into jav…
svanoort Sep 22, 2018
3c1d020
Merge branch 'java10-support' into java10-support-clean
svanoort Sep 22, 2018
5ca1045
Test of deserialization of program.dat
svanoort Oct 22, 2018
f78b6d4
Merge branch 'testcase-fofor-program-dat' into java10-support-clean-f…
svanoort Oct 22, 2018
497275c
Pom integration fixes
svanoort Oct 22, 2018
25d02b3
Fix the deserialize test
svanoort Oct 22, 2018
a3b23f9
Fix the deserialize test
svanoort Oct 22, 2018
60fc4b0
Fix testcase
svanoort Oct 22, 2018
d625be1
Merge branch 'testcase-fofor-program-dat' into java10-support-clean-f…
svanoort Oct 22, 2018
415fb14
Fix oopsy with merge
svanoort Oct 22, 2018
3efea44
Comment out test temporarily
svanoort Dec 3, 2018
1f65c25
Fix pom
svanoort Dec 3, 2018
b35e244
Save the experimental bumps
svanoort Dec 3, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.21</version>
<version>3.22</version>
<relativePath />
</parent>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand Down Expand Up @@ -92,12 +92,18 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.39</version>
<version>1.48</version>
</dependency>
<dependency>
<groupId>org.jboss.marshalling</groupId>
<artifactId>jboss-marshalling-river</artifactId>
<version>1.4.12.jenkins-3</version> <!-- https://github.com/jglick/jboss-marshalling/compare/1.4.12.Final...1.4.12.jenkins-3 -->
<version>2.0.5.Final</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>annotation-indexer</artifactId>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not be here. Defined in the parent POM.

<version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand All @@ -121,13 +127,13 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.14</version>
<version>1.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>2.42</version>
<version>2.61</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -215,6 +221,12 @@
<version>2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>pipeline-input-step</artifactId>
<version>2.8</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand All @@ -226,6 +238,25 @@
<compatibleSinceVersion>2.17</compatibleSinceVersion>
</configuration>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>display-info</id>
<configuration>
<rules>
<enforceBytecodeVersion>
<excludes combine.children="append">
<!-- Prevents enforcer complaining about multi-release JAR -->
<exclude>org.jboss.marshalling:jboss-marshalling-river</exclude>
<exclude>org.jboss.marshalling:jboss-marshalling</exclude>
</excludes>
</enforceBytecodeVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package org.jenkinsci.plugins.workflow.support.pickles.serialization;

import jenkins.model.Jenkins;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.jenkinsci.plugins.workflow.support.steps.input.InputAction;
import org.jenkinsci.plugins.workflow.support.steps.input.InputStepExecution;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.recipes.LocalData;

import java.util.List;

/**
* Tests deserializing program.dat, useful to catch
*/
public class DeserializeUpdate {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to upstream the test to the master branch. It is helpful independently of whether we merge it or not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't generally upstream failing tests

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it should be passing on Java 8, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oleg-nenashev No, because the actual code binary format is different, on Java 8 as well -- it's the bump to the marshaller that does it, not the specific java version in use.

@ClassRule
public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule
public JenkinsRule r = new JenkinsRule();

private static InputStepExecution getInputStepExecution(WorkflowRun run, String inputMessage) throws Exception {
InputAction ia = run.getAction(InputAction.class);
List<InputStepExecution> execList = ia.getExecutions();
return execList.stream().filter(e -> inputMessage.equals(e.getInput().getMessage())).findFirst().orElse(null);
}

@Test
@LocalData
@Ignore
public void testBasicSerializeDeserialize() throws Exception {
WorkflowJob job = Jenkins.getInstance().getItemByFullName("serial-format", WorkflowJob.class);
WorkflowRun run = job.getLastBuild();
Assert.assertTrue(run.isBuilding());
InputStepExecution ise = getInputStepExecution(run, "give me cheese");
ise.doProceedEmpty();
r.waitForCompletion(run);
r.assertBuildStatusSuccess(run);
}
}
Binary file not shown.