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

Added schema and tests for cluster routing awareness and decommission. #524

Merged
merged 12 commits into from
Sep 4, 2024

Conversation

dblock
Copy link
Member

@dblock dblock commented Aug 22, 2024

Description

  • Adds schema for cluster routing and decommission awareness.
  • Adds support for default values in request/response. To updated weighted routing we need the current version of weights which starts at nothing but needs 0 to be updated, then gets incremented.
  • Adds support for tests with multiple nodes, dumps logs from all the containers.
  • Adds tests for /_cluster/reroute.
  • Adds tests for /_cluster/voting_config_exclusions.

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.

Copy link

github-actions bot commented Aug 22, 2024

Changes Analysis

Commit SHA: 358d3d5
Comparing To SHA: 65f8362

API Changes

Summary

├─┬Paths
│ ├─┬/_cluster/decommission/awareness/{awareness_attribute_name}/{awareness_attribute_value}
│ │ └─┬PUT
│ │   └─┬Responses
│ │     └─┬200
│ │       └──[➕] content (25532:11)
│ ├─┬/_cluster/routing/awareness/weights
│ │ └─┬DELETE
│ │   ├──[➕] requestBody (23615:7)❌ 
│ │   └─┬Responses
│ │     └─┬200
│ │       └──[➕] content (25459:11)
│ ├─┬/_cluster/decommission/awareness
│ │ └─┬DELETE
│ │   └─┬Responses
│ │     └─┬200
│ │       └──[➕] content (25451:11)
│ ├─┬/_cluster/routing/awareness/{attribute}/weights
│ │ ├─┬GET
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └──[➕] content (25502:11)
│ │ └─┬PUT
│ │   ├──[➕] requestBody (23657:7)❌ 
│ │   └─┬Responses
│ │     └─┬200
│ │       └──[➕] content (25555:11)
│ └─┬/_cluster/decommission/awareness/{awareness_attribute_name}/_status
│   └─┬GET
│     └─┬Responses
│       └─┬200
│         └──[➕] content (25479:11)
└─┬Components
  ├──[➕] requestBodies (23615:7)
  ├──[➕] requestBodies (23657:7)
  ├──[➕] schemas (44205:7)
  ├──[➕] schemas (43090:7)
  ├──[➕] schemas (44217:7)
  ├──[➕] schemas (44212:7)
  └──[➕] schemas (43093:7)

Document Element Total Changes Breaking Changes
paths 8 2
components 7 0
  • BREAKING Changes: 2 out of 15
  • Additions: 15
  • Breaking Additions: 2

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10702084332/artifacts/1891041405

API Coverage

Before After Δ
Covered (%) 533 (52.2 %) 533 (52.2 %) 0 (0 %)
Uncovered (%) 488 (47.8 %) 488 (47.8 %) 0 (0 %)
Unknown 26 26 0

Copy link

github-actions bot commented Aug 29, 2024

Spec Test Coverage Analysis

Total Tested
559 258 (46.15 %)

@dblock dblock force-pushed the routing-awareness branch 4 times, most recently from 02480e2 to 484ab55 Compare August 29, 2024 16:18
@dblock dblock marked this pull request as ready for review August 29, 2024 16:27
@dblock dblock changed the title Added schema for cluster routing awareness. Added schema and tests for cluster routing awareness and decommission. Aug 29, 2024
Comment on lines 40 to 42
const rhs = path.replaceAll(' ', '').split('?', 2)
value = _.get(response, rhs[0])
if (value === undefined && rhs[1] !== undefined) value = YAML.parse(rhs[1])
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's rhs? 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

right hand side

tests/routing/cluster/decommission/awareness.yaml Outdated Show resolved Hide resolved
@dblock
Copy link
Member Author

dblock commented Sep 3, 2024

@nhtruong Care to take another look please?

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@nhtruong nhtruong merged commit 1316e77 into opensearch-project:main Sep 4, 2024
19 checks passed
@dblock dblock deleted the routing-awareness branch September 4, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants