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

Fixed MLflow integration test and removed workaround for DELETE query parameter #380

Merged
merged 3 commits into from
May 2, 2023

Conversation

tanmay-db
Copy link
Contributor

@tanmay-db tanmay-db commented May 1, 2023

Changes

  • Fix Mlflow integration test by checking status of model version and waiting for it to not be pending -- issue was happening due to race condition while deleting and status being pending leading to 409 status code.
  • Use query parameters for delete
  • Remove delete workaround

Tests

Ran integration test on PR:

Verified query parameters are supported for MLflow DELETE

  • make test passing
  • make fmt applied
  • relevant integration tests applied

@codecov-commenter
Copy link

codecov-commenter commented May 1, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (2231de8) 34.74% compared to head (1816ddd) 34.74%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #380   +/-   ##
=======================================
  Coverage   34.74%   34.74%           
=======================================
  Files          50       50           
  Lines        3540     3540           
=======================================
  Hits         1230     1230           
  Misses       2199     2199           
  Partials      111      111           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tanmay-db tanmay-db changed the title Disabled workaround for MLflow integration tests Fixed MLflow integration test and removed workaround for DELETE May 1, 2023
@tanmay-db tanmay-db changed the title Fixed MLflow integration test and removed workaround for DELETE Fixed MLflow integration test and removed workaround for DELETE query parameter May 1, 2023
Comment on lines +142 to +159
startTime := time.Now()
for {
currentModelVersion, err := w.ModelRegistry.GetModelVersion(ctx, ml.GetModelVersionRequest{
Name: created.ModelVersion.Name,
Version: created.ModelVersion.Version,
})
require.NoError(t, err)

if currentModelVersion.ModelVersion.Status != ml.ModelVersionStatusPendingRegistration {
break
}
currentTime := time.Now()
elapsedTime := currentTime.Sub(startTime).Seconds()
if elapsedTime > 10 {
t.Fatalf("Timeout: Model version still has PENDING_REGISTERATION status after 10 seconds")
}
time.Sleep(2 * time.Second)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You might be able to use something like this https://stackoverflow.com/a/52218264 here, instead of manually keeping track of time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discussed offline - tldr - not able to use testing methods through goroutine -- might require passing messages to channel and read them from the testMethod and call test fail (after checking the channel to see if message is returned) but maybe not worth it.

@tanmay-db tanmay-db requested a review from kartikgupta-db May 2, 2023 11:19
@tanmay-db tanmay-db merged commit b953f21 into main May 2, 2023
@nfx nfx mentioned this pull request May 11, 2023
nfx added a commit that referenced this pull request May 11, 2023
# Version changelog

## 0.8.1

* Added `in` codegen function
([#387](#387)).
* Fixed mlflow acceptance tests
([#378](#378)).
* Fixed MLflow integration test and removed workaround for `DELETE`
query parameter
([#380](#380)).
* Make clusters acceptance tests robust to duplicate cluster names
([#381](#381)).
* Remove dead code from apierr/errors.go
([#376](#376)).
* Serialize params to request body on delete
([#383](#383)).

Dependency updates:

* Bump golang.org/x/oauth2 from 0.7.0 to 0.8.0
([#385](#385)).
* Bump google.golang.org/api from 0.118.0 to 0.122.0
([#382](#382),
[#386](#386)).
@nfx nfx deleted the fix-go-nightly branch June 15, 2023 22:03
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.

4 participants