ml-commons icon indicating copy to clipboard operation
ml-commons copied to clipboard

[Enhancement] Enhance validation for create connector API

Open akolarkunnu opened this issue 9 months ago • 8 comments

Description

This change will address the second part of validation "pre and post processing function validation". Moved the method getRemoteServerFromURL() from ConnectorUtils.java to ConnectorAction.java, to avoid the cyclic dependency

Related Issues

Partially resolves #2993

Check List

  • [x] New functionality includes testing.
  • [x] API changes companion pull request created.
  • [x] Commits are signed per the DCO using --signoff.

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.

akolarkunnu avatar Feb 21 '25 10:02 akolarkunnu

Can anyone trigger the failed test suite once more, failure doesn't have any relation with changes.

akolarkunnu avatar Feb 26 '25 02:02 akolarkunnu

@zane-neo Can you please look in o these two failures, my changes around prepostProcessFunctions: 116 tests completed, 3 failed, 11 skipped

  • org.opensearch.ml.rest.RestBedRockInferenceIT.test_bedrock_embedding_v2_model_with_postProcessFunction
  • org.opensearch.ml.rest.RestCohereInferenceIT.test_cohereInference_withDifferent_postProcessFunction

I am not able to reproduce and debug these failures locally because of below dependencies:

The AWS credentials are not set. Skipping test.

COHERE_KEY is null, skipping the test!

akolarkunnu avatar Mar 13 '25 06:03 akolarkunnu

@zane-neo Can you please look in o these two failures, my changes around prepostProcessFunctions: 116 tests completed, 3 failed, 11 skipped

  • org.opensearch.ml.rest.RestBedRockInferenceIT.test_bedrock_embedding_v2_model_with_postProcessFunction
  • org.opensearch.ml.rest.RestCohereInferenceIT.test_cohereInference_withDifferent_postProcessFunction

I am not able to reproduce and debug these failures locally because of below dependencies:

The AWS credentials are not set. Skipping test.

COHERE_KEY is null, skipping the test!

Please rebase the latest code on main branch, this has been fixed.

zane-neo avatar Mar 13 '25 06:03 zane-neo

linux (23) - Known flaky org.opensearch.ml.rest.RestMLRemoteInferenceIT.testPredictWithAutoDeployAndTTL_RemoteModel #3544

linux (21) - There are no real failures

Windows (21) - org.opensearch.ml.rest.RestMLRAGSearchProcessorIT.testBM25WithBedrockConverse - not related the code changes

akolarkunnu avatar Mar 13 '25 17:03 akolarkunnu

Hi Maintainers, Please help to move forward this task. There are 2 skipped tasks, 1 cancelled task and 3 failed tasks, failures are not related to this changes.

akolarkunnu avatar Mar 14 '25 01:03 akolarkunnu

Hi Maintainers, Please help to move forward this task? There are 2 skipped tasks, 1 cancelled task and 3 failed tasks, failures are not related to this changes.

Hi @akolarkunnu, let me review this PR and test out some of the changes. In the meanwhile, the maintainers can help re-trigger the CI and we can check if it goes through? Thanks for the fix and sharing the test details!

pyek-bot avatar Mar 14 '25 03:03 pyek-bot

Please approve for CI - "Waiting for review: ml-commons-cicd-env-require-approval needs approval to start deploying changes."

akolarkunnu avatar Mar 18 '25 05:03 akolarkunnu

Hi Maintainers, @pyek-bot Please approve to run CI.

akolarkunnu avatar Mar 20 '25 00:03 akolarkunnu

Hi Maintainers, Any more comments ?

akolarkunnu avatar Apr 03 '25 06:04 akolarkunnu

Codecov Report

Attention: Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.

Project coverage is 80.62%. Comparing base (a894ff1) to head (415eb5e). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...pensearch/ml/common/connector/ConnectorAction.java 96.00% 0 Missing and 1 partial :warning:
...ch/ml/engine/algorithms/remote/ConnectorUtils.java 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3579      +/-   ##
============================================
+ Coverage     80.61%   80.62%   +0.01%     
- Complexity     7945     7964      +19     
============================================
  Files           694      694              
  Lines         34872    34902      +30     
  Branches       3885     3895      +10     
============================================
+ Hits          28113    28141      +28     
  Misses         5032     5032              
- Partials       1727     1729       +2     
Flag Coverage Δ
ml-commons 80.62% <94.11%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 27 '25 17:05 codecov[bot]

Hi Maintainers , @ylwu-amzn Can you please review

akolarkunnu avatar Jun 02 '25 17:06 akolarkunnu

Hi Maintainers , @ylwu-amzn Can you please review

Hi Muneer, will bring up your PR on todays sprint. We appreciate your patience

brianf-aws avatar Jun 02 '25 18:06 brianf-aws

Hi @akolarkunnu , changes look good! Left a couple minor comments! Thanks for the contribution!

pyek-bot avatar Jun 04 '25 17:06 pyek-bot

thanks for checking the validation "pre and post processing function validation". I found another issue when creating the url, the validation is not happening. please see https://github.com/opensearch-project/ml-commons/issues/3921

mingshl avatar Jun 21 '25 16:06 mingshl