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

build attribute for buildProgressBar should be a Queue.Executable, not a Queue.Task #330

Merged
merged 3 commits into from
Aug 11, 2023

Conversation

dwnusbaum
Copy link
Member

@dwnusbaum dwnusbaum commented Aug 9, 2023

See https://github.com/jenkinsci/jenkins/blob/4c5e4f86d1fb3bce5d027446e12259c7edcac27f/core/src/main/resources/lib/hudson/buildProgressBar.jelly#L29.

In practice this did not matter because the Jelly template only ever used build.url in this case, which is the same between PlaceholderTask and PlaceholderExecutable, but it causes problems with some changes I am proposing upstream in jenkinsci/jenkins#8321 where we actually need to find the associated Run, see this comment in particular.

Testing done

Tested manually.

Submitter checklist

Preview Give feedback

@jglick
Copy link
Member

jglick commented Aug 9, 2023

@jglick jglick added the bug label Aug 9, 2023
Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Looks like it should work based on

@Restricted(NoExternalUse.class) // for Jelly and toString
public String getUrl() {
return PlaceholderTask.this.getUrl(); // we hope this has a console.jelly
}

@dwnusbaum
Copy link
Member Author

Turns out this does not work on its own; I am investigating.

@dwnusbaum dwnusbaum marked this pull request as ready for review August 11, 2023 16:20
@dwnusbaum dwnusbaum requested a review from jglick August 11, 2023 16:20
@jglick jglick enabled auto-merge August 11, 2023 16:31
@dwnusbaum
Copy link
Member Author

A test failed on Windows, but I think it is unrelated:

Expected: is <ABORTED>
     but: was <SUCCESS>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.jvnet.hudson.test.JenkinsRule.assertBuildStatus(JenkinsRule.java:1450)
	at org.jenkinsci.plugins.workflow.steps.durable_task.ShellStepTest.interruptingAbortsBuildEvenWithReturnStatus(ShellStepTest.java:728)

This message in the log is unexpected I think:

C:\Jenkins\agent\workspace\_durable-task-step-plugin_PR-330\target\tmp\j h9210212895039935246\workspace\p>ping -n 6 127.0.0.1  1>nul 
Body did not finish within grace period; terminating with extreme prejudice

@jglick jglick merged commit 4fcd365 into jenkinsci:master Aug 11, 2023
@dwnusbaum dwnusbaum deleted the executor-widget-cleanup branch August 11, 2023 17:33
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.

2 participants