Skip to content

Update Go SDK to 0.23.0 and use custom marshaller - #772

Merged
hectorcast-db merged 8 commits into
mainfrom
custom-marshaller-test
Oct 16, 2023
Merged

Update Go SDK to 0.23.0 and use custom marshaller#772
hectorcast-db merged 8 commits into
mainfrom
custom-marshaller-test

Conversation

@hectorcast-db

@hectorcast-dbhectorcast-db commented Sep 13, 2023

Copy link
Copy Markdown
Contributor

Changes

Update Go SDK to 0.23.0 and use custom marshaller.

Tests

  • Run unit tests

  • Run nightly

  • Manual test:

./cli jobs create --json @myjob.json

with

{
"name": "my-job-marshal-test-go",
"tasks": [{
"task_key": "testgomarshaltask",
"new_cluster": {
"num_workers": 0,
"spark_version": "10.4.x-scala2.12",
"node_type_id": "Standard_DS3_v2"
},
"libraries": [
{
"jar": "dbfs:/max/jars/exampleJarTask.jar"
}
],
"spark_jar_task": {
"main_class_name": "com.databricks.quickstart.exampleTask"
}
}]
}

Main branch:

Error: Cluster validation error: Missing required field: settings.cluster_spec.new_cluster.size

This branch:

{
"job_id":<jobid>
}

@hectorcast-db

Copy link
Copy Markdown
ContributorAuthor

Comment threadbundle/config/resources/job.go Outdated
Comment threadinternal/jobs_test.go Outdated

@mgyuchtmgyucht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with one nit, will give official stamp once we remove go.mod changes.

Comment threadinternal/jobs_test.go Outdated
@hectorcast-db
hectorcast-db marked this pull request as draft October 4, 2023 11:10
Comment threadgo.sum Outdated
@hectorcast-db
hectorcast-db marked this pull request as ready for review October 13, 2023 08:54
@hectorcast-dbhectorcast-db changed the title Use custom marshallerUpdate SDK-Go to 0.23.0 and use custom marshallerOct 13, 2023
@pieternpietern changed the title Update SDK-Go to 0.23.0 and use custom marshallerUpdate Go SDK to 0.23.0 and use custom marshallerOct 13, 2023
Comment threadinternal/jobs_test.go Outdated
Comment threadinternal/jobs_test.go Outdated
@hectorcast-db
hectorcast-dbforce-pushed the custom-marshaller-test branch 2 times, most recently from ddbbcdc to af8ffabCompareOctober 13, 2023 12:42

@mgyuchtmgyucht left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

one micronit, otherwise LGTM! Feel free to address and click the merge when ready button.

Comment threadinternal/jobs_test.go Outdated
@hectorcast-db
hectorcast-db added this pull request to the merge queueOct 16, 2023
Merged via the queue into main with commit 36f30c8Oct 16, 2023
@hectorcast-db
hectorcast-db deleted the custom-marshaller-test branch October 16, 2023 07:02
pietern added a commit that referenced this pull request Oct 16, 2023
Note: this release includes a fix for the issue where zero values (for example
`num_workers: 0`) were not included in the request body.
CLI:
* Use already instantiated WorkspaceClient in sync command ([#867](#867)).
Bundles:
* Support Unity Catalog Registered Models in bundles ([#846](#846)).
* Fixed merging task libraries from targets ([#868](#868)).
* Add alias for mlops-stack template URL ([#869](#869)).
API Changes:
* Changed `databricks account billable-usage download` command to start returning output.
* Changed `databricks account storage-credentials delete` command with new required argument order.
* Changed `databricks account storage-credentials get` command with new required argument order.
* Changed `databricks account storage-credentials update` command with new required argument order.
* Added `databricks workspace-bindings get-bindings` command.
* Added `databricks workspace-bindings update-bindings` command.
* Removed `databricks account network-policy` command group.
* Changed `databricks ip-access-lists list` command to return output.
OpenAPI commit 493a76554afd3afdd15dc858773d01643f80352a (2023-10-12)
Dependency updates:
* Update Go SDK to 0.23.0 and use custom marshaller ([#772](#772)).
* Bump Terraform provider to v1.28.0 ([#871](#871)).
* Bump golang.org/x/net from 0.16.0 to 0.17.0 ([#863](#863)).
* Bump github.com/hashicorp/hc-install from 0.6.0 to 0.6.1 ([#870](#870)).
@pieternpietern mentioned this pull request Oct 16, 2023
github-merge-queueBot pushed a commit that referenced this pull request Oct 16, 2023
Note: this release includes a fix for the issue where zero values (for
example
`num_workers: 0`) were not included in the request body.
CLI:
* Use already instantiated WorkspaceClient in sync command
([#867](#867)).
Bundles:
* Support Unity Catalog Registered Models in bundles
([#846](#846)).
* Fixed merging task libraries from targets
([#868](#868)).
* Add alias for mlops-stack template URL
([#869](#869)).
API Changes:
* Changed `databricks account billable-usage download` command to start
returning output.
* Changed `databricks account storage-credentials delete` command with
new required argument order.
* Changed `databricks account storage-credentials get` command with new
required argument order.
* Changed `databricks account storage-credentials update` command with
new required argument order.
* Added `databricks workspace-bindings get-bindings` command.
* Added `databricks workspace-bindings update-bindings` command.
* Removed `databricks account network-policy` command group.
* Changed `databricks ip-access-lists list` command to return output.
OpenAPI commit 493a76554afd3afdd15dc858773d01643f80352a (2023-10-12)
Dependency updates:
* Update Go SDK to 0.23.0 and use custom marshaller
([#772](#772)).
* Bump Terraform provider to v1.28.0
([#871](#871)).
* Bump golang.org/x/net from 0.16.0 to 0.17.0
([#863](#863)).
* Bump github.com/hashicorp/hc-install from 0.6.0 to 0.6.1
([#870](#870)).
pietern added a commit that referenced this pull request Oct 16, 2023
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.
github-merge-queueBot pushed a commit that referenced this pull request Oct 17, 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.
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Update Go SDK to 0.23.0 and use custom marshaller.
## Tests
* Run unit tests
* Run nightly
* Manual test:
```
./cli jobs create --json @myjob.json
```
with ```
{
"name": "my-job-marshal-test-go",
"tasks": [{
"task_key": "testgomarshaltask",
"new_cluster": {
"num_workers": 0,
"spark_version": "10.4.x-scala2.12",
"node_type_id": "Standard_DS3_v2"
},
"libraries": [
{
"jar": "dbfs:/max/jars/exampleJarTask.jar"
}
],
"spark_jar_task": {
"main_class_name": "com.databricks.quickstart.exampleTask"
}
}]
}
```
Main branch:
```
Error: Cluster validation error: Missing required field: settings.cluster_spec.new_cluster.size
```
This branch:
```
{
"job_id":<jobid>
}
```
---------
Co-authored-by: Miles Yucht <miles@databricks.com>
denik pushed a commit that referenced this pull request May 20, 2026
Note: this release includes a fix for the issue where zero values (for
example
`num_workers: 0`) were not included in the request body.
CLI:
* Use already instantiated WorkspaceClient in sync command
([#867](#867)).
Bundles:
* Support Unity Catalog Registered Models in bundles
([#846](#846)).
* Fixed merging task libraries from targets
([#868](#868)).
* Add alias for mlops-stack template URL
([#869](#869)).
API Changes:
* Changed `databricks account billable-usage download` command to start
returning output.
* Changed `databricks account storage-credentials delete` command with
new required argument order.
* Changed `databricks account storage-credentials get` command with new
required argument order.
* Changed `databricks account storage-credentials update` command with
new required argument order.
* Added `databricks workspace-bindings get-bindings` command.
* Added `databricks workspace-bindings update-bindings` command.
* Removed `databricks account network-policy` command group.
* Changed `databricks ip-access-lists list` command to return output.
OpenAPI commit 493a76554afd3afdd15dc858773d01643f80352a (2023-10-12)
Dependency updates:
* Update Go SDK to 0.23.0 and use custom marshaller
([#772](#772)).
* Bump Terraform provider to v1.28.0
([#871](#871)).
* Bump golang.org/x/net from 0.16.0 to 0.17.0
([#863](#863)).
* Bump github.com/hashicorp/hc-install from 0.6.0 to 0.6.1
([#870](#870)).
denik pushed a commit that referenced this pull request May 20, 2026
## 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.
Sign up for freeto 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

@hectorcast-db@pietern@mgyucht@andrewnester