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

Index Upgrade API specs and tests for them #690

Merged
merged 21 commits into from
Dec 1, 2024

Conversation

Tokesh
Copy link
Collaborator

@Tokesh Tokesh commented Nov 24, 2024

Description

API specs and tests for upgrade api
And marking them deprecated
GET /_upgrade
POST /_upgrade
GET /{index}/_upgrade
POST /{index}/_upgrade

Issues Resolved

[#663]

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.

Tokesh and others added 15 commits August 3, 2024 22:24
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Niyazbek Torekeldi <78027392+Tokesh@users.noreply.github.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
@Tokesh Tokesh marked this pull request as ready for review November 24, 2024 18:42
Tokesh and others added 2 commits November 24, 2024 23:47
Signed-off-by: Niyazbek Torekeldi <78027392+Tokesh@users.noreply.github.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Copy link
Contributor

github-actions bot commented Nov 24, 2024

Spec Test Coverage Analysis

Total Tested
528 414 (78.41 %)

@Tokesh Tokesh changed the title Upgrade specs Index Upgrade API specs and tests for them Nov 24, 2024
@Tokesh Tokesh changed the title Index Upgrade API specs and tests for them Index Upgrade API specs and tests for them Nov 24, 2024
Signed-off-by: Tokesh <tokesh789@gmail.com>
Signed-off-by: Tokesh <tokesh789@gmail.com>
Copy link
Contributor

github-actions bot commented Nov 24, 2024

Changes Analysis

Commit SHA: 481692a
Comparing To SHA: 962452c

API Changes

Summary

├─┬Paths
│ ├─┬/{index}/_upgrade
│ │ ├─┬GET
│ │ │ ├─┬Responses
│ │ │ │ └─┬200
│ │ │ │   └──[➕] content (29211:11)
│ │ │ └─┬Extensions
│ │ │   └──[➕] x-version-deprecated (12223:29)
│ │ └─┬POST
│ │   ├──[➕] requestBody (26686:7)❌ 
│ │   ├─┬Responses
│ │   │ └─┬200
│ │   │   └──[➕] content (29452:11)
│ │   └─┬Extensions
│ │     └──[➕] x-version-deprecated (12244:29)
│ └─┬/_upgrade
│   ├─┬GET
│   │ ├─┬Responses
│   │ │ └─┬200
│   │ │   └──[➕] content (29211:11)
│   │ └─┬Extensions
│   │   └──[➕] x-version-deprecated (9489:29)
│   └─┬POST
│     ├──[➕] requestBody (26686:7)❌ 
│     ├─┬Responses
│     │ └─┬200
│     │   └──[➕] content (29452:11)
│     └─┬Extensions
│       └──[➕] x-version-deprecated (9509:29)
└─┬Components
  ├──[➕] requestBodies (26686:7)
  ├──[➕] schemas (50136:7)
  ├──[➕] schemas (49099:7)
  ├──[➕] schemas (50145:7)
  ├──[➕] schemas (50120:7)
  └──[➕] schemas (49147:7)

Document Element Total Changes Breaking Changes
paths 10 2
components 6 0
  • BREAKING Changes: 2 out of 16
  • Additions: 16
  • Breaking Additions: 2

Report

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

API Coverage

Before After Δ
Covered (%) 599 (58.67 %) 599 (58.67 %) 0 (0 %)
Uncovered (%) 422 (41.33 %) 422 (41.33 %) 0 (0 %)
Unknown 42 42 0

@dblock dblock added the skip-changelog No need to update CHANGELOG. label Nov 24, 2024
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Let's find out when this was deprecated and why and put a real version number here. What message do you get (aka how do you know it's deprecated)? Look for it in https://github.com/opensearch-project/opensearch and narrow down the commit / PR that did it.

- {create: {_index: movies, _id: movie2}}
- {director: Nicolas Winding Refn, title: Drive, year: 1960}
chapters:
- synopsis: Check index upgrade status (GET).
Copy link
Member

Choose a reason for hiding this comment

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

Probably good to flip this one with the triggering of an upgrade so we can get actual results and check schema.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If I understood you correctly, then I have corrected

@Tokesh
Copy link
Collaborator Author

Tokesh commented Dec 1, 2024

Let's find out when this was deprecated and why and put a real version number here. What message do you get (aka how do you know it's deprecated)? Look for it in https://github.com/opensearch-project/opensearch and narrow down the commit / PR that did it.

Hello! I found that, the _upgrade API was deprecated in Elasticsearch 7.10, which is precisely the version OpenSearch was forked from.

And I've also added tests for:
GET /_upgrade
POST /_upgrade

Signed-off-by: Tokesh <tokesh789@gmail.com>
@Tokesh Tokesh requested a review from dblock December 1, 2024 07:59
Signed-off-by: Tokesh <tokesh789@gmail.com>
response:
status: 200

- synopsis: Trigger upgrade (POST).
Copy link
Member

Choose a reason for hiding this comment

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

Note that this is not an /{index} API and should go in its own tests/default/_core/upgrade.yaml. I'll merge now, but appreciate it being split in a future PR.

@dblock dblock merged commit b7e9744 into opensearch-project:main Dec 1, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No need to update CHANGELOG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants