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

Observability namespace #474

Merged
merged 18 commits into from
Aug 12, 2024
Merged

Conversation

aabeshov
Copy link
Collaborator

@aabeshov aabeshov commented Aug 7, 2024

Description

Adding observability namespace specs.

Issues Resolved

Closes #230.

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 <a_abeshov@kbtu.kz>
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.

Great start! Needs tests.

You can add these specs piecemeal instead of everything at once, maybe start with something simple with tests, changelog, etc.?

aabeshov and others added 4 commits August 8, 2024 23:53
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: Alen <78027095+aabeshov@users.noreply.github.com>
Copy link

github-actions bot commented Aug 8, 2024

Changes Analysis

Commit SHA: 8c31adc
Comparing To SHA: 00711ea

API Changes

Summary

├─┬Paths
│ ├──[➕] path (4138:3)
│ ├──[➕] path (4322:3)
│ ├──[➕] path (4074:3)
│ ├──[➕] path (4089:3)
│ └──[➕] path (4273:3)
└─┬Components
  ├──[➕] requestBodies (23452:7)
  ├──[➕] requestBodies (23447:7)
  ├──[➕] requestBodies (23407:7)
  ├──[➕] requestBodies (23412:7)
  ├──[➕] responses (25648:7)
  ├──[➕] responses (25695:7)
  ├──[➕] responses (25606:7)
  ├──[➕] responses (25726:7)
  ├──[➕] responses (25618:7)
  ├──[➕] responses (25708:7)
  ├──[➕] responses (25600:7)
  ├──[➕] responses (25642:7)
  ├──[➕] responses (25636:7)
  ├──[➕] responses (25702:7)
  ├──[➕] responses (25738:7)
  ├──[➕] responses (25732:7)
  ├──[➕] responses (25657:7)
  ├──[➕] responses (25720:7)
  ├──[➕] responses (25630:7)
  ├──[➕] responses (25624:7)
  ├──[➕] responses (25579:7)
  ├──[➕] responses (25588:7)
  ├──[➕] responses (25714:7)
  ├──[➕] parameters (20247:7)
  ├──[➕] parameters (20254:7)
  ├──[➕] parameters (20115:7)
  ├──[➕] parameters (20107:7)
  ├──[➕] parameters (20123:7)
  ├──[➕] parameters (20131:7)
  ├──[➕] parameters (20139:7)
  ├──[➕] schemas (48041:7)
  ├──[➕] schemas (48222:7)
  ├──[➕] schemas (47951:7)
  ├──[➕] schemas (48118:7)
  ├──[➕] schemas (47972:7)
  ├──[➕] schemas (47902:7)
  ├──[➕] schemas (47994:7)
  ├──[➕] schemas (48096:7)
  ├──[➕] schemas (48156:7)
  ├──[➕] schemas (48166:7)
  ├──[➕] schemas (48016:7)
  ├──[➕] schemas (47982:7)
  ├──[➕] schemas (47913:7)
  ├──[➕] schemas (47885:7)
  ├──[➕] schemas (48076:7)
  ├──[➕] schemas (48054:7)
  ├──[➕] schemas (47933:7)
  ├──[➕] schemas (48066:7)
  ├──[➕] schemas (48205:7)
  ├──[➕] schemas (48128:7)
  ├──[➕] schemas (48170:7)
  ├──[➕] schemas (48177:7)
  └──[➕] schemas (48086:7)

Document Element Total Changes Breaking Changes
paths 5 0
components 53 0
  • Total Changes: 58
  • Additions: 58

Report

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

API Coverage

Before After Δ
Covered (%) 510 (49.95 %) 522 (51.13 %) 12 (1.18 %)
Uncovered (%) 511 (50.05 %) 499 (48.87 %) -12 (-1.18 %)
Unknown 24 24 0

Copy link

github-actions bot commented Aug 8, 2024

Spec Test Coverage Analysis

Total Tested
546 125 (22.89 %)

@nhtruong
Copy link
Collaborator

nhtruong commented Aug 9, 2024

Agree with @dblock. This is a lot in one PR esp once you add the tests. Do break it into smaller PRs and thank you so much for the hard work :)

Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
@aabeshov
Copy link
Collaborator Author

aabeshov commented Aug 9, 2024

Agree with @dblock. This is a lot in one PR esp once you add the tests. Do break it into smaller PRs and thank you so much for the hard work :)

It's okay ,thanks, I guess I am close to the finish line with these specs
Check Links is failing, is it connected with test stories that I create ?
Because my test stories are passing locally
image

@dblock
Copy link
Member

dblock commented Aug 9, 2024

Looks like only the link checker is failing against http://localhost:9090 which is mentioned in a test.

Add an exclude file like here or change the test?

Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
@aabeshov aabeshov requested a review from dblock August 9, 2024 20:21
@aabeshov
Copy link
Collaborator Author

aabeshov commented Aug 9, 2024

I changed the lychee ignore. --exclude-file is deprecated.
BTW, I haven't implemented /_plugins/_query/settings: ["PUT"] this api , because I guess @Tokesh has already made it in this PR [#456 ]

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.

This looks good! I have some small asks and let's get this merged.

.cspell Outdated Show resolved Hide resolved
.lycheeignore Outdated Show resolved Hide resolved
spec/namespaces/observability.yaml Outdated Show resolved Hide resolved
tests/observability/datasources.yaml Outdated Show resolved Hide resolved
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
@aabeshov
Copy link
Collaborator Author

aabeshov commented Aug 9, 2024

@dblock ,I don't know why but there is a 400 bad request when test story is making DELETE /_plugins/_query/_datasources/{datasource_name}
However locally it's okay

@dblock
Copy link
Member

dblock commented Aug 9, 2024

