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

Backport/backport 2922 to 2.x #3034

Conversation

brianf-aws
Copy link
Contributor

Description

Manual backport due to conflict #2922 (The commit that caused the backport merge conflict)

Related Issues

Resolves #2890 (the initial PR that brought up the bug)

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

opensearch-trigger-bot bot and others added 30 commits February 2, 2024 15:19
add get config api to retrieve root agent id

Signed-off-by: Bhavana Ramaram <[email protected]>
…del (opensearch-project#1940) (opensearch-project#2003)

* Add files via upload

Signed-off-by: Ulan Yisaev <[email protected]>
Adding an AI connector blueprint for the Aleph Alpha Luminous-Base Embedding Model.

Signed-off-by: Ulan Yisaev <[email protected]>

* Update aleph_alpha_connector_luminous_base_embedding_blueprint.md

Fixed all comments.

Signed-off-by: Ulan Yisaev <[email protected]>

---------

Signed-off-by: Ulan Yisaev <[email protected]>
(cherry picked from commit a62ecc1)

Co-authored-by: Ulan Yisaev <[email protected]>
) (opensearch-project#2005)

Signed-off-by: Jing Zhang <[email protected]>
(cherry picked from commit b84b130)

Co-authored-by: Jing Zhang <[email protected]>
…project#2024)

Signed-off-by: Jing Zhang <[email protected]>
(cherry picked from commit 429ac86)

Co-authored-by: Jing Zhang <[email protected]>
)

* system error handling

Signed-off-by: Jing Zhang <[email protected]>

* remove NullPointerException from client error

Signed-off-by: Jing Zhang <[email protected]>

* replace jsonobject with ObjectMapper

Signed-off-by: Jing Zhang <[email protected]>

* add more UT

Signed-off-by: Jing Zhang <[email protected]>

* fix format issue

Signed-off-by: Jing Zhang <[email protected]>

* spotless

Signed-off-by: Jing Zhang <[email protected]>

---------

Signed-off-by: Jing Zhang <[email protected]>
(cherry picked from commit c2a1d82)

Co-authored-by: Jing Zhang <[email protected]>
…nsearch-project#2019)

* rename memory field names in responses

Signed-off-by: Xun Zhang <[email protected]>

* fix the IT test

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit a07dd14)

Co-authored-by: Xun Zhang <[email protected]>
disable dynamic mapping for config index
Signed-off-by: Bhavana Ramaram <[email protected]>
…#1999) (opensearch-project#2030)

* send agent execution response after saving memory



* spotless



---------

Signed-off-by: Jing Zhang <[email protected]>
…t#2031)

* tool uses original input



* fix tool input in trace



---------

Signed-off-by: Jing Zhang <[email protected]>
…ch-project#2032)

* bug fix - tool parameters missing



* address comments



---------

Signed-off-by: Jing Zhang <[email protected]>
fix error code when failed to delete model
Signed-off-by: Bhavana Ramaram <[email protected]>
…nsearch-project#2036)

* Add updated Cohere embedding blueprint

* Add updated Cohere embedding blueprint

* Update Cohere docs

* PR comments

* add missing period

* Remove committed doc

* Embedding updates

(cherry picked from commit 6def544)

Co-authored-by: Tianjing Li <[email protected]>
…project#2007) (opensearch-project#2042)

* enhance: make response_field customizable in MLModelTool

Signed-off-by: zhichao-aws <[email protected]>

* ut for malformed response field

Signed-off-by: zhichao-aws <[email protected]>

* remove import * in MLModelToolTests

Signed-off-by: zhichao-aws <[email protected]>

---------

Signed-off-by: zhichao-aws <[email protected]>
(cherry picked from commit e1d21ba)

Co-authored-by: zhichao-aws <[email protected]>
…nsearch-project#2044)

* fix edge case for validate json method

Signed-off-by: Yaliang Wu <[email protected]>

* add more test case

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 50d30df)

Co-authored-by: Yaliang Wu <[email protected]>
…pensearch-project#2047)

* Fix long pending issue when deleting model

Signed-off-by: zane-neo <[email protected]>

* Refine the delete model code

Signed-off-by: zane-neo <[email protected]>

* refactor delete model flow to make sure all dependent resources are deleted together with model metadata

Signed-off-by: zane-neo <[email protected]>

* fix minor issue to make sure only non-remote model will deelete chunks

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* fix failure UTs

Signed-off-by: zane-neo <[email protected]>

* Change to delete model metadata first

Signed-off-by: zane-neo <[email protected]>

* format code

Signed-off-by: zane-neo <[email protected]>

* Remove remote function check

Signed-off-by: zane-neo <[email protected]>

* Fix failure UTs

Signed-off-by: zane-neo <[email protected]>

---------

Signed-off-by: zane-neo <[email protected]>
(cherry picked from commit f18eaf3)

Co-authored-by: zane-neo <[email protected]>
…ensearch-project#1874) (opensearch-project#2048)

* add: connector blueprint for Azure OpenAI embedding

* add: connector blueprint for azure openai chat model

* minor: fix typo

(cherry picked from commit 671457b)

Co-authored-by: OysterMax <[email protected]>
…roject#2061)

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit a661176)

Co-authored-by: Yaliang Wu <[email protected]>
…project#2072)

Signed-off-by: Dhrubo Saha <[email protected]>
(cherry picked from commit 07d08cb)

Co-authored-by: Dhrubo Saha <[email protected]>
opensearch-trigger-bot bot and others added 4 commits September 30, 2024 17:41
…ch-project#2980) (opensearch-project#2991)

* Prevents future UT build issues addresses opensearch-project#2967

Depending on the GitHub CI workflow executes it will invoke ./gradlew build which will run tests on random parameters everytime, there are local-code's that will break a build one of them being az-Cyrl. The solution here was preventing (explicitly writing the local to be set to en-US) Github actions building on these random parameters that will interupt a build and lose time. Manual testing was done to prove that using this flag breaks a build, you can check the issue opensearch-project#2967 or you can run ./gradlew build -Dtests.local=az-Cyrl to see it breaks

Signed-off-by: Brian Flores <[email protected]>

* Updates current codebase with Local.Root to string operations

The previous commit made a hard change on the build while ignoring the root problem, which was making sure that our codebase currently supports string operations regardless of the locale code. In this new commit String operations like toUpperCase have a extra argument of Locale.Root making the codebase agnostic to the rules of other langugages such as Spanish or Turkish. Manual testing was done like raised in the GitHub issue opensearch-project#2967 also ./gradlew build -Dtests.Local=az-Cyrl passes

Signed-off-by: Brian Flores <[email protected]>

---------

Signed-off-by: Brian Flores <[email protected]>
(cherry picked from commit cd83590)

Co-authored-by: Brian Flores <[email protected]>
…earch-project#3016)

* Add require approval stage so only maintainers can start CI stage without approval

Signed-off-by: Peter Zhu <[email protected]>

* Add more

Signed-off-by: Peter Zhu <[email protected]>

* Add more

Signed-off-by: Peter Zhu <[email protected]>

* Add old files

Signed-off-by: Peter Zhu <[email protected]>

* Update require-approval.yml

Signed-off-by: Peter Zhu <[email protected]>

---------

Signed-off-by: Peter Zhu <[email protected]>
(cherry picked from commit 9de2d23)

Co-authored-by: Peter Zhu <[email protected]>
* populate time fields for connectors on return

fixes opensearch-project#2890 Currently any class that extends the AbstractConnector class has the fields createdTime and lastUpdatedTime set to null. The solution was instantiating the fields in the constructor of the AbstractConnector class, as well updating it within the HTTPConnector class whenever an update happens. Many tests were modified to catch the time fields being populated as such there will be many differences on the string in order to get around the timing issue when doing tests.

Signed-off-by: Brian Flores <[email protected]>

* fixes backward compatability issues with old connectors

fixes opensearch-project#2890 when applying a code change like this previous connectors would have a weird bug where upon calling GET on them would change the timestamp. In this commit, it remains the old connectors without time fields while new ones have time fields, newer connectors will have correct and updated Timestamp. Manual testing was done on a local cluster and two unit tests were done to inspect the time changes on creation and update

Signed-off-by: Brian Flores <[email protected]>

* fix failing MLRegisterModelInutTest.testToXContent tests

Originally this commit was cherry picked from the 2.x branch and as such code changes affected the new build that werent caught on the previous commit 8c006de. Reformatted tests that were failing as the behavior implemented in previous commits was to not display time fields if a connector does not have them in the first place. gradlew build was done to assure the tests passed

Signed-off-by: Brian Flores <[email protected]>

* Reverts back model tests that were modified incorrectly by connector change

When creating a code change to the connector it propagated the new change of the object that affected many UTs, but after changing the logic of indexing the new connector, change the old changes for the unit test involving models with connectors had to be reverted back. UTs specifically for the indexed connectors have been created in UpdateConnectorTransportActionTests were done to capture this

Signed-off-by: Brian Flores <[email protected]>

* Adds lastUpdateTime to Old Connectors

Previoulsy we didnt consider the old connectors to have time fields at all, But given offline discussion if we add time fields to old connectors users could get more information moving forward without breaking any backward features. The solution to this was setting the last updated time in the update connector api; now moving forward any connector gets attached a last updated time field. I updated the testUpdateConnectorDoesNotUpdateHTTPCOnnectorTimeFields method to check that lastUpdateTime has a timestamp but that createdTime has no time field.

Signed-off-by: Brian Flores <[email protected]>

* Fixes wildcard import in UpdateConnectorTransportActionTests

Signed-off-by: Brian Flores <[email protected]>

---------

Signed-off-by: Brian Flores <[email protected]>
(cherry picked from commit 88eaefd)
@brianf-aws brianf-aws had a problem deploying to ml-commons-cicd-env-require-approval October 2, 2024 00:15 — with GitHub Actions Failure
@brianf-aws brianf-aws had a problem deploying to ml-commons-cicd-env-require-approval October 2, 2024 00:15 — with GitHub Actions Failure
@opensearch-trigger-bot opensearch-trigger-bot bot added documentation Improvements or additions to documentation infra labels Oct 2, 2024
@brianf-aws brianf-aws closed this Oct 2, 2024
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 00:19 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 18:10 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 18:10 — with GitHub Actions Inactive
@brianf-aws brianf-aws temporarily deployed to ml-commons-cicd-env-require-approval October 2, 2024 18:10 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Created Time and Last Updated Time are not implemented on Connector