Commit fe1b364
authored
Added a warning for non exportable types in
Fixes: #4081
## Changes
Skip non-exportable workspace objects (like `MLFLOW_EXPERIMENT`) during
`workspace export-dir` instead of failing the entire export. Warnings
are collected and displayed at the end.
## Why
Currently, `export-dir` fails when a directory contains an MLflow
experiment because experiments cannot be exported via the workspace
export API. This makes it impossible to export any folder containing an
experiment.
This change skips non-exportable object types (`LIBRARY`, `DASHBOARD`,
`REPO`, `MLFLOW_EXPERIMENT`) and shows warnings at the end:
```
Exporting files from /my/folder
Warnings:
- /my/folder/my-experiment (skipped; cannot export MLFLOW_EXPERIMENT)
Export complete
```
**Note:** Ideally, `ObjectTypeMlflowExperiment` should be added to
`databricks-sdk-go` as a constant. Currently using a string literal as a
workaround.
## Tests
- Added acceptance test `cmd/workspace/export-dir-skip-experiments`
- Updated `cmd/workspace/export-dir-file-size-limit` output format
- Verified manually against a real workspace with an MLflow experimentexport-dir (#4101)1 parent 825a6a5 commit fe1b364
File tree
7 files changed
+72
-20
lines changed- acceptance/cmd/workspace
- export-dir-file-size-limit
- export-dir-skip-experiments
- cmd/workspace/workspace
7 files changed
+72
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
9 | 5 | | |
Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
54 | 74 | | |
55 | 75 | | |
56 | 76 | | |
| |||
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
80 | 107 | | |
81 | 108 | | |
82 | 109 | | |
| |||
92 | 119 | | |
93 | 120 | | |
94 | 121 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 122 | + | |
98 | 123 | | |
99 | 124 | | |
100 | 125 | | |
| |||
140 | 165 | | |
141 | 166 | | |
142 | 167 | | |
143 | | - | |
144 | 168 | | |
145 | 169 | | |
146 | 170 | | |
| |||
159 | 183 | | |
160 | 184 | | |
161 | 185 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
| |||
0 commit comments