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

Terminology: Clean up X-to-Y-Callables #5494

Closed

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented May 16, 2021

Related to #5425. I'm submitting this in a separate PR because I expect potential issues in review and don't think this should end up blocking the other PR.

This cleans up callable class names involved in the agent-to-controller security subsystem.

Existing types are retained as subclasses of the new ones (similar to Hudson extends Jenkins), but deprecated.

Proposed changelog entries

  • Terminology cleanup: Deprecate SlaveToMaster[File]Callable, MasterToSlave[File]Callable, Role.MASTER and Role.SLAVE in favor of the new AgentToController[File]Callable, ControllerToAgent[File]Callable, Role.CONTROLLER and Role.AGENT.

Proposed upgrade guidelines

N/A

Submitter checklist

  • (If applicable) Jira issue is well described
  • Changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developer, depending on the change). Examples
    • Fill-in the Proposed changelog entries section only if there are breaking changes or other changes which may require extra steps from users during the upgrade
  • Appropriate autotests or explanation to why this change has no tests
  • For dependency updates: links to external changelogs and, if possible, full diffs

Desired reviewers

@mention

Maintainer checklist

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

  • There are at least 2 approvals for the pull request and no outstanding requests for change
  • Conversations in the pull request are over OR it is explicit that a reviewer does not block the change
  • Changelog entries in the PR title and/or Proposed changelog entries are correct
  • Proper changelog labels are set so that the changelog can be generated automatically
  • If the change needs additional upgrade steps from users, upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the PR title. (example)
  • If it would make sense to backport the change to LTS, a Jira issue must exist, be a Bug or Improvement, and be labeled as lts-candidate to be considered (see query).

@@ -1117,8 +1117,8 @@ public void copyFrom(FileItem file) throws IOException, InterruptedException {
* <strong>Warning:</strong> implementations must be serializable, so prefer a static nested class to an inner class.
*
* <p>
* Subtypes would likely want to extend from either {@link MasterToSlaveCallable}
* or {@link SlaveToMasterFileCallable}.
* Subtypes would likely want to extend from either {@link jenkins.ControllerToAgentFileCallable}
Copy link
Member Author

Choose a reason for hiding this comment

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

I think this was wrong before, since this discusses FileCallables.


/**
* Convenient {@link Callable} that are meant to run on the controller (sent by agent/CLI/etc).
* Note that any serializable fields must either be defined in your plugin or included in the stock JEP-200 whitelist.
Copy link
Member Author

@daniel-beck daniel-beck May 16, 2021

Choose a reason for hiding this comment

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

I consider cleanup of this term in comments out of scope for this PR.

Copy link
Contributor

@Wadeck Wadeck left a comment

Choose a reason for hiding this comment

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

🚀 Nice way(s) to keep compatibility

(not manually tested)

Comment on lines 4 to +5
* @since 1.587 / 1.580.1
* @param <T> the return type; note that this must either be defined in your plugin or included in the stock JEP-200 whitelist
* @deprecated Use {@link ControllerToAgentFileCallable}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to add something like:

@since 1.587 / 1.580.1, deprecated since TODO

?

(mimic the @Deprecated(since = xxx) from Java 9)

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Should be OK. Thanks Daniel!

@oleg-nenashev
Copy link
Member

We may merge it in 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process

@oleg-nenashev oleg-nenashev added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label May 21, 2021
@daniel-beck daniel-beck added on-hold This pull request depends on another event/release, and it cannot be merged right now and removed ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback labels May 21, 2021
@daniel-beck
Copy link
Member Author

On-holding, makes no sense to merge before the one with the labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-hold This pull request depends on another event/release, and it cannot be merged right now
Projects
Development

Successfully merging this pull request may close these issues.

4 participants