Skip to content

2.2234 serial form incompatibility#770

Merged
jglick merged 8 commits intojenkinsci:masterfrom
jglick:upgrade
Mar 4, 2025
Merged

2.2234 serial form incompatibility#770
jglick merged 8 commits intojenkinsci:masterfrom
jglick:upgrade

Conversation

@jglick
Copy link
Copy Markdown
Member

@jglick jglick commented Feb 28, 2025

CloudBees-internal issue

For automated testing: #766 (comment): this seems like a cleaner way to run the test—can handle actual agents, and no need to commit binary files.

jenkinsci/kubernetes-plugin#1656 successfully verified via CloudBees proprietary integration test.

Manual testing in Docker-related plugins noted in downstream PRs.

@jglick jglick added the bug label Feb 28, 2025

private static final Logger LOGGER = Logger.getLogger(Upgrade.class.getName());

@Override public void configureShell(CpsFlowExecution context, GroovyShell shell) {

Check warning

Code scanning / Jenkins Security Scan

Jenkins: Potentially unsafe classes

This use of class [groovy.lang.GroovyShell](1) should be reviewed for unsafe behavior, like allowing XML External Entity injection, or arbitrary code execution.
@jglick

This comment was marked as outdated.

}
}

private static boolean isOld(FlowExecutionOwner owner) throws Exception {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note that this trick only works once:

diff --git pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/UpgradeTest.java pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/UpgradeTest.java
index 5f3b783f..095ebc62 100644
--- pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/UpgradeTest.java
+++ pipeline-model-definition/src/test/java/org/jenkinsci/plugins/pipeline/modeldefinition/UpgradeTest.java
@@ -118,6 +118,10 @@ public final class UpgradeTest {
                 var b = p.getBuildByNumber(1);
                 r.waitForMessage("Resuming build at ", b);
                 r.waitForMessage("Ready to run at ", b);
+            });
+            rr.then(r -> {
+                var p = r.jenkins.getItemByFullName("p", WorkflowJob.class);
+                var b = p.getBuildByNumber(1);
                 var proceed = Path.of(((StringParameterValue) b.getAction(ParametersAction.class).getParameter("PROCEED")).getValue());
                 System.err.println("Touching " + proceed);
                 Files.writeString(proceed, "go");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants