terraform-provider-databricks
terraform-provider-databricks copied to clipboard
Add `databricks_mlflow_experiment` data source
Changes
Add databricks_mlflow_experiment data source
Tests
Created 3 tests for this data source
- [x]
make testrun locally - [x] relevant change in
docs/folder - [x] covered with integration tests in
internal/acceptance - [x] relevant acceptance tests are passing
- [x] using Go SDK
Partially resolves #2301
Currently you can only fetch the mlflow_experiment data source using the name in this PR. I believe it would be nice to provide the option to fetch using the ID, as well. I have to read a bit more into this.
Codecov Report
Attention: 2 lines in your changes are missing coverage. Please review.
Comparison is base (
4213468) 83.57% compared to head (9b8c8be) 83.57%.
Additional details and impacted files
@@ Coverage Diff @@
## main #2389 +/- ##
==========================================
- Coverage 83.57% 83.57% -0.01%
==========================================
Files 168 169 +1
Lines 15083 15107 +24
==========================================
+ Hits 12606 12625 +19
- Misses 1736 1739 +3
- Partials 741 743 +2
| Files | Coverage Δ | |
|---|---|---|
| provider/provider.go | 94.47% <100.00%> (+0.03%) |
:arrow_up: |
| mlflow/data_mlflow_experiment.go | 91.30% <91.30%> (ø) |
@840 thank you for raising the PR. a couple of thoughts for the pending tasks
you could look at https://github.com/databricks/terraform-provider-databricks/blob/master/clusters/data_cluster.go for example of searching both by name & id
the Go SDK has GetExperiment method which takes an ExperimentId as well.
For acceptance tests, you could create an mlflow experiment and try to read it in the same block, similar to https://github.com/databricks/terraform-provider-databricks/blob/master/internal/acceptance/data_job_test.go
Blocked by databricks/databricks-sdk-go#428
Will continue this week or early next week.
@mgyucht WIP tag removed, should be ready!