Skip to content

structdiff: diff json:"-," fields like encoding/json does - #7207

Merged
denik merged 1 commit into
mainfrom
denik/structdiff-dash-comma-field
Oct 28, 2026
Merged

denik merged 1 commit into
mainfrom
denik/structdiff-dash-comma-field

Conversation

@denik

@denik denik commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

GetStructDiff skipped every field whose JSON name is -, including json:"-," / json:"-,omitempty" fields that encoding/json serializes under the key "-". It now skips only the exact tag json:"-" via structaccess.IsSkippedField, which IsEqual, structaccess and structwalk already use. Before this change IsEqual could report two values as different while GetStructDiff returned no changes.

The change is reported at path -, the same form structwalk emits and structaccess.Get resolves.

No type in this repo or in databricks-sdk-go uses such a tag (only test fixtures do), so this is a consistency fix with no user-visible effect today.

This pull request and its description were written by Isaac.

GetStructDiff skipped any field whose JSON name is "-", which also dropped
json:"-," / json:"-,omitempty" fields that encoding/json serializes under the
key "-". Skip only the exact tag json:"-" via structaccess.IsSkippedField, as
IsEqual, structaccess and structwalk already do.

Co-authored-by: Isaac <no-reply@databricks.com>
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 0669a35

Run: 40593857506

Env 🔄​flaky ✅​pass 🙈​skip Time
🔄​ aws linux-2core-8gb 2 279 15 5:29
✅​ aws-windows-latest-4core-16gb 283 13 3:30
✅​ azure linux-2core-8gb 280 15 5:07
✅​ azure-windows-latest-4core-16gb 282 13 4:08
✅​ gcp linux-2core-8gb 281 15 5:19
✅​ gcp-windows-latest-4core-16gb 283 13 4:04
Test Name aws linux-2core-8gb
🔄​ TestFsCpFileToDirFileNotOverwritten 🔄​f
🔄​ TestFsCpFileToDirFileNotOverwritten/uc-volumes_to_dbfs 🔄​f
Top 6 slowest tests (at least 2 minutes):
duration env testname
4:04 azure-windows-latest-4core-16gb TestAccept
4:00 gcp-windows-latest-4core-16gb TestAccept
3:50 aws linux-2core-8gb TestAccept
3:48 gcp linux-2core-8gb TestAccept
3:45 azure linux-2core-8gb TestAccept
3:25 aws-windows-latest-4core-16gb TestAccept

@denik
denik marked this pull request as ready for review October 28, 2026 07:05
@denik
denik requested a review from a team as a code owner October 28, 2026 07:05
@denik
denik added this pull request to the merge queue Oct 28, 2026
Merged via the queue into main with commit 3b1d281 Oct 28, 2026
28 checks passed
@denik
denik deleted the denik/structdiff-dash-comma-field branch October 28, 2026 09:31
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 3b1d281

Run: 40665035584

Env 🔄​flaky ✅​pass 🙈​skip Time
🔄​ aws linux-2core-8gb 3 1464 1217 162:02
✅​ aws-windows-latest-4core-16gb 1392 1242 191:19
✅​ azure linux-2core-8gb 1316 1269 119:41
✅​ azure-windows-latest-4core-16gb 1241 1294 142:59
🔄​ gcp linux-2core-8gb 3 1300 1274 132:44
✅​ gcp-windows-latest-4core-16gb 1228 1299 159:08
Test Name aws linux-2core-8gb gcp linux-2core-8gb
🔄​ TestAccept 🔄​f 🔄​f
🔄​ TestAccept/bundle/invariant/no_drift ✅​p 🔄​f
🔄​ TestAccept/bundle/invariant/no_drift/DMS=true/INPUT_CONFIG=genie_space.yml.tmpl/READPLAN= ✅​p 🔄​f
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate 🔄​f 🙈​s
🔄​ TestAccept/bundle/resources/postgres_synced_tables/recreate/DMS= 🔄​f
Top 50 slowest tests (at least 2 minutes):
duration env testname
18:51 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
17:27 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
17:06 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
15:18 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
13:58 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=
13:27 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
12:27 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
9:49 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
9:41 gcp-windows-latest-4core-16gb TestAccept
9:19 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
9:01 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
8:44 aws-windows-latest-4core-16gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
8:33 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
8:23 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
8:03 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:40 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=
7:40 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
7:39 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:38 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:29 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
7:25 aws linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
7:23 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=
7:21 aws linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
7:14 aws-windows-latest-4core-16gb TestAccept
7:13 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
7:12 aws-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
7:12 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
7:12 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=
7:10 aws linux-2core-8gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
7:02 azure-windows-latest-4core-16gb TestAccept
7:00 aws linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
6:58 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true
6:58 azure-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=
6:58 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:58 aws linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=true
6:52 gcp linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/local_ssd_count/DMS=true
6:38 azure linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
6:37 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=true
6:31 aws linux-2core-8gb TestAccept/bundle/resources/clusters/deploy/update-after-create/DMS=
6:31 aws linux-2core-8gb TestAccept/bundle/deploy/spark-jar-task/DMS=true
6:26 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=
6:24 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/deploy/simple/DMS=true
6:23 aws-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=true
6:19 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=
6:13 gcp-windows-latest-4core-16gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
6:02 azure linux-2core-8gb TestAccept/bundle/resources/clusters/lifecycle-started-toggle/DMS=true
5:57 aws linux-2core-8gb TestAccept/bundle/resources/clusters/resize-terminated-fallback/DMS=
5:57 gcp linux-2core-8gb TestAccept/bundle/config-remote-sync/multiple_resources/DMS=
5:54 gcp linux-2core-8gb TestAccept/bundle/resources/apps/lifecycle-started/DMS=true
5:54 azure-windows-latest-4core-16gb TestAccept/bundle/resources/clusters/lifecycle-started/DMS=true

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