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

[JENKINS-73785] Restore ContextMenu#from with StaplerRequest/Response args #9737

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Sep 16, 2024

See JENKINS-73785.

Testing done

Manual. Before, log message from the JENKINS issue, and:

Screenshot 2024-09-16 at 18 47 10

After: No log message, and:

Screenshot 2024-09-16 at 18 43 40

Usage

usage-in-plugins with

jenkins.model.ModelObjectWithContextMenu$ContextMenu#from
jenkins.model.ModelObjectWithContextMenu.ContextMenu#from

find these plugins:

So it seems safe to not provide a compatibility overload for the 4-arg method.

Proposed changelog entries

Restore compatibility with plugins contributing new objects with context menus, like Nested Views plugin. (regression in 2.475)

Proposed upgrade guidelines

N/A

Submitter checklist

Desired reviewers

@mention

Before the changes are marked as ready-for-merge:

Maintainer checklist

@daniel-beck daniel-beck added regression-fix Pull request that fixes a regression in one of the previous Jenkins releases bug For changelog: Minor bug. Will be listed after features labels Sep 16, 2024
@daniel-beck daniel-beck requested a review from basil September 16, 2024 16:49
@@ -299,6 +299,10 @@ public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest2 request
return from(self, request, response, "sidepanel");
}

public ContextMenu from(ModelObjectWithContextMenu self, StaplerRequest request, StaplerResponse response) throws JellyException, IOException {
return from(self, StaplerRequest.toStaplerRequest2(request), StaplerResponse.toStaplerResponse2(response), "sidepanel");
Copy link
Member Author

@daniel-beck daniel-beck Sep 16, 2024

Choose a reason for hiding this comment

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

Alternatively,

Suggested change
return from(self, StaplerRequest.toStaplerRequest2(request), StaplerResponse.toStaplerResponse2(response), "sidepanel");
return from(self, StaplerRequest.toStaplerRequest2(request), StaplerResponse.toStaplerResponse2(response));

?

Copy link
Member

@basil basil left a comment

Choose a reason for hiding this comment

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

Many thanks. I think we could go for tomorrow’s weekly release. 😄

@MarkEWaite
Copy link
Contributor

This PR is now ready for merge. We will merge it after approximately 24 hours if there is no negative feedback.

/label ready-for-merge

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Sep 16, 2024
MarkEWaite added a commit to MarkEWaite/bom that referenced this pull request Sep 16, 2024
@basil basil merged commit de25478 into jenkinsci:master Sep 17, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug For changelog: Minor bug. Will be listed after features ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback regression-fix Pull request that fixes a regression in one of the previous Jenkins releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants