-
Notifications
You must be signed in to change notification settings - Fork 196
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
Persist ReplayFlowFactoryAction#sandbox
#968
Persist ReplayFlowFactoryAction#sandbox
#968
Conversation
In CBCI HA scenarios, the Queue.Item (and its actions) can be rescheduled in another Jenkins replica. In such case it is required to persist the `sandbox` field, otherwise the reschedule will run without sandbox.
ReplayFlowFactoryAction#sandbox
@@ -52,7 +52,7 @@ class ReplayFlowFactoryAction extends InvisibleAction implements CpsFlowFactoryA | |||
|
|||
private String replacementMainScript; | |||
private final Map<String,String> replacementLoadedScripts; | |||
private transient final boolean sandbox; | |||
private final boolean sandbox; |
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.
Could avoid persisting it in build.xml
as well, though unlike replacementMainScript
the size impact is negligible.
plugin/src/test/java/org/jenkinsci/plugins/workflow/Workflow2Test.java
Outdated
Show resolved
Hide resolved
plugin/src/test/java/org/jenkinsci/plugins/workflow/Workflow2Test.java
Outdated
Show resolved
Hide resolved
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.
Looks good, other than questions about test style. Current Windows failures look like flakes.
In CBCI HA scenarios, the
Queue.Item
(and its actions) can be rescheduled in another Jenkins replica. In such case it is required to persist thesandbox
field, otherwise the reschedule will run without sandbox.In a regular OSS Jenkins, you can hit the problem is you disable concurrent build execution and arrange for a build to be queued, then restart the controller, as demonstrated in the provided test.
Testing done
Tested in CBCI HA context.
Submitter checklist