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

Fixed scripts endpoints. #699

Merged
merged 2 commits into from
Nov 27, 2024
Merged

Fixed scripts endpoints. #699

merged 2 commits into from
Nov 27, 2024

Conversation

dblock
Copy link
Member

@dblock dblock commented Nov 27, 2024

Description

  • Fix response from /_scripts/painless/_execute which can only be a primitive.
  • Fix request from /_scripts/painless/_execute which don't always require query.
  • Fix Hit that can contain array fields with primitives (e.g. ratings_sum: [6]).
  • Misc tests.

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: dblock <dblock@amazon.com>
Copy link
Contributor

github-actions bot commented Nov 27, 2024

Changes Analysis

Commit SHA: 8234f33
Comparing To SHA: 4f27c67

API Changes

Summary

├─┬Paths
│ └─┬/_scripts/painless/_execute
│   ├─┬GET
│   │ └─┬Responses
│   │   └─┬200
│   │     └─┬application/json
│   │       └─┬Schema
│   │         └─┬result
│   │           ├──[➖] type (30340:23)❌ 
│   │           ├──[➕] oneOf (30341:21)
│   │           ├──[➕] oneOf (30342:21)
│   │           └──[➕] oneOf (30343:21)
│   └─┬POST
│     └─┬Responses
│       └─┬200
│         └─┬application/json
│           └─┬Schema
│             └─┬result
│               ├──[➖] type (30340:23)❌ 
│               ├──[➕] oneOf (30341:21)
│               ├──[➕] oneOf (30342:21)
│               └──[➕] oneOf (30343:21)
└─┬Components
  ├─┬_core.scripts_painless_execute___PainlessContextSetup
  │ └──[➖] required (43607:11)❌ 
  └─┬_core.search___Hit
    └─┬fields
      └──[🔀] additionalProperties (44098:33)❌ 

Document Element Total Changes Breaking Changes
components 2 2
paths 8 2
  • BREAKING Changes: 4 out of 10
  • Modifications: 1
  • Removals: 3
  • Additions: 6
  • Breaking Removals: 3
  • Breaking Modifications: 1

Report

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

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

Signed-off-by: dblock <dblock@amazon.com>
Copy link
Contributor

Spec Test Coverage Analysis

Total Tested
528 410 (77.65 %)

Comment on lines +3174 to +3177
oneOf:
- type: number
- type: string
- type: boolean
Copy link
Collaborator

@nhtruong nhtruong Nov 27, 2024

Choose a reason for hiding this comment

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

you can also do type: [number, string, boolean]
Non blocker

@dblock dblock merged commit c400057 into opensearch-project:main Nov 27, 2024
27 checks passed
@dblock dblock deleted the more-tests branch November 27, 2024 23:02
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