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

Removing AbstractFolder.delete override #356

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

jglick
Copy link
Member

@jglick jglick commented Oct 25, 2023

Downstream of jenkinsci/jenkins#8645. Subsumes #355.

Comment on lines +252 to +254
r.assertBuildStatus(Result.ABORTED, r.waitForCompletion(build1));
r.assertBuildStatus(Result.ABORTED, r.waitForCompletion(build2));
assertTrue(build3.isCancelled());
Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this passes even with src/main/ from this PR and pom.xml from master, i.e. using the original inherited AbstractItem.delete implementation which already cancelled builds and queue items for folder children. It would not call FreeStyleProject.delete prior to Folder.delete but there was not much practical impact (perhaps only missing calls to ItemListener.fireOnDeleted) since all of $JENKINS_HOME/jobs/d/ was deleted.

FreeStyleBuild build1 = p.scheduleBuild2(0).getStartCondition().get();
FreeStyleBuild build2 = p.scheduleBuild2(0).getStartCondition().get();
QueueTaskFuture<FreeStyleBuild> build3 = p.scheduleBuild2(0);
Thread.sleep(1000); // TODO Queue.cancel(Item) can return false immediately after scheduling
Copy link
Member Author

Choose a reason for hiding this comment

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

pom.xml Outdated Show resolved Hide resolved
@jglick jglick marked this pull request as ready for review November 27, 2023 19:15
@jglick jglick requested a review from a team as a code owner November 27, 2023 19:15
@@ -22,7 +22,7 @@
<changelist>999999-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<!-- remember to change the io.jenkins.tools.bom artifact when changing this -->
<jenkins.version>2.387.3</jenkins.version>
<jenkins.version>2.433</jenkins.version>
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 yet in an LTS version of course. I have no strong opinion as to whether we should wait for that or not.

@jglick jglick merged commit 823418b into jenkinsci:master Jan 18, 2024
15 checks passed
@jglick jglick deleted the AbstractFolder.delete branch January 18, 2024 12:51
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.

4 participants