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

Remove HTTP response headers for the remoting-based CLI #5452

Merged
merged 2 commits into from
May 3, 2021

Conversation

daniel-beck
Copy link
Member

@daniel-beck daniel-beck commented Apr 29, 2021

Related to #2795, #3838, #4350, and aebb3b2.

Untested; PR build and @jglick will be able to tell us whether this is correct. I think these headers are unused now; I couldn't find a reference here or in Remoting at least.

CLI_HOST_NAME is still advertised as X-Jenkins-JNLP-Host, the port as X-Jenkins-JNLP-Port.

Unsure whether to leave

assertNull(rsp.getContentAsString(), rsp.getResponseHeaderValue("X-Jenkins-CLI-Port"));
in. (Edited to add: Now removed in 4bd10a4)

Proposed changelog entries

  • Stop sending HTTP response headers related to the remoting-based CLI (removed in 2.165).

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).

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.

Looks good to me, but might also want to get rid of the now-dangling reference to X-Jenkins-CLI-Port in test/src/test/java/hudson/cli/CLITest.java.

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.

Yes I think this is safe. (Came up sometime recently but I forget where.)

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.

I referenced the advertiseHeaders() method in the FLoC thread, likely this is where @jglick saw it I'd guess. Thanks for the cleanup @daniel-beck !

I see reliance on these headers in https://github.com/jenkinsci/master-to-master-api-plugin/blob/bb48f24779f4873877bbf6500621377e077ffda3/src/main/java/org/jenkinsci/plugins/mastertomasterapi/simple/SIMClient.java . I'd guess we do not care too much about this plugin in the current state (not published in the UC)

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 2, 2021
@oleg-nenashev oleg-nenashev merged commit 68711c1 into jenkinsci:master May 3, 2021
@jglick
Copy link
Member

jglick commented May 4, 2021

I referenced the advertiseHeaders() method in the FLoC thread, likely this is where @jglick saw it I'd guess.

Somewhere else I think. Does not matter now.

@jtnord
Copy link
Member

jtnord commented Jun 11, 2021

@daniel-beck what is the correct web header now in order to locate the (sic) JNLP port for remoting connections?

(basically breaks quite a pretty important CloudBees specific feature :) )

This was not the change I thought it was. it did not remove X-Jenkins-JNLP-Port which should still also be found as per https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/hudson/TcpSlaveAgentListener/index.jelly#L33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants