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

Add request parameter 'cluster_manager_timeout' and deprecate 'master_timeout' - in Index Template APIs #2678

Merged
merged 17 commits into from
Apr 12, 2022

Conversation

tlfeng
Copy link
Collaborator

@tlfeng tlfeng commented Mar 30, 2022

Description

List of the Index APIs that have got request parameter master_timeout:

Issues Resolved

A part of issue #2511

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

Tianli Feng added 4 commits March 30, 2022 15:13
@tlfeng tlfeng changed the title Add request parameter 'cluster_manager_timeout' and deprecate 'master_timeout' - in Index template APIs Add request parameter 'cluster_manager_timeout' and deprecate 'master_timeout' - in Index Template APIs Mar 30, 2022
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 3084306
Log 3934

Reports 3934

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 16f92a4
Log 3935

Reports 3935

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 38ea9f4
Log 3936

Reports 3936

@tlfeng tlfeng added v2.0.0 Version 2.0.0 backport 2.x Backport to 2.x branch backport 2.0 Backport to 2.0 branch enhancement Enhancement or improvement to existing feature or request labels Mar 30, 2022
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure d40f0bb
Log 3941

Reports 3941

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 49e5b55
Log 3943

Reports 3943

Tianli Feng added 2 commits March 31, 2022 22:06
Signed-off-by: Tianli Feng <[email protected]>

# Conflicts:
#	server/src/main/java/org/opensearch/rest/BaseRestHandler.java
@tlfeng tlfeng force-pushed the manager-timeout-index-api-part2 branch from 7dc0693 to 45682e6 Compare April 1, 2022 07:47
@tlfeng tlfeng removed the WIP Work in progress label Apr 1, 2022
@tlfeng tlfeng marked this pull request as ready for review April 1, 2022 07:48
@tlfeng tlfeng requested a review from a team as a code owner April 1, 2022 07:48
@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 7dc0693caa74aff36db9f226c74c5b4d3b3e7a57
Log 4020

Reports 4020

@opensearch-ci-bot
Copy link
Collaborator

❌   Gradle Check failure 45682e6
Log 4021

Reports 4021

@tlfeng
Copy link
Collaborator Author

tlfeng commented Apr 1, 2022

In log 4021:

> Task :client:rest-high-level:asyncIntegTest

REPRODUCE WITH: ./gradlew ':client:rest-high-level:asyncIntegTest' --tests "org.opensearch.client.ClusterClientIT.testComponentTemplates" -Dtests.seed=5D619C52A4F49DBD -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=mt -Dtests.timezone=America/Kentucky/Monticello -Druntime.java=17

org.opensearch.client.ClusterClientIT > testComponentTemplates FAILED
    org.opensearch.client.WarningFailureException: method [PUT], host [http://127.0.0.1:36197], URI [/_component_template/my-template?master_timeout=30s&create=true], status line [HTTP/1.1 200 OK]
    Warnings: [Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version.]
    {"acknowledged":true}
        at __randomizedtesting.SeedInfo.seed([5D619C52A4F49DBD:E05E505372FADD32]:0)
        at app//org.opensearch.client.RestClient.convertResponse(RestClient.java:346)

I will mute those HLRC tests temporarily until PR #2683 is merged.

Signed-off-by: Tianli Feng <[email protected]>

# Conflicts:
#	server/src/test/java/org/opensearch/action/RenamedTimeoutRequestParameterTests.java
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 5, 2022
…_timeout' - in Index APIs except index template APIs (#2660)

- Deprecate the request parameter `master_timeout` that used in Index APIs which have got the parameter.
(except index template APIs, which is addressed in PR #2678)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.

Signed-off-by: Tianli Feng <[email protected]>
(cherry picked from commit 7aa496f)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 5, 2022
…_timeout' - in Index APIs except index template APIs (#2660)

- Deprecate the request parameter `master_timeout` that used in Index APIs which have got the parameter.
(except index template APIs, which is addressed in PR #2678)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.

Signed-off-by: Tianli Feng <[email protected]>
(cherry picked from commit 7aa496f)
Signed-off-by: Tianli Feng <[email protected]>

# Conflicts:
#	server/src/test/java/org/opensearch/action/RenamedTimeoutRequestParameterTests.java
@tlfeng tlfeng force-pushed the manager-timeout-index-api-part2 branch from 254b8a3 to 2be523a Compare April 5, 2022 18:10
@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 254b8a32311b383eae5203e17e746f3f2c7df0be
Log 4207

Reports 4207

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 2be523a
Log 4208

Reports 4208

tlfeng pushed a commit that referenced this pull request Apr 5, 2022
…_timeout' - in Index APIs except index template APIs (#2660) (#2770)

- Deprecate the request parameter `master_timeout` that used in Index APIs which have got the parameter.
(except index template APIs, which is addressed in PR #2678)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.

Signed-off-by: Tianli Feng <[email protected]>
(cherry picked from commit 7aa496f)
tlfeng pushed a commit that referenced this pull request Apr 5, 2022
…_timeout' - in Index APIs except index template APIs (#2660) (#2771)

- Deprecate the request parameter `master_timeout` that used in Index APIs which have got the parameter.
(except index template APIs, which is addressed in PR #2678)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.

Signed-off-by: Tianli Feng <[email protected]>
(cherry picked from commit 7aa496f)
@@ -23,6 +25,8 @@ setup:
number_of_replicas: 0

- do:
allowed_warnings:
- "Deprecated parameter [master_timeout] used. To promote inclusive language, please use [cluster_manager_timeout] instead. It will be unsupported in a future major version."
Copy link
Member

Choose a reason for hiding this comment

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

in the next major version 3.0

Copy link
Collaborator Author

@tlfeng tlfeng Apr 11, 2022

Choose a reason for hiding this comment

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

@anasalkouz Thanks for this idea. My concern is once the deprecated parameter can not be removed in version 3.0, the warning message will become inaccurate.
I'm just worrying about there will be resistance of the old usage removal from the users, which make the removal postponed.
If you think it's better to specify the version number in the warning message, I will change it to It will be removed in 3.0.
The message is defined in this file, I will create a separate PR to change it.

Copy link
Collaborator Author

@tlfeng tlfeng Apr 11, 2022

Choose a reason for hiding this comment

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

Changed the deprecation message in a separate PR #2863 . I will update this PR accordingly once that is merged. 😁

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the deprecation message in YAML rest api test in commit 07fc06d 👍

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success b052308
Log 4380

Reports 4380

@opensearch-ci-bot
Copy link
Collaborator

✅   Gradle Check success 07fc06d
Log 4386

Reports 4386

@tlfeng tlfeng merged commit ba3ed8a into opensearch-project:main Apr 12, 2022
@tlfeng tlfeng deleted the manager-timeout-index-api-part2 branch April 12, 2022 00:29
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2022
…r_timeout' - in Index Template APIs (#2678)

- Deprecate the request parameter `master_timeout` that used in Index Template APIs which have got the parameter.
(The other Index APIs are addressed in PR #2660)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.
Signed-off-by: Tianli Feng <[email protected]>

(cherry picked from commit ba3ed8a)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 12, 2022
…r_timeout' - in Index Template APIs (#2678)

- Deprecate the request parameter `master_timeout` that used in Index Template APIs which have got the parameter.
(The other Index APIs are addressed in PR #2660)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.
Signed-off-by: Tianli Feng <[email protected]>

(cherry picked from commit ba3ed8a)
tlfeng pushed a commit that referenced this pull request Apr 12, 2022
…r_timeout' - in Index Template APIs (#2678) (#2866)

- Deprecate the request parameter `master_timeout` that used in Index Template APIs which have got the parameter.
(The other Index APIs are addressed in PR #2660)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.
Signed-off-by: Tianli Feng <[email protected]>

(cherry picked from commit ba3ed8a)
tlfeng pushed a commit that referenced this pull request Apr 12, 2022
…r_timeout' - in Index Template APIs (#2678) (#2867)

- Deprecate the request parameter `master_timeout` that used in Index Template APIs which have got the parameter.
(The other Index APIs are addressed in PR #2660)
- Add alternative new request parameter `cluster_manager_timeout`.
- Add unit tests.
Signed-off-by: Tianli Feng <[email protected]>

(cherry picked from commit ba3ed8a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch backport 2.0 Backport to 2.0 branch enhancement Enhancement or improvement to existing feature or request v2.0.0 Version 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants