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

SnapshotManagement namespace api #701

Merged
merged 10 commits into from
Dec 9, 2024

Conversation

aabeshov
Copy link
Collaborator

Description

Adding snapshot management(sm) namespace specs.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [#234 ].

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.

Signed-off-by: alen_abeshov <[email protected]>
Signed-off-by: alen_abeshov <[email protected]>
Copy link
Contributor

github-actions bot commented Nov 30, 2024

Changes Analysis

Commit SHA: d265d8d
Comparing To SHA: c400057

API Changes

Summary

├─┬Paths
│ ├──[➕] path (7494:3)
│ ├──[➕] path (7569:3)
│ ├──[➕] path (7601:3)
│ ├──[➕] path (7474:3)
│ └──[➕] path (7585:3)
└─┬Components
  ├──[➕] requestBodies (27770:7)
  ├──[➕] requestBodies (27775:7)
  ├──[➕] responses (31568:7)
  ├──[➕] responses (31550:7)
  ├──[➕] responses (31562:7)
  ├──[➕] responses (31580:7)
  ├──[➕] responses (31604:7)
  ├──[➕] responses (31595:7)
  ├──[➕] responses (31556:7)
  ├──[➕] responses (31586:7)
  ├──[➕] responses (31544:7)
  ├──[➕] responses (31538:7)
  ├──[➕] responses (31574:7)
  ├──[➕] responses (31610:7)
  ├──[➕] parameters (25028:7)
  ├──[➕] parameters (25035:7)
  ├──[➕] parameters (24990:7)
  ├──[➕] parameters (24978:7)
  ├──[➕] parameters (24984:7)
  ├──[➕] parameters (25021:7)
  ├──[➕] parameters (24966:7)
  ├──[➕] parameters (25007:7)
  ├──[➕] parameters (24945:7)
  ├──[➕] parameters (25000:7)
  ├──[➕] parameters (24972:7)
  ├──[➕] parameters (24959:7)
  ├──[➕] parameters (25014:7)
  ├──[➕] parameters (24952:7)
  ├──[➕] schemas (57940:7)
  ├──[➕] schemas (57894:7)
  ├──[➕] schemas (57952:7)
  ├──[➕] schemas (57996:7)
  ├──[➕] schemas (58075:7)
  ├──[➕] schemas (58015:7)
  ├──[➕] schemas (57889:7)
  ├──[➕] schemas (58187:7)
  ├──[➕] schemas (58099:7)
  ├──[➕] schemas (58061:7)
  ├──[➕] schemas (58001:7)
  ├──[➕] schemas (58094:7)
  ├──[➕] schemas (58106:7)
  ├──[➕] schemas (58046:7)
  ├──[➕] schemas (57931:7)
  ├──[➕] schemas (57922:7)
  ├──[➕] schemas (58147:7)
  ├──[➕] schemas (58029:7)
  ├──[➕] schemas (57967:7)
  ├──[➕] schemas (57850:7)
  ├──[➕] schemas (58176:7)
  ├──[➕] schemas (57979:7)
  ├──[➕] schemas (57879:7)
  ├──[➕] schemas (58039:7)
  ├──[➕] schemas (57947:7)
  ├──[➕] schemas (58068:7)
  ├──[➕] schemas (57869:7)
  ├──[➕] schemas (57843:7)
  └──[➕] schemas (58115:7)

Document Element Total Changes Breaking Changes
paths 5 0
components 57 0
  • Total Changes: 62
  • Additions: 62

Report

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

API Coverage

Before After Δ
Covered (%) 599 (58.67 %) 606 (59.35 %) 7 (0.68 %)
Uncovered (%) 422 (41.33 %) 415 (40.65 %) -7 (-0.68 %)
Unknown 42 43 1

Copy link
Contributor

github-actions bot commented Nov 30, 2024

Spec Test Coverage Analysis

Total Tested
536 435 (81.16 %)

Signed-off-by: alen_abeshov <[email protected]>
@aabeshov
Copy link
Collaborator Author

Not ready yet

Signed-off-by: alen_abeshov <[email protected]>
Signed-off-by: alen_abeshov <[email protected]>
@aabeshov
Copy link
Collaborator Author

Now, it is ready for review!

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.

Thanks.

  1. Tests aren't running, the plugins directory is misleading and is there for custom docker setups and is explicitly added to CI with different configuration. We already have https://github.com/opensearch-project/opensearch-api-specification/tree/main/tests/snapshot, so move the tests in there if there needs to be special setup, otherwise put them in default/sm.
  2. Keep naming to the route naming, just like we don't name "ml" as "machine_learning", keep "sm" as is, so "sm._common.yaml", etc.
  3. Rename the test files to match the routes, so _sm/policies becomes tests/snapshot/sm/policies.yaml.
  4. Split tests and group by API not by theme. So explain tests should go into their own file with a prologue that creates a policy, then the chapter only calls explain. The file would be sm/policies/explain.yaml, start.yaml, etc.

tests/plugins/snapshot_management/snapshot_management.yaml Outdated Show resolved Hide resolved
…le.Renamed snapshot managment to 'sm'

Signed-off-by: alen_abeshov <[email protected]>
@aabeshov
Copy link
Collaborator Author

aabeshov commented Dec 8, 2024

@dblock I am not sure what's wrong
Should I ignore version <= 2.0.0 ?

Signed-off-by: alen_abeshov <[email protected]>
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.

Looking good!

What's the failure in 2.0? I see some x-version-added: 2.1 so this means the feature was added in 2.1? Change all tests to do >= 2.1, but do dig through the history/code to verify which version the feature was added in.

Iterate to green. Spec validation needs to pass, there are a bunch of language things like quoting variables that do matter since we're using these in the docs.

spec/namespaces/sm.yaml Outdated Show resolved Hide resolved
tests/default/sm/policies/explain.yaml Outdated Show resolved Hide resolved
Signed-off-by: alen_abeshov <[email protected]>
Signed-off-by: alen_abeshov <[email protected]>
@aabeshov aabeshov requested a review from dblock December 9, 2024 09:25
Signed-off-by: Daniel (dB.) Doubrovkine <[email protected]>
operationId: sm.update_policy.0
x-operation-group: sm.update_policy
x-version-added: '2.1'
description: Updates an existing snapshot management policy. Requires 'if_seq_no' and 'if_primary_term'.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description: Updates an existing snapshot management policy. Requires 'if_seq_no' and 'if_primary_term'.
description: Updates an existing snapshot management policy. Requires `if_seq_no` and `if_primary_term`.

@dblock dblock merged commit 87847db into opensearch-project:main Dec 9, 2024
28 checks passed
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.

3 participants