Skip to content

FlowExecutionList.Storage #370

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

Merged
merged 11 commits into from
Jan 14, 2025
Merged

Conversation

jglick
Copy link
Member

@jglick jglick commented Jan 7, 2025

Subsumes #368 & #369. Supersedes #312. Extension point used by CloudBees CI in HA mode to implement alternate behavior.

@jglick jglick requested a review from a team as a code owner January 7, 2025 00:00
@jglick jglick marked this pull request as draft January 7, 2025 00:00
@@ -44,6 +44,8 @@
*/
public abstract class FlowExecutionOwner implements Serializable {

private static final long serialVersionUID = 1796027762257567194L;
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently forgotten earlier. Even though this is abstract and has no fields, and the sole implementation is WorkflowRun.Owner which did specify an explicit serialVersionUID, Java serialization requires that all superclasses running from the concrete implementation class up to the topmost class implementing Serializable each have a stream class description including a compatible SVUID. Adding the getExternalizableId method changes the computed SVUID for the superclass, despite obviously making no changes to the actual serial form, so the previous effective value must be restored.

(Noticed via a proprietary test which involved serializing a WorkflowRun.Owner using a historical release of this plugin and then deserializing it in the current version. CC @gbhat618)

@@ -99,6 +101,25 @@ public String getUrlOfExecution() throws IOException {
return getUrl()+"execution/";
}

/**
* The {@link Run#getExternalizableId}, if this owner is indeed a {@link Run}.
Copy link
Member Author

@jglick jglick Jan 14, 2025

Choose a reason for hiding this comment

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

Called by the CloudBees CI implementation. See jenkinsci/workflow-job-plugin#499.

@jglick jglick marked this pull request as ready for review January 14, 2025 19:38
@jglick jglick requested a review from dwnusbaum January 14, 2025 19:38
@jglick jglick merged commit fb5780d into jenkinsci:master Jan 14, 2025
17 checks passed
@jglick jglick deleted the FlowExecutionList-storage branch January 14, 2025 21:15
jglick added a commit to jglick/workflow-job-plugin that referenced this pull request Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants