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

Implement SubTask.getOwnerExecutable #287

Merged
merged 5 commits into from
Mar 27, 2023

Conversation

jglick
Copy link
Member

@jglick jglick commented Jan 23, 2023

Implements the API introduced in jenkinsci/jenkins#7599, for now without requiring a newer core dep.

@jglick jglick requested a review from a team January 23, 2023 20:27
@@ -429,6 +429,7 @@ public String getCookie() {
return j.getNode(label);
}

@Deprecated
Copy link
Member Author

Choose a reason for hiding this comment

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

Not really related, just noticed while I was here.

@@ -721,7 +736,7 @@ private String computeEnclosingLabel(FlowNode executorStepNode, List<FlowNode> h
}

@Override public long getEstimatedDuration() {
Run<?,?> r = run();
Run<?,?> r = runForDisplay();
Copy link
Member Author

Choose a reason for hiding this comment

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

Also only tangentially related—there was no apparent reason not to be calling the newer and more robust runForDisplay in this context.

@@ -613,6 +613,7 @@ private static void assertLogMatches(WorkflowRun build, String regexp) throws IO
Queue.Item[] items = Queue.getInstance().getItems();
assertEquals(1, items.length);
assertEquals(p, items[0].task.getOwnerTask());
assertEquals(b, items[0].task.getOwnerExecutable());
Copy link
Member Author

Choose a reason for hiding this comment

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

Test is covering something unrelated, but seemed as good a place as any to cover the new method.

@jglick jglick marked this pull request as draft January 24, 2023 13:33
@jglick jglick changed the title Implement SubTask.getOwnerExecutable Implement SubTask.getOwnerExecutable Jan 24, 2023
@jglick jglick marked this pull request as ready for review January 26, 2023 12:16
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