-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Added the addition of the server version and distribution as a respon… #8084
Added the addition of the server version and distribution as a respon… #8084
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/http/DefaultRestChannel.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/http/DefaultRestChannel.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/http/DefaultRestChannel.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/http/DefaultRestChannel.java
Outdated
Show resolved
Hide resolved
db29578
to
3da7ec7
Compare
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Sam Hobbs <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/http/DefaultRestChannel.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Sam Hobbs <[email protected]>
Gradle Check (Jenkins) Run Completed with:
|
Im not too sure why gradle is failing, tried to run ./gradlew :server:spotlessApply but no changes are applied |
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Flaky tests ... :( @Sam-ScottLogic could you please rebase against |
Gradle Check (Jenkins) Run Completed with:
|
Merged main believe its fixed it |
@andrross looks good to you? |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-8084-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 68ddf2442c57672ff65c72f39c36e66dcd2e4dd7
# Push it to GitHub
git push --set-upstream origin backport/backport-8084-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-2.x Then, create a pull request where the |
@Sam-ScottLogic could toy please send manual backport to |
opensearch-project#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <[email protected]> * Removed extra lines Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved defining of server header string Signed-off-by: Sam Hobbs <[email protected]> * Removed wildcard import Signed-off-by: Sam Hobbs <[email protected]> * Applied spotless to files Signed-off-by: Sam Hobbs <[email protected]> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Added comment Signed-off-by: Sam Hobbs <[email protected]> * Created static string for reused server header title and name of application strings, also refactored server header to server version Signed-off-by: Sam Hobbs <[email protected]> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <[email protected]> * Added prefix to header title Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <[email protected]> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <[email protected]> * Added server version header value as constant Signed-off-by: Sam Hobbs <[email protected]> --------- Signed-off-by: Sam Hobbs <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> Co-authored-by: Owais Kazi <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
opensearch-project#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <[email protected]> * Removed extra lines Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved defining of server header string Signed-off-by: Sam Hobbs <[email protected]> * Removed wildcard import Signed-off-by: Sam Hobbs <[email protected]> * Applied spotless to files Signed-off-by: Sam Hobbs <[email protected]> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Added comment Signed-off-by: Sam Hobbs <[email protected]> * Created static string for reused server header title and name of application strings, also refactored server header to server version Signed-off-by: Sam Hobbs <[email protected]> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <[email protected]> * Added prefix to header title Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <[email protected]> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <[email protected]> * Added server version header value as constant Signed-off-by: Sam Hobbs <[email protected]> --------- Signed-off-by: Sam Hobbs <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> Co-authored-by: Owais Kazi <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: sahil buddharaju <[email protected]>
opensearch-project#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <[email protected]> * Removed extra lines Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved defining of server header string Signed-off-by: Sam Hobbs <[email protected]> * Removed wildcard import Signed-off-by: Sam Hobbs <[email protected]> * Applied spotless to files Signed-off-by: Sam Hobbs <[email protected]> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Added comment Signed-off-by: Sam Hobbs <[email protected]> * Created static string for reused server header title and name of application strings, also refactored server header to server version Signed-off-by: Sam Hobbs <[email protected]> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <[email protected]> * Added prefix to header title Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <[email protected]> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <[email protected]> * Added server version header value as constant Signed-off-by: Sam Hobbs <[email protected]> --------- Signed-off-by: Sam Hobbs <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> Co-authored-by: Owais Kazi <[email protected]> Co-authored-by: Andriy Redko <[email protected]>
Sorry for late response. Does this still need to be backported? |
@Sam-ScottLogic I believe yes, if you want this in 2.x |
I dont mind it going in the next release just dont want to mess up what I've done messing up the series of git commands :) |
Up to you to backport it. |
opensearch-project#8084) * Added server distribution and version into response header Signed-off-by: Sam Hobbs <[email protected]> * Removed extra lines Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/main/java/org/opensearch/http/DefaultRestChannel.java Co-authored-by: Owais Kazi <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved defining of server header string Signed-off-by: Sam Hobbs <[email protected]> * Removed wildcard import Signed-off-by: Sam Hobbs <[email protected]> * Applied spotless to files Signed-off-by: Sam Hobbs <[email protected]> * Added to testHeadersSet test within the default rest channel test file to test that server version is returned Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Added comment Signed-off-by: Sam Hobbs <[email protected]> * Created static string for reused server header title and name of application strings, also refactored server header to server version Signed-off-by: Sam Hobbs <[email protected]> * Refactored hash map from server header to server version and updated test Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Moved server version field from global variable to local, defined sever string as static value Signed-off-by: Sam Hobbs <[email protected]> * Added prefix to header title Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant serverVersion field and instead inlined creation of map passed into addCustomHeader method Signed-off-by: Sam Hobbs <[email protected]> * Ran spotless Signed-off-by: Sam Hobbs <[email protected]> * Removed redundant OPEN_SEARCH_NAME_VALUE Signed-off-by: Sam Hobbs <[email protected]> * Update server/src/test/java/org/opensearch/http/DefaultRestChannelTests.java Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> * Moved change log addition to 2.x unreleased and wrote message in imperative Signed-off-by: Sam Hobbs <[email protected]> * Corrected name of fetched header in header test Signed-off-by: Sam Hobbs <[email protected]> * Added server version header value as constant Signed-off-by: Sam Hobbs <[email protected]> --------- Signed-off-by: Sam Hobbs <[email protected]> Signed-off-by: Sam Hobbs <[email protected]> Co-authored-by: Owais Kazi <[email protected]> Co-authored-by: Andriy Redko <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
…se header
Description
In this PR code has been added to the default rest channel file that adds a new custom header containing the server version.
Related Issues
Issue - (#6583)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.