Add current_version_number to dataset status CLI output#965
Add current_version_number to dataset status CLI output#965kaggle-agent wants to merge 1 commit intomainfrom
Conversation
Users polling `kaggle datasets status` after uploading large datasets could only see the processing status but not which version was active. Now the command also fetches dataset metadata via `get_dataset()` and displays the version number alongside the status, e.g., "ready (version 3)". Co-authored-by: kaggle-agent <kaggle-agent@users.noreply.github.com>
| dataset_response = kaggle.datasets.dataset_api_client.get_dataset(dataset_request) | ||
| current_version_number = dataset_response.current_version_number | ||
|
|
||
| return status, current_version_number |
There was a problem hiding this comment.
@rosbo This breaks backward-compatibility, doesn't it? Not for the CLI usage, but for notebooks that import the package. When I checked, there were tens of thousands of such notebooks, but I don't know how often they are used. And I don't know if any of them call dataset_status().
In general, breaking back-compat is not advised.
There was a problem hiding this comment.
I had marvin try to one-shot these, but lack enough context on the working of this code to know if it was a good solution. Based on my initial review it didn't look good.
There was a problem hiding this comment.
Agree with Steve. To avoid breaking script that parses this output, we could add a --format flag like gcloud: https://screenshot.googleplex.com/ganNtm4RhbYHWkS
By default, we would keep the text output with only the status.
But user could specify --format=json and they would get the status AND the current version number in a json output.
Optionally, we could support field selection like gcloud in the format flag:
# If you only want a subset of fields
--format='json(current_version_number)`
Users polling
kaggle datasets statusafter uploading large datasetscould only see the processing status but not which version was active.
Now the command also fetches dataset metadata via
get_dataset()anddisplays the version number alongside the status, e.g.,
"ready (version 3)".
Co-authored-by: kaggle-agent kaggle-agent@users.noreply.github.com
Task: bovard-20260410182517-e17b1b2b
Context: https://chat.kaggle.net/kaggle/pl/jh5x1ft3hjnntgtfwaco11nfmh