Skip to content

Conversation

@dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Feb 8, 2025

Description

Adds integration tests for multitenancy.

The test classes were squashed and cherry-picked from #2818.

Presently the search model and search agent calls are commented out, as MLSearchHandler and TransportSearchAgentAction classes are still using client.search() rather than SDKClient implementations.

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.

@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval February 8, 2025 19:47 — with GitHub Actions Failure
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval February 8, 2025 19:47 — with GitHub Actions Failure
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval February 10, 2025 02:10 — with GitHub Actions Inactive
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval February 10, 2025 03:27 — with GitHub Actions Inactive
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval February 10, 2025 17:41 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.98%. Comparing base (ed4f09f) to head (bd40be1).
Report is 9 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3516      +/-   ##
============================================
- Coverage     78.20%   77.98%   -0.22%     
- Complexity     7162     7315     +153     
============================================
  Files           631      655      +24     
  Lines         32248    32997     +749     
  Branches       3666     3708      +42     
============================================
+ Hits          25219    25734     +515     
- Misses         5465     5676     +211     
- Partials       1564     1587      +23     
Flag Coverage Δ
ml-commons 77.98% <ø> (-0.22%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval February 12, 2025 00:28 — with GitHub Actions Failure
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval February 12, 2025 00:28 — with GitHub Actions Inactive
@dbwiddis dbwiddis force-pushed the tenant-aware-integ branch 2 times, most recently from 98bf007 to 41353eb Compare March 19, 2025 02:12
@dbwiddis
Copy link
Member Author

dbwiddis commented Mar 19, 2025

Rebased to current main (Lucene hits breaking change).

Note: commit 41353eb will currently fail integ tests, will be fixed by #3671.

@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval March 19, 2025 02:13 — with GitHub Actions Inactive
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval March 19, 2025 02:13 — with GitHub Actions Failure
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval March 19, 2025 02:13 — with GitHub Actions Inactive
@dbwiddis dbwiddis force-pushed the tenant-aware-integ branch from 0e10ea8 to f810d75 Compare April 30, 2025 22:20
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:22 — with GitHub Actions Failure
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:22 — with GitHub Actions Error
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:22 — with GitHub Actions Error
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:22 — with GitHub Actions Failure
@dbwiddis dbwiddis force-pushed the tenant-aware-integ branch from f810d75 to bd40be1 Compare April 30, 2025 22:46
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:48 — with GitHub Actions Failure
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:48 — with GitHub Actions Error
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval April 30, 2025 22:48 — with GitHub Actions Inactive
@dbwiddis dbwiddis had a problem deploying to ml-commons-cicd-env-require-approval April 30, 2025 22:48 — with GitHub Actions Failure
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval May 1, 2025 17:31 — with GitHub Actions Inactive
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval May 1, 2025 17:31 — with GitHub Actions Inactive
@dbwiddis dbwiddis temporarily deployed to ml-commons-cicd-env-require-approval May 1, 2025 17:31 — with GitHub Actions Inactive
@dhrubo-os
Copy link
Collaborator

dhrubo-os commented May 1, 2025

I noticed these tests run for 1 hour! Is there any way to reduce time? I'm just wondering if this will add extra development headache or not.

@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env-require-approval May 1, 2025 17:36 — with GitHub Actions Failure
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env-require-approval May 1, 2025 17:36 — with GitHub Actions Failure
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env-require-approval May 1, 2025 17:36 — with GitHub Actions Failure
@dhrubo-os dhrubo-os had a problem deploying to ml-commons-cicd-env-require-approval May 1, 2025 17:36 — with GitHub Actions Failure
@dbwiddis
Copy link
Member Author

dbwiddis commented May 1, 2025

I noticed these tests run for 1 hour! Is there any way to reduce time? I'm just wondering if this will add extra development headache or not.

These tenant aware tests don't run that long. The one hour is just the existing CI tests; closer to 30 minutes but there's a built-in retry if/when it fails. Here are the timestamps for the Tenant-aware tests:

Initial Run:

RestMLAgentTenantAwareIT: 15:59:22,244 to 15:59:36,864 = 14.62 seconds
RestMLConnectorTenantAwareIT: 09:59:36,906 to 09:59:37,227 = 0.321 seconds
RestMLModelGroupTenantAwareIT: 00:07:42,160 to 00:07:47,810 = 5.65 seconds
RestMLModelTenantAwareIT: 17:07:47,833 to 17:07:48,460 = 0.627 seconds
RestMLModelUndeployTenantAwareIT: 23:07:48,487 to 23:07:48,947 = 0.46 seconds

2025-04-30T22:59:22.2870818Z RestMLAgentTenantAwareIT > testAgentCRUD STANDARD_OUT
2025-04-30T22:59:22.2871694Z     [2025-04-30T15:59:22,244][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] before test
2025-04-30T22:59:22.2873806Z     [2025-04-30T15:59:22,251][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] initializing REST clients against [http://[::1]:40731, http://127.0.0.1:37761]
2025-04-30T22:59:36.8868911Z     [2025-04-30T15:59:36,864][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] after test

2025-04-30T22:59:36.9870522Z RestMLConnectorTenantAwareIT > testConnectorCRUD STANDARD_OUT
2025-04-30T22:59:36.9871828Z     [2025-05-01T09:59:36,906][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] before test
2025-04-30T22:59:36.9874500Z     [2025-05-01T09:59:36,911][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] initializing REST clients against [http://[::1]:40731, http://127.0.0.1:37761]
2025-04-30T22:59:37.2871387Z     [2025-05-01T09:59:37,227][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] after test

2025-04-30T23:07:42.1874946Z RestMLModelGroupTenantAwareIT > testModelGroupCRUD STANDARD_OUT
2025-04-30T23:07:42.1875957Z     [2025-05-01T00:07:42,160][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] before test
2025-04-30T23:07:42.1877547Z     [2025-05-01T00:07:42,163][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] initializing REST clients against [http://[::1]:40731, http://127.0.0.1:37761]
2025-04-30T23:07:47.8869400Z     [2025-05-01T00:07:47,810][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] after test

2025-04-30T23:07:47.8870311Z RestMLModelTenantAwareIT > testModelCRUD STANDARD_OUT
2025-04-30T23:07:47.8870858Z     [2025-04-30T17:07:47,833][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] before test
2025-04-30T23:07:47.8871830Z     [2025-04-30T17:07:47,837][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] initializing REST clients against [http://[::1]:40731, http://127.0.0.1:37761]
2025-04-30T23:07:48.4883341Z     [2025-04-30T17:07:48,460][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] after test

2025-04-30T23:07:48.5868016Z RestMLModelUndeployTenantAwareIT > testModelDeployUndeploy STANDARD_OUT
2025-04-30T23:07:48.5868839Z     [2025-04-30T23:07:48,487][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] before test
2025-04-30T23:07:48.5869920Z     [2025-04-30T23:07:48,490][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] initializing REST clients against [http://[::1]:40731, http://127.0.0.1:37761]
2025-04-30T23:07:48.9869981Z     [2025-04-30T23:07:48,947][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] after test

Retry Run:

RestMLAgentTenantAwareIT: 23:28:35,125 to 23:29:00,830 = 25.705 seconds
RestMLConnectorTenantAwareIT: 16:29:00,885 to 16:29:01,517 = 0.632 seconds
RestMLModelGroupTenantAwareIT: 20:37:29,420 to 20:37:35,441 = 6.021 seconds
RestMLModelTenantAwareIT: 19:37:35,469 to 19:37:36,706 = 1.237 seconds
RestMLModelUndeployTenantAwareIT: 00:37:36,729 to 00:37:37,600 = 0.871 seconds

2025-04-30T23:28:35.1393528Z RestMLAgentTenantAwareIT > testAgentCRUD STANDARD_OUT
2025-04-30T23:28:35.1394402Z     [2025-04-30T23:28:35,125][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] before test
2025-04-30T23:28:35.1396159Z     [2025-04-30T23:28:35,131][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] initializing REST clients against [http://[::1]:38517, http://127.0.0.1:43331, http://[::1]:34331, http://127.0.0.1:33387, http://[::1]:33917, http://127.0.0.1:37123]
2025-04-30T23:29:00.9390064Z     [2025-04-30T23:29:00,830][INFO ][o.o.m.r.RestMLAgentTenantAwareIT] [testAgentCRUD] after test

2025-04-30T23:29:00.9391072Z RestMLConnectorTenantAwareIT > testConnectorCRUD STANDARD_OUT
2025-04-30T23:29:00.9392056Z     [2025-04-30T16:29:00,885][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] before test
2025-04-30T23:29:00.9396510Z     [2025-04-30T16:29:00,890][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] initializing REST clients against [http://[::1]:38517, http://127.0.0.1:43331, http://[::1]:34331, http://127.0.0.1:33387, http://[::1]:33917, http://127.0.0.1:37123]
2025-04-30T23:29:01.5382588Z     [2025-04-30T16:29:01,517][INFO ][o.o.m.r.RestMLConnectorTenantAwareIT] [testConnectorCRUD] after test

2025-04-30T23:37:29.4396743Z RestMLModelGroupTenantAwareIT > testModelGroupCRUD STANDARD_OUT
2025-04-30T23:37:29.4397782Z     [2025-04-30T20:37:29,420][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] before test
2025-04-30T23:37:29.4402482Z     [2025-04-30T20:37:29,424][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] initializing REST clients against [http://[::1]:38517, http://127.0.0.1:43331, http://[::1]:34331, http://127.0.0.1:33387, http://[::1]:33917, http://127.0.0.1:37123]
2025-04-30T23:37:35.5383455Z     [2025-04-30T20:37:35,441][INFO ][o.o.m.r.RestMLModelGroupTenantAwareIT] [testModelGroupCRUD] after test

2025-04-30T23:37:35.5386998Z RestMLModelTenantAwareIT > testModelCRUD STANDARD_OUT
2025-04-30T23:37:35.5388229Z     [2025-04-30T19:37:35,469][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] before test
2025-04-30T23:37:35.5390207Z     [2025-04-30T19:37:35,474][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] initializing REST clients against [http://[::1]:38517, http://127.0.0.1:43331, http://[::1]:34331, http://127.0.0.1:33387, http://[::1]:33917, http://127.0.0.1:37123]
2025-04-30T23:37:36.7378495Z     [2025-04-30T19:37:36,706][INFO ][o.o.m.r.RestMLModelTenantAwareIT] [testModelCRUD] after test

2025-04-30T23:37:36.8380950Z RestMLModelUndeployTenantAwareIT > testModelDeployUndeploy STANDARD_OUT
2025-04-30T23:37:36.8382207Z     [2025-05-01T00:37:36,729][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] before test
2025-04-30T23:37:36.8384553Z     [2025-05-01T00:37:36,731][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] initializing REST clients against [http://[::1]:38517, http://127.0.0.1:43331, http://[::1]:34331, http://127.0.0.1:33387, http://[::1]:33917, http://127.0.0.1:37123]
2025-04-30T23:37:37.6384907Z     [2025-05-01T00:37:37,600][INFO ][o.o.m.r.RestMLModelUndeployTenantAwareIT] [testModelDeployUndeploy] after test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants