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

Fix rendering of streaming response #876

Merged
merged 1 commit into from
Oct 17, 2023
Merged

Fix rendering of streaming response #876

merged 1 commit into from
Oct 17, 2023

Conversation

pietern
Copy link
Contributor

@pietern pietern commented Oct 16, 2023

Changes

The update to the Go SDK v0.23.0 in #772 included a change to make the billable usage API return its streaming response. This still did not make the command print out the CSV returned by the API, however. To do so, we call cmdio.RenderReader in case the response is a byte stream.

Note: there is an opportunity to parse the CSV and return JSON if requested, but that is out of scope for this PR (it is a rather big customization of the command).

Fixes #574.

Tests

Manually confirmed that databricks account billable-usage download now returns CSV.

The update to the Go SDK v0.23.0 in #772 included a change to make the billable
usage API return its streaming response. This still did not make the command
print out the CSV returned by the API, however. To do so, we call
`cmdio.RenderReader` in case the response is a byte stream.

Fixes #574.
@pietern pietern requested a review from mgyucht October 16, 2023 18:26
@pietern pietern added this pull request to the merge queue Oct 17, 2023
Merged via the queue into main with commit 4bf32cb Oct 17, 2023
4 checks passed
@pietern pietern deleted the fix-billable-usage branch October 17, 2023 10:13
shreyas-goenka added a commit that referenced this pull request Oct 19, 2023
CLI:
 * Fix rendering of streaming response ([#876](#876)).
 * Rename MLOps Stack to MLOps Stacks ([#881](#881)).
 * Support Python wheels larger than 10MB ([#879](#879)).
 * Improve the output of the `databricks bundle init` command ([#795](#795)).

Bundles:
 * **FILL THIS IN MANUALLY BY MOVING RELEVANT ITEMS FROM ABOVE LIST**

Internal:
 * **FILL THIS IN MANUALLY BY MOVING RELEVANT ITEMS FROM ABOVE LIST**
@shreyas-goenka shreyas-goenka mentioned this pull request Oct 19, 2023
github-merge-queue bot pushed a commit that referenced this pull request Oct 19, 2023
CLI:
* Fix rendering of streaming response
([#876](#876)).
 
Bundles:
* Rename MLOps Stack to MLOps Stacks
([#881](#881)).
* Support Python wheels larger than 10MB
([#879](#879)).
* Improve the output of the `databricks bundle init` command
([#795](#795)).
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.

Billable usage returns no results/output
2 participants