Skip to content

#844 Adding spec for UBI#845

Merged
karenyrx merged 12 commits intoopensearch-project:mainfrom
jzonthemtn:ubi
Oct 23, 2025
Merged

#844 Adding spec for UBI#845
karenyrx merged 12 commits intoopensearch-project:mainfrom
jzonthemtn:ubi

Conversation

@jzonthemtn
Copy link
Copy Markdown
Contributor

Description

Adds the UBI spec per opensearch-project/user-behavior-insights#77.

Issues Resolved

Closes #844.

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: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 19, 2025

Changes Analysis

Commit SHA: b52b42f
Comparing To SHA: 29e07ed

API Changes

Summary

├─┬Paths
│ └──[➕] path (10499:3)
└─┬Components
  ├──[➕] responses (37720:7)
  └──[➕] schemas (69694:7)

Document Element Total Changes Breaking Changes
paths 1 0
components 2 0
  • Total Changes: 3
  • Additions: 3

Report

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

API Coverage

Before After Δ
Covered (%) 666 (65.23 %) 666 (65.23 %) 0 (0 %)
Uncovered (%) 355 (34.77 %) 355 (34.77 %) 0 (0 %)
Unknown 128 129 1

@nhtruong
Copy link
Copy Markdown
Contributor

Thanks @jzonthemtn
This test is failing with 503 error.

@dblock
Copy link
Copy Markdown
Member

dblock commented Mar 20, 2025

Is this plugin part of 2.19? If so you don't need a custom plugins/user_behavior_insights folder, add the tests under default.

@jzonthemtn
Copy link
Copy Markdown
Contributor Author

Is this plugin part of 2.19? If so you don't need a custom plugins/user_behavior_insights folder, add the tests under default.

No, it's not. Just 3.0. Thanks, will update.

…'s not for 2.x.

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@dblock
Copy link
Copy Markdown
Member

dblock commented Mar 20, 2025

Is this plugin part of 2.19? If so you don't need a custom plugins/user_behavior_insights folder, add the tests under default.

No, it's not. Just 3.0. Thanks, will update.

If it's (going to be) installed by default tests should go into default still and have version: >= 3.0. The plugins tests are for those that require custom setup.

@jzonthemtn
Copy link
Copy Markdown
Contributor Author

Is this plugin part of 2.19? If so you don't need a custom plugins/user_behavior_insights folder, add the tests under default.

No, it's not. Just 3.0. Thanks, will update.

If it's (going to be) installed by default tests should go into default still and have version: >= 3.0. The plugins tests are for those that require custom setup.

@dblock Sorry, I'm not sure I follow. Are you saying I still don't have it quite right?

@dblock
Copy link
Copy Markdown
Member

dblock commented Mar 20, 2025

@dblock Sorry, I'm not sure I follow. Are you saying I still don't have it quite right?

  1. The test is in the right place now, but tests/default/user_behavior_insights/initialize.yaml should be tests/default/ubi/initialize.yaml to match the route.
  2. The tests run in CI in a big matrix of versions, so you need to make sure the test only runs on 3.0+ since your feature doesn't exist till then by adding version: 3.0. And you'll need to make sure the build of 3.0 used has your feature (and potentially bump the revision in the CI).

There's probably more. I'd start by making sure the tests pass locally for you.

@jzonthemtn jzonthemtn marked this pull request as draft March 20, 2025 20:46
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@jzonthemtn
Copy link
Copy Markdown
Contributor Author

@dblock Sorry, I'm not sure I follow. Are you saying I still don't have it quite right?

  1. The test is in the right place now, but tests/default/user_behavior_insights/initialize.yaml should be tests/default/ubi/initialize.yaml to match the route.
  2. The tests run in CI in a big matrix of versions, so you need to make sure the test only runs on 3.0+ since your feature doesn't exist till then by adding version: 3.0. And you'll need to make sure the build of 3.0 used has your feature (and potentially bump the revision in the CI).

There's probably more. I'd start by making sure the tests pass locally for you.

Thanks, I think that got me on the right path.

$ npm run test:spec -- --opensearch-url http://localhost:9200 --tests ./tests/default/ubi/

> opensearch_api_tools@1.0.0 test:spec
> ts-node tools/src/tester/test.ts --opensearch-url http://localhost:9200 --tests ./tests/default/ubi/

[WARNING] No credentials provided, did you forget to set OPENSEARCH_PASSWORD or AWS_ACCESS_KEY_ID?
OpenSearch 3.0.0

PASSED  initialize.yaml (tests/default/ubi/initialize.yaml)

Tested 1/600 paths.

@jzonthemtn jzonthemtn marked this pull request as ready for review March 20, 2025 21:07
@epugh
Copy link
Copy Markdown
Contributor

epugh commented May 30, 2025

Hi team... Curious if this could be reviewed and merged?

@dblock
Copy link
Copy Markdown
Member

dblock commented May 31, 2025

Hi team... Curious if this could be reviewed and merged?

Please iterate to green first? Happy to review when all tests are passing.

@epugh
Copy link
Copy Markdown
Contributor

epugh commented May 31, 2025

Hi team... Curious if this could be reviewed and merged?

Please iterate to green first? Happy to review when all tests are passing.

Thanks , I just looked at the list of Test Specs and saw all green, not the summary with the 2 failing, thanks!

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Sep 23, 2025

@ajleong623 has volunteered to look at this, as he has more recent experience in the API spec world!

@ajleong623
Copy link
Copy Markdown
Contributor

ajleong623 commented Sep 23, 2025

@jzonthemtn Could you try rerunning the tests? I cannot look into the logs since they are out of date

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@jzonthemtn
Copy link
Copy Markdown
Contributor Author

Resolved merge conflict in the changelog.

@ajleong623
Copy link
Copy Markdown
Contributor

@jzonthemtn awesome. It looks like the workflows aren’t approved. @epugh, could you please approve the workflows?

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Sep 26, 2025

I don't think I can... Not sure how to ping the current Maintainers.....

CHANGELOG.md Outdated
Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]
- Added specs for UBI plugin endpoints ([#844](https://github.com/opensearch-project/opensearch-api-specification/pull/844))
Copy link
Copy Markdown
Collaborator

@karenyrx karenyrx Sep 26, 2025

Choose a reason for hiding this comment

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

Could you update the link to match the current PR number?

@github-actions
Copy link
Copy Markdown
Contributor

Spec Test Coverage Analysis

Total Tested
682 680 (99.71 %)

Signed-off-by: Jeff Zemerick <13176962+jzonthemtn@users.noreply.github.com>
@ajleong623
Copy link
Copy Markdown
Contributor

@jzonthemtn I think I saw that some of the test failed while running against the cluster during your last attempt since one of the components was unused. I can try to reproduce those test on my end tomorrow and why it didn’t work. Additionally, UI do not know if all the APIs were covered based on the spec coverage analysis. I hope that can help, and let me know if you are not okay with that solution or if there is anything else you would like me to do.

Also, @karenyrx would it be okay if you could approve the workflows? I think it was only approved for that one push.

description: Schemas of `ubi._common` category.
version: 1.0.0
paths: {}
components:
Copy link
Copy Markdown
Contributor

@ajleong623 ajleong623 Sep 28, 2025

Choose a reason for hiding this comment

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

@jzonthemtn I ran it against my system, and you are very close. The issue is that the component referenced here is not actually used in your namespace. That is why the linter is not passing. What you could do is just specify the Initialize object with just the string type, and replace the insides of schema in the namespaces/ubi.yaml file with $ref: '../schemas/ubi._common.yaml#/components/schemas/Initialize'.

@ajleong623
Copy link
Copy Markdown
Contributor

@jzonthemtn I think you should be very close to iterating to green. Is everything okay on your end?

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@epugh
Copy link
Copy Markdown
Contributor

epugh commented Oct 13, 2025

When we get this in, we'll have code generated api clients for all of the new relevance related features!

@ajleong623
Copy link
Copy Markdown
Contributor

ajleong623 commented Oct 14, 2025

Unfortunately, the workflows do not seem to be available. I am also looking forward to having the UBI available for the API specs

@ajleong623
Copy link
Copy Markdown
Contributor

@karenyrx Is there a way to approve the workflows for all subsequent pushes?

@karenyrx
Copy link
Copy Markdown
Collaborator

Hi @ajleong623 , unfortunately I do not see that option. I have approved the recent workflow for now manually.
Is there any blocker to running the CI locally before pushing? https://github.com/opensearch-project/opensearch-api-specification/blob/main/TESTING_GUIDE.md#running-spec-tests-locally

@ajleong623
Copy link
Copy Markdown
Contributor

@karenyrx I think I can test it in the local run. It is just that I was not sure which tests were failing. Is the code for running the CI checks the same as the code in the .github folder?

Signed-off-by: jzonthemtn <jeff.zemerick@mtnfog.com>
@ajleong623
Copy link
Copy Markdown
Contributor

I’m hoping this works 🙏

@ajleong623
Copy link
Copy Markdown
Contributor

@karenyrx I think there is a decent chance the workflows will since it was tested locally. Would you mind reapproving the workflows?

Co-authored-by: Karen X <karenxyr@gmail.com>
Signed-off-by: Jeff Zemerick <13176962+jzonthemtn@users.noreply.github.com>
@ajleong623
Copy link
Copy Markdown
Contributor

@karenyrx The pull request should be ready. I think a good handful of customers were looking forward towards using the ubi api in their client. Hopefully it can be merged.

@karenyrx karenyrx merged commit de16b63 into opensearch-project:main Oct 23, 2025
32 checks passed
@ajleong623
Copy link
Copy Markdown
Contributor

Thank you!!

@jzonthemtn
Copy link
Copy Markdown
Contributor Author

Thanks everyone involved.

@jzonthemtn jzonthemtn deleted the ubi branch October 23, 2025 20:04
@epugh
Copy link
Copy Markdown
Contributor

epugh commented Oct 31, 2025

Awesome!

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 specifications for the User Behavior Insights (UBI) plugin

6 participants