@dblock ,I don't know why but there is a 400 bad request when test story is making DELETE /_plugins/_query/_datasources/{datasource_name} However locally it's okay

We should show the detailed output for these errors (please open an issue).

For now, add a --verbose into the GHA workflow to see the details? Note that it fails on older versions, maybe a quick start of a container with 1.3.x locally will reproduce it?

Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
@aabeshov
Copy link
Collaborator Author

aabeshov commented Aug 10, 2024

@dblock ,I don't know why but there is a 400 bad request when test story is making DELETE /_plugins/_query/_datasources/{datasource_name} However locally it's okay

We should show the detailed output for these errors (please open an issue).

For now, add a --verbose into the GHA workflow to see the details? Note that it fails on older versions, maybe a quick start of a container with 1.3.x locally will reproduce it?

[INFO] => DELETE /_plugins/_query/_datasources/test_datasource ({}) [application/json]
[INFO] <= 400 (application/json) | "no handler found for uri [/_plugins/_query/_datasources/test_datasource] and method [DELETE]"
[INFO] => DELETE /_plugins/_query/_datasources/test_datasource ({}) [application/json]
[INFO] <= 400 (application/json) | "no handler found for uri [/_plugins/_query/_datasources/test_datasource] and method [DELETE]"

ERROR query/datasources.yaml (/home/runner/work/opensearch-api-specification/opensearch-api-specification/tests/default/query/datasources.yaml)
ERROR PROLOGUES
ERROR DELETE /_plugins/_query/_datasources/{datasource_name} (Bad Request)
SKIPPED CHAPTERS
SKIPPED Create a new query datasource.
SKIPPED Retrieve the list of all query datasources.
SKIPPED Retrieve a specific query datasource by name.
SKIPPED Update an existing query datasource.
SKIPPED Retrieve the updated query datasource by name.
SKIPPED Delete the query datasource by name.
ERROR EPILOGUES
ERROR DELETE /_plugins/_query/_datasources/{datasource_name} (Bad Request)

Here is the details. I am not sure, but maybe there is no such api in old versions

get:
operationId: observability.get_localstats.0
x-operation-group: observability.get_localstats
x-version-added: '1.1'
Copy link
Collaborator

@Tokesh Tokesh Aug 10, 2024

Choose a reason for hiding this comment

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

please recheck x-version-added. i think it can fix your ci issue
especially for APIs where you have failed tests
i tested your branch locally with latest version, everything works fine

Copy link
Collaborator Author

@aabeshov aabeshov Aug 10, 2024

Choose a reason for hiding this comment

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

@Tokesh committed changes , you can check

Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
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.

Looks good. I have 2 asks below.

.github/workflows/test-spec.yml Outdated Show resolved Hide resolved
.lycheeignore Outdated Show resolved Hide resolved
tests/default/query/datasources.yaml Outdated Show resolved Hide resolved
aabeshov and others added 5 commits August 12, 2024 09:18
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
Signed-off-by: alen_abeshov <a_abeshov@kbtu.kz>
@aabeshov aabeshov requested review from dblock and Tokesh August 12, 2024 04:27
@dblock dblock merged commit 644a1a5 into opensearch-project:main Aug 12, 2024
17 checks passed
@dblock
Copy link
Member

dblock commented Aug 12, 2024

Looks like one of the tests here may fail intermittently:

        FAILED  Retrieve list of Observability objects.
            PASSED  REQUEST BODY
            PASSED  RESPONSE STATUS
            FAILED  RESPONSE PAYLOAD BODY (expected totalHits='0', got '1')
            PASSED  RESPONSE PAYLOAD SCHEMA
            SKIPPED RESPONSE OUTPUT VALUES

https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10354531782/job/28660019203?pr=493

@aabeshov care to take a look please?

@aabeshov
Copy link
Collaborator Author

Looks like one of the tests here may fail intermittently:

        FAILED  Retrieve list of Observability objects.
            PASSED  REQUEST BODY
            PASSED  RESPONSE STATUS
            FAILED  RESPONSE PAYLOAD BODY (expected totalHits='0', got '1')
            PASSED  RESPONSE PAYLOAD SCHEMA
            SKIPPED RESPONSE OUTPUT VALUES

https://github.com/opensearch-project/opensearch-api-specification/actions/runs/10354531782/job/28660019203?pr=493

@aabeshov care to take a look please?

@dblock I guess I found the location of error, I have no idea why it's not persistent fail in test story.
Should I create new PR ?

@dblock
Copy link
Member

dblock commented Aug 12, 2024

Thanks! I fixed it in #497 since it was failing often. Does that look right? Next time don't hold back and just make a PR :)

@aabeshov
Copy link
Collaborator Author

aabeshov commented Aug 12, 2024

Thanks! I fixed it in #497 since it was failing often. Does that look right? Next time don't hold back and just make a PR :)

Thanks , but I am really confused because in chapters first I do get request to specific object and it return that It exists then right after this step I do request to get list of all objects and sometimes it returns that list is empty that why it is expected for index to be 0 in some cases.

@dblock
Copy link
Member

dblock commented Aug 12, 2024

Writing something doesn't guarantee that it will be read right away, it's eventually consistent. Since these options are backed by an index, refreshing means waiting for a full refresh cycle where everything written gets read consistently, making it predictable. Does this help?

https://opensearch.org/docs/latest/api-reference/index-apis/refresh/

@aabeshov
Copy link
Collaborator Author

Writing something doesn't guarantee that it will be read right away, it's eventually consistent. Since these options are backed by an index, refreshing means waiting for a full refresh cycle where everything written gets read consistently, making it predictable. Does this help?

https://opensearch.org/docs/latest/api-reference/index-apis/refresh/

aaa okay now I got this, thanks!

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.

[FEATURE] Add specs for observability namespace
4 participants