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

Update Go SDK to 0.23.0 and use custom marshaller #772

Merged
merged 8 commits into from
Oct 16, 2023

Conversation

hectorcast-db
Copy link
Contributor

@hectorcast-db hectorcast-db commented Sep 13, 2023

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
Contributor Author

bundle/config/resources/job.go Outdated Show resolved Hide resolved
internal/jobs_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mgyucht mgyucht left a comment

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.

internal/jobs_test.go Outdated Show resolved Hide resolved
@hectorcast-db hectorcast-db marked this pull request as draft October 4, 2023 11:10
go.sum Outdated Show resolved Hide resolved
@hectorcast-db hectorcast-db marked this pull request as ready for review October 13, 2023 08:54
@hectorcast-db hectorcast-db changed the title Use custom marshaller Update SDK-Go to 0.23.0 and use custom marshaller Oct 13, 2023
@pietern pietern changed the title Update SDK-Go to 0.23.0 and use custom marshaller Update Go SDK to 0.23.0 and use custom marshaller Oct 13, 2023
internal/jobs_test.go Outdated Show resolved Hide resolved
internal/jobs_test.go Outdated Show resolved Hide resolved
@hectorcast-db hectorcast-db force-pushed the custom-marshaller-test branch 2 times, most recently from ddbbcdc to af8ffab Compare October 13, 2023 12:42
Copy link
Contributor

@mgyucht mgyucht left a comment

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.

internal/jobs_test.go Outdated Show resolved Hide resolved
@hectorcast-db hectorcast-db added this pull request to the merge queue Oct 16, 2023
Merged via the queue into main with commit 36f30c8 Oct 16, 2023
4 checks passed
@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)).
@pietern pietern mentioned this pull request Oct 16, 2023
github-merge-queue bot 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-queue bot 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.
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.

None yet

4 participants