Skip to content

Conversation

denik
Copy link
Contributor

@denik denik commented Sep 23, 2025

Test that shows that JSON unmarshaller in Go SDK is unpredictable when field have unexpected types (e.g. string like "$resources.jobs.foo.id" instead of a number). This makes JSON round trip approach introduced in https://github.com/databricks/cli/pull/2926/files#diff-b7bffa44a68a4b43193ab3157de6ff3844353f7b4903663a7552d1294dda1526R307 unsuitable for what it is used.

@denik denik temporarily deployed to test-trigger-is September 23, 2025 11:28 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Sep 23, 2025

Run: 17944743430

Env ✅​pass 🔄​flaky 🙈​skip
✅​ aws linux 311 529
✅​ aws windows 312 528
✅​ aws-ucws linux 423 427
✅​ aws-ucws windows 424 426
✅​ azure linux 311 528
✅​ azure windows 312 527
🔄​ azure-ucws linux 414 9 426
🔄​ azure-ucws windows 419 5 425
🔄​ gcp linux 308 2 530
✅​ gcp windows 311 529
11 failing tests:
Test Name azure-ucws linux azure-ucws windows gcp linux
TestAccept ✅​pass ✅​pass 🔄​flaky
TestAccept/bundle/deploy/dashboard/detect-change 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/deploy/dashboard/generate_inplace 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/deploy/dashboard/nested-folders 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/deploy/dashboard/simple 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/simple_syncroot 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deployment/bind/dashboard 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deployment/bind/dashboard/recreation 🔄​flaky ✅​pass ✅​pass
TestAccept/bundle/templates/default-python/combinations/serverless ✅​pass ✅​pass 🔄​flaky
TestDashboardAssumptions_WorkspaceImport 🔄​flaky 🔄​flaky ✅​pass

func TestUnmarshalResourceJob(t *testing.T) {
x := resources.Job{}
err := json.Unmarshal([]byte(inputJob), &x)
require.NoError(t, err)
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know if/where this error gets swallowed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I did not debug this further than this.

github-merge-queue bot pushed a commit that referenced this pull request Sep 26, 2025
…N roundtrip (#3646)

## Why
For direct, we fetch configs as struct instances via GetResourceConfig,
which is using json roundtrip between dyn value and struct. That,
however, does not work well when there references in the config, see
#3645 for details.

This switches to converting dyn.Value with dyn/convert ToTyped function.
The function was not used previously because it did not handle
ForceSendFields correctly for embedded structs which caused JSON
marshaller in Go SDK to return error. This was fixed in
#3650 and
#3649

## Tests
Existing tests.
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.

3 participants