Skip to content

Keep unquoted YAML numbers as written in string fields - #7814

Open
denik wants to merge 3 commits into
denik/acc-yaml-numeric-stringsfrom
denik/yaml-keep-source-text
Open

denik wants to merge 3 commits into
denik/acc-yaml-numeric-stringsfrom
denik/yaml-keep-source-text

Conversation

@denik

@denik denik commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Changes

The YAML loader now records the source text of unquoted scalars it resolves to an int or float. String fields and ${var.x} interpolation use that text instead of formatting the parsed number. Int and float fields still get the parsed value; bools are unchanged (True still becomes "true").

Why

policy_id: 0012345678901234 became 12345678901234, version: 3.10 became 3.1, and id-${var.x} with such a default became id-1.2345678901234e+13. See #7793 and the cases recorded in #7811.

This changes deployed values for configs that relied on the old conversion, e.g. 1.0 or 1_000 in a string field is now sent as written. Not covered: .variables.*.value in bundle validate -o json and values passed to PyDABs stay numbers, and variable-overrides.json (JSON) has no source text.

Tests

Goldens from #7811 now show the source text kept; unit tests in dyn, yamlloader, convert and dynvar.

This pull request and its description were written by Isaac.

@denik
denik added this pull request to stack #7815 November 19, 2026 15:01
@denik denik changed the title Keep source text of unquoted YAML numbers in string fields Keep unquoted YAML numbers as written in string fields Nov 19, 2026
@github-actions github-actions Bot added the DABs DABs related issues label Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 2157c5b19 | Workflow run

Regression test report

Selected 2 changed tests (limit=20, 0 not selected)

4 tests: regression=4 unreleased=0 coverage=0 failing=0
test branch main (828e0b1) latest (v1.27.0)
TestAccept/bundle/validate/variables/numeric_defaults/DMS= ✅ ❌ ❌
TestAccept/bundle/validate/variables/numeric_defaults/DMS=true ✅ ❌ ❌
TestAccept/bundle/validate/yaml_numeric_strings/DMS= ✅ ❌ ❌
TestAccept/bundle/validate/yaml_numeric_strings/DMS=true ✅ ❌ ❌
TestAccept/bundle/validate/variables/numeric_defaults/DMS=: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"0012345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901E0042\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-0012345678901234\",\n    \"interpolated_int\": \"id-0042\",\n    \"interpolated_version\": \"v3.10\",\n    \"leading_zero\": \"0012345678901234\",\n    \"leading_zero_int\": \"0042\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"0012345678901234\",\n    \"version\": \"3.10\"\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"12345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901000000000000000000000000000000000000000000\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-1.2345678901234e+13\",\n    \"interpolated_int\": \"id-42\",\n    \"interpolated_version\": \"v3.1\",\n    \"leading_zero\": \"12345678901234\",\n    \"leading_zero_int\": \"42\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"12345678901234\",\n    \"version\": \"3.1\"\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -15,15 +15,15 @@
        	            	   "max_concurrent_runs": 10,
        	            	-  "policy_id": "0012345678901234",
        	            	+  "policy_id": "12345678901234",
        	            	   "base_parameters": {
        	            	-    "exponent": "12345678901E0042",
        	            	+    "exponent": "12345678901000000000000000000000000000000000000000000",
        	            	     "from_env": "0012345678901234",
        	            	     "from_flag": "0012345678901234",
        	            	-    "interpolated": "id-0012345678901234",
        	            	-    "interpolated_int": "id-0042",
        	            	-    "interpolated_version": "v3.10",
        	            	-    "leading_zero": "0012345678901234",
        	            	-    "leading_zero_int": "0042",
        	            	+    "interpolated": "id-1.2345678901234e+13",
        	            	+    "interpolated_int": "id-42",
        	            	+    "interpolated_version": "v3.1",
        	            	+    "leading_zero": "12345678901234",
        	            	+    "leading_zero_int": "42",
        	            	     "quoted": "0012345678901234",
        	            	-    "target_override": "0012345678901234",
        	            	-    "version": "3.10"
        	            	+    "target_override": "12345678901234",
        	            	+    "version": "3.1"
        	            	   }
        	Test:       	TestAccept/bundle/validate/variables/numeric_defaults/DMS=
        	Messages:   	bundle/validate/variables/numeric_defaults/output.txt vs /tmp/TestAcceptbundlevalidatevariablesnumeric_defaultsDMS=1909189379/002/output.txt

latest (v1.27.0): same output as main (828e0b1)

TestAccept/bundle/validate/variables/numeric_defaults/DMS=true: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"0012345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901E0042\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-0012345678901234\",\n    \"interpolated_int\": \"id-0042\",\n    \"interpolated_version\": \"v3.10\",\n    \"leading_zero\": \"0012345678901234\",\n    \"leading_zero_int\": \"0042\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"0012345678901234\",\n    \"version\": \"3.10\"\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"12345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901000000000000000000000000000000000000000000\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-1.2345678901234e+13\",\n    \"interpolated_int\": \"id-42\",\n    \"interpolated_version\": \"v3.1\",\n    \"leading_zero\": \"12345678901234\",\n    \"leading_zero_int\": \"42\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"12345678901234\",\n    \"version\": \"3.1\"\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -15,15 +15,15 @@
        	            	   "max_concurrent_runs": 10,
        	            	-  "policy_id": "0012345678901234",
        	            	+  "policy_id": "12345678901234",
        	            	   "base_parameters": {
        	            	-    "exponent": "12345678901E0042",
        	            	+    "exponent": "12345678901000000000000000000000000000000000000000000",
        	            	     "from_env": "0012345678901234",
        	            	     "from_flag": "0012345678901234",
        	            	-    "interpolated": "id-0012345678901234",
        	            	-    "interpolated_int": "id-0042",
        	            	-    "interpolated_version": "v3.10",
        	            	-    "leading_zero": "0012345678901234",
        	            	-    "leading_zero_int": "0042",
        	            	+    "interpolated": "id-1.2345678901234e+13",
        	            	+    "interpolated_int": "id-42",
        	            	+    "interpolated_version": "v3.1",
        	            	+    "leading_zero": "12345678901234",
        	            	+    "leading_zero_int": "42",
        	            	     "quoted": "0012345678901234",
        	            	-    "target_override": "0012345678901234",
        	            	-    "version": "3.10"
        	            	+    "target_override": "12345678901234",
        	            	+    "version": "3.1"
        	            	   }
        	Test:       	TestAccept/bundle/validate/variables/numeric_defaults/DMS=true
        	Messages:   	bundle/validate/variables/numeric_defaults/output.txt vs /tmp/TestAcceptbundlevalidatevariablesnumeric_defaultsDMS=true1560581280/002/output.txt
FAIL

latest (v1.27.0):

acceptance_test.go:1388: 
        	Error Trace:	/home/runner/work/cli/cli/libs/testdiff/testdiff.go:22
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1388
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:1129
        	            				/home/runner/work/cli/cli/acceptance/acceptance_test.go:692
        	Error:      	Not equal: 
        	            	expected: "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"0012345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901E0042\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-0012345678901234\",\n    \"interpolated_int\": \"id-0042\",\n    \"interpolated_version\": \"v3.10\",\n    \"leading_zero\": \"0012345678901234\",\n    \"leading_zero_int\": \"0042\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"0012345678901234\",\n    \"version\": \"3.10\"\n  }\n}\n"
        	            	actual  : "\n>>> [CLI] bundle validate -o json --var from_flag=0012345678901234\n{\n  \"variables\": {\n    \"concurrency\": 10,\n    \"exponent\": 1.2345678901E+52,\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"leading_zero\": 12345678901234,\n    \"leading_zero_int\": 42,\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": 12345678901234,\n    \"version\": 3.1\n  },\n  \"max_concurrent_runs\": 10,\n  \"policy_id\": \"12345678901234\",\n  \"base_parameters\": {\n    \"exponent\": \"12345678901000000000000000000000000000000000000000000\",\n    \"from_env\": \"0012345678901234\",\n    \"from_flag\": \"0012345678901234\",\n    \"interpolated\": \"id-1.2345678901234e+13\",\n    \"interpolated_int\": \"id-42\",\n    \"interpolated_version\": \"v3.1\",\n    \"leading_zero\": \"12345678901234\",\n    \"leading_zero_int\": \"42\",\n    \"quoted\": \"0012345678901234\",\n    \"target_override\": \"12345678901234\",\n    \"version\": \"3.1\"\n  }\n}\n"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -15,15 +15,15 @@
        	            	   "max_concurrent_runs": 10,
        	            	-  "policy_id": "0012345678901234",
        	            	+  "policy_id": "12345678901234",
        	            	   "base_parameters": {
        	            	-    "exponent": "12345678901E0042",
        	            	+    "exponent": "12345678901000000000000000000000000000000000000000000",
        	            	     "from_env": "0012345678901234",
        	            	     "from_flag": "0012345678901234",
        	            	-    "interpolated": "id-0012345678901234",
        	            	-    "interpolated_int": "id-0042",
        	            	-    "interpolated_version": "v3.10",
        	            	-    "leading_zero": "0012345678901234",
        	            	-    "leading_zero_int": "0042",
        	            	+    "interpolated": "id-1.2345678901234e+13",
        	            	+    "interpolated_int": "id-42",
        	            	+    "interpolated_version": "v3.1",
        	            	+    "leading_zero": "12345678901234",
        	            	+    "leading_zero_int": "42",
        	            	     "quoted": "0012345678901234",
        	            	-    "target_override": "0012345678901234",
        	            	-    "version": "3.10"
        	            	+    "target_override": "12345678901234",
        	            	+    "version": "3.1"
        	            	   }
        	Test:       	TestAccept/bundle/validate/variables/numeric_defaults/DMS=true
        	Messages:   	bundle/validate/variables/numeric_defaults/output.txt vs /tmp/TestAcceptbundlevalidatevariablesnumeric_defaultsDMS=true330300913/002/output.txt
TestAccept/bundle/validate/yaml_numeric_strings/DMS=: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: Diff:
        --- bundle/validate/yaml_numeric_strings/output.txt
        +++ /tmp/TestAcceptbundlevalidateyaml_numeric_stringsDMS=542112149/002/output.txt
        @@ -1,20 +1,20 @@
         
         >>> [CLI] bundle validate -o json
         {
        -  "job_name": "007",
        +  "job_name": "7",
           "job_tags": {
        -    "big_int": "123456789012345678901234567890",
        +    "big_int": "123456789012345680000000000000",
             "bool_title": "true",
             "date": "2024-01-01",
        -    "exponent": "1e3",
        -    "float_int": "1.0",
        -    "hex": "0x1F",
        -    "inf": ".inf",
        -    "leading_dot": ".5",
        -    "leading_zero": "0042",
        -    "nan": ".NaN",
        -    "octal": "0o17",
        -    "plus_sign": "+12",
        +    "exponent": "1000",
        +    "float_int": "1",
        +    "hex": "31",
        +    "inf": "+Inf",
        +    "leading_dot": "0.5",
        +    "leading_zero": "42",
        +    "nan": "NaN",
        +    "octal": "15",
        +    "plus_sign": "12",
             "q_big_int": "123456789012345678901234567890",
             "q_bool_title": "True",
             "q_date": "2024-01-01",
        @@ -29,38 +26,38 @@
             "q_plus_sign": "+12",
             "q_trailing_zero": "1.10",
             "q_underscore": "1_000",
        -    "trailing_zero": "1.10",
        -    "underscore": "1_000"
        +    "trailing_zero": "1.1",
        +    "underscore": "1000"
           },
           "job_parameters": [
             {
        -      "default": "01",
        +      "default": "1",
               "name": "leading_zero"
             },
             {
        -      "default": "3.10",
        +      "default": "3.1",
               "name": "version"
             }
           ],
        -  "git_commit": "1234e56",
        +  "git_commit": "123400000000000000000000000000000000000000000000000000000000",
           "tasks": [
             {
               "new_cluster": {
                 "custom_tags": {
        -          "cost_center": "0042"
        +          "cost_center": "42"
                 },
        -        "policy_id": "0012345678901234",
        +        "policy_id": "12345678901234",
                 "spark_conf": {
        -          "spark.sql.shuffle.partitions": "0200"
        +          "spark.sql.shuffle.partitions": "200"
                 },
                 "spark_env_vars": {
        -          "PYTHON_VERSION": "3.10"
        +          "PYTHON_VERSION": "3.1"
                 },
        -        "spark_version": "13.30"
        +        "spark_version": "13.3"
               },
               "notebook_task": {
                 "base_parameters": {
        -          "leading_zero": "0042",
        +          "leading_zero": "42",
                   "q_leading_zero": "0042"
                 },
                 "source": "GIT"
        @@ -69,7 +45,7 @@
             },
             {
               "new_cluster": {
        -        "policy_id": "12345678901E0042",
        +        "policy_id": "12345678901000000000000000000000000000000000000000000",
                 "spark_version": "13.3.x-scala2.12"
               },
               "notebook_task": {
        @@ -78,24 +54,24 @@
               "task_key": "cluster_policy_exponent"
             },
             {
        -      "existing_cluster_id": "0123",
        +      "existing_cluster_id": "123",
               "sql_task": {
                 "query": {
        -          "query_id": "1e5"
        +          "query_id": "100000"
                 },
        -        "warehouse_id": "0123456789012345"
        +        "warehouse_id": "123456789012345"
               },
               "task_key": "existing_cluster"
             }
           ],
           "pipeline": {
        -    "catalog": "0001",
        +    "catalog": "1",
             "schema": "2024",
             "configuration": {
        -      "leading_zero": "0042",
        -      "version": "1.10"
        +      "leading_zero": "42",
        +      "version": "1.1"
             },
        -    "policy_id": "0012345678901234"
        +    "policy_id": "12345678901234"
           },
        -  "dashboard_warehouse_id": "0123456789012345"
        +  "dashboard_warehouse_id": "123456789012345"
         }

latest (v1.27.0):

acceptance_test.go:1388: Diff:
        --- bundle/validate/yaml_numeric_strings/output.txt
        +++ /tmp/TestAcceptbundlevalidateyaml_numeric_stringsDMS=3581803934/002/output.txt
        @@ -1,20 +1,20 @@
         
         >>> [CLI] bundle validate -o json
         {
        -  "job_name": "007",
        +  "job_name": "7",
           "job_tags": {
        -    "big_int": "123456789012345678901234567890",
        +    "big_int": "123456789012345680000000000000",
             "bool_title": "true",
             "date": "2024-01-01",
        -    "exponent": "1e3",
        -    "float_int": "1.0",
        -    "hex": "0x1F",
        -    "inf": ".inf",
        -    "leading_dot": ".5",
        -    "leading_zero": "0042",
        -    "nan": ".NaN",
        -    "octal": "0o17",
        -    "plus_sign": "+12",
        +    "exponent": "1000",
        +    "float_int": "1",
        +    "hex": "31",
        +    "inf": "+Inf",
        +    "leading_dot": "0.5",
        +    "leading_zero": "42",
        +    "nan": "NaN",
        +    "octal": "15",
        +    "plus_sign": "12",
             "q_big_int": "123456789012345678901234567890",
             "q_bool_title": "True",
             "q_date": "2024-01-01",
        @@ -29,38 +26,38 @@
             "q_plus_sign": "+12",
             "q_trailing_zero": "1.10",
             "q_underscore": "1_000",
        -    "trailing_zero": "1.10",
        -    "underscore": "1_000"
        +    "trailing_zero": "1.1",
        +    "underscore": "1000"
           },
           "job_parameters": [
             {
        -      "default": "01",
        +      "default": "1",
               "name": "leading_zero"
             },
             {
        -      "default": "3.10",
        +      "default": "3.1",
               "name": "version"
             }
           ],
        -  "git_commit": "1234e56",
        +  "git_commit": "123400000000000000000000000000000000000000000000000000000000",
           "tasks": [
             {
               "new_cluster": {
                 "custom_tags": {
        -          "cost_center": "0042"
        +          "cost_center": "42"
                 },
        -        "policy_id": "0012345678901234",
        +        "policy_id": "12345678901234",
                 "spark_conf": {
        -          "spark.sql.shuffle.partitions": "0200"
        +          "spark.sql.shuffle.partitions": "200"
                 },
                 "spark_env_vars": {
        -          "PYTHON_VERSION": "3.10"
        +          "PYTHON_VERSION": "3.1"
                 },
        -        "spark_version": "13.30"
        +        "spark_version": "13.3"
               },
               "notebook_task": {
                 "base_parameters": {
        -          "leading_zero": "0042",
        +          "leading_zero": "42",
                   "q_leading_zero": "0042"
                 },
                 "source": "GIT"
        @@ -69,7 +45,7 @@
             },
             {
               "new_cluster": {
        -        "policy_id": "12345678901E0042",
        +        "policy_id": "12345678901000000000000000000000000000000000000000000",
                 "spark_version": "13.3.x-scala2.12"
               },
               "notebook_task": {
        @@ -78,24 +54,24 @@
               "task_key": "cluster_policy_exponent"
             },
             {
        -      "existing_cluster_id": "0123",
        +      "existing_cluster_id": "123",
               "sql_task": {
                 "query": {
        -          "query_id": "1e5"
        +          "query_id": "100000"
                 },
        -        "warehouse_id": "0123456789012345"
        +        "warehouse_id": "123456789012345"
               },
               "task_key": "existing_cluster"
             }
           ],
           "pipeline": {
        -    "catalog": "0001",
        +    "catalog": "1",
             "schema": "2024",
             "configuration": {
        -      "leading_zero": "0042",
        -      "version": "1.10"
        +      "leading_zero": "42",
        +      "version": "1.1"
             },
        -    "policy_id": "0012345678901234"
        +    "policy_id": "12345678901234"
           },
        -  "dashboard_warehouse_id": "0123456789012345"
        +  "dashboard_warehouse_id": "123456789012345"
         }
        
FAIL
TestAccept/bundle/validate/yaml_numeric_strings/DMS=true: branch ✅ | main (828e0b1) ❌ | latest (v1.27.0) ❌

main (828e0b1):

acceptance_test.go:1388: Diff:
        --- bundle/validate/yaml_numeric_strings/output.txt
        +++ /tmp/TestAcceptbundlevalidateyaml_numeric_stringsDMS=true1631978410/002/output.txt
        @@ -1,20 +1,20 @@
         
         >>> [CLI] bundle validate -o json
         {
        -  "job_name": "007",
        +  "job_name": "7",
           "job_tags": {
        -    "big_int": "123456789012345678901234567890",
        +    "big_int": "123456789012345680000000000000",
             "bool_title": "true",
             "date": "2024-01-01",
        -    "exponent": "1e3",
        -    "float_int": "1.0",
        -    "hex": "0x1F",
        -    "inf": ".inf",
        -    "leading_dot": ".5",
        -    "leading_zero": "0042",
        -    "nan": ".NaN",
        -    "octal": "0o17",
        -    "plus_sign": "+12",
        +    "exponent": "1000",
        +    "float_int": "1",
        +    "hex": "31",
        +    "inf": "+Inf",
        +    "leading_dot": "0.5",
        +    "leading_zero": "42",
        +    "nan": "NaN",
        +    "octal": "15",
        +    "plus_sign": "12",
             "q_big_int": "123456789012345678901234567890",
             "q_bool_title": "True",
             "q_date": "2024-01-01",
        @@ -29,38 +26,38 @@
             "q_plus_sign": "+12",
             "q_trailing_zero": "1.10",
             "q_underscore": "1_000",
        -    "trailing_zero": "1.10",
        -    "underscore": "1_000"
        +    "trailing_zero": "1.1",
        +    "underscore": "1000"
           },
           "job_parameters": [
             {
        -      "default": "01",
        +      "default": "1",
               "name": "leading_zero"
             },
             {
        -      "default": "3.10",
        +      "default": "3.1",
               "name": "version"
             }
           ],
        -  "git_commit": "1234e56",
        +  "git_commit": "123400000000000000000000000000000000000000000000000000000000",
           "tasks": [
             {
               "new_cluster": {
                 "custom_tags": {
        -          "cost_center": "0042"
        +          "cost_center": "42"
                 },
        -        "policy_id": "0012345678901234",
        +        "policy_id": "12345678901234",
                 "spark_conf": {
        -          "spark.sql.shuffle.partitions": "0200"
        +          "spark.sql.shuffle.partitions": "200"
                 },
                 "spark_env_vars": {
        -          "PYTHON_VERSION": "3.10"
        +          "PYTHON_VERSION": "3.1"
                 },
        -        "spark_version": "13.30"
        +        "spark_version": "13.3"
               },
               "notebook_task": {
                 "base_parameters": {
        -          "leading_zero": "0042",
        +          "leading_zero": "42",
                   "q_leading_zero": "0042"
                 },
                 "source": "GIT"
        @@ -69,7 +45,7 @@
             },
             {
               "new_cluster": {
        -        "policy_id": "12345678901E0042",
        +        "policy_id": "12345678901000000000000000000000000000000000000000000",
                 "spark_version": "13.3.x-scala2.12"
               },
               "notebook_task": {
        @@ -78,24 +54,24 @@
               "task_key": "cluster_policy_exponent"
             },
             {
        -      "existing_cluster_id": "0123",
        +      "existing_cluster_id": "123",
               "sql_task": {
                 "query": {
        -          "query_id": "1e5"
        +          "query_id": "100000"
                 },
        -        "warehouse_id": "0123456789012345"
        +        "warehouse_id": "123456789012345"
               },
               "task_key": "existing_cluster"
             }
           ],
           "pipeline": {
        -    "catalog": "0001",
        +    "catalog": "1",
             "schema": "2024",
             "configuration": {
        -      "leading_zero": "0042",
        -      "version": "1.10"
        +      "leading_zero": "42",
        +      "version": "1.1"
             },
        -    "policy_id": "0012345678901234"
        +    "policy_id": "12345678901234"
           },
        -  "dashboard_warehouse_id": "0123456789012345"
        +  "dashboard_warehouse_id": "123456789012345"
         }

latest (v1.27.0): same output as main (828e0b1)

@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 2157c5b

Run: 44557613390

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 272 21 19:54
💚​ aws-windows-latest-4core-16gb 1 274 19 12:58
💚​ azure linux-2core-8gb 1 271 21 16:23
💚​ azure-windows-latest-4core-16gb 1 273 19 13:20
💚​ gcp linux-2core-8gb 1 272 21 16:51
💚​ gcp-windows-latest-4core-16gb 1 274 19 12:26
Test Name aws linux-2core-8gb aws-windows-latest-4core-16gb azure linux-2core-8gb azure-windows-latest-4core-16gb gcp linux-2core-8gb gcp-windows-latest-4core-16gb
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 46 slowest tests (at least 2 minutes):
duration env testname
6:22 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
5:48 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
5:46 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsDelete
5:44 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
5:22 aws-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
4:47 azure-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsRead
4:47 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsRead
4:21 azure-windows-latest-4core-16gb TestImportDirDoesNotOverwrite
4:18 gcp linux-2core-8gb TestFilerReadWrite/workspace_files_extensions
4:08 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files_extensions
3:57 aws-windows-latest-4core-16gb TestFilerWorkspaceFilesExtensionsReadDir
3:53 azure linux-2core-8gb TestImportDir
3:51 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
3:48 azure-windows-latest-4core-16gb TestAccept
3:20 aws-windows-latest-4core-16gb TestAccept
3:19 gcp-windows-latest-4core-16gb TestAccept
3:19 aws linux-2core-8gb TestFilerRecursiveDelete/workspace_files
3:14 aws linux-2core-8gb TestSyncIncrementalFileSync
3:10 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
3:09 aws linux-2core-8gb TestImportDirDoesNotOverwrite
3:04 gcp-windows-latest-4core-16gb TestExportDir
2:49 gcp linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:48 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsStat
2:42 aws linux-2core-8gb TestSyncFullFileSync
2:41 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir
2:41 aws linux-2core-8gb TestFilerWorkspaceFilesExtensionsDelete
2:31 azure linux-2core-8gb TestImportDirWithOverwriteFlag
2:30 gcp-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:29 azure-windows-latest-4core-16gb TestSyncIncrementalFileSync
2:25 aws-windows-latest-4core-16gb TestFilerReadDir/workspace_files_extensions
2:23 azure linux-2core-8gb TestImportDirDoesNotOverwrite
2:22 aws-windows-latest-4core-16gb TestImportDirWithOverwriteFlag
2:20 aws-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:16 gcp-windows-latest-4core-16gb TestImportDir
2:15 gcp-windows-latest-4core-16gb TestFilerWorkspaceNotebook/scalaNb.scala
2:15 gcp linux-2core-8gb TestImportDirWithOverwriteFlag
2:14 azure-windows-latest-4core-16gb TestFilerRecursiveDelete/workspace_files_extensions
2:13 azure linux-2core-8gb TestFilerWorkspaceNotebook/scalaJupyterNb.ipynb
2:12 gcp linux-2core-8gb TestImportDirDoesNotOverwrite
2:12 azure linux-2core-8gb TestFilerRecursiveDelete/workspace_files
2:11 azure linux-2core-8gb TestAccept
2:08 aws linux-2core-8gb TestExportDir
2:06 aws-windows-latest-4core-16gb TestSyncIncrementalFileSync
2:04 gcp-windows-latest-4core-16gb TestFilerReadWrite/workspace_files_extensions
2:03 azure-windows-latest-4core-16gb TestSyncIncrementalSyncFileToPythonNotebook
2:01 azure linux-2core-8gb TestFilerWorkspaceFilesExtensionsReadDir

denik and others added 3 commits November 19, 2026 15:38
The YAML loader records the original text of scalars it resolves to
int, float or bool. String fields and ${var.x} interpolation use it
instead of formatting the parsed value, so policy_id: 0012345678901234
stays as written instead of becoming 12345678901234.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Bools keep normalizing to true/false so notebook code comparing widget
values with "true" is unaffected. Add tests for toTypedString, value
copies, negatives and aliases; note the deploy-time change in the changelog.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik force-pushed the denik/yaml-keep-source-text branch from b6408f6 to 2157c5b Compare November 19, 2026 15:40
@denik
denik marked this pull request as ready for review November 19, 2026 15:40
@denik
denik requested review from a team as code owners November 19, 2026 15:40

@review-oss-bot review-oss-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me — no issues found.

@Sankalp-Mittal Sankalp-Mittal 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.

[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.

# string-typed fields. Each value is written twice: unquoted and quoted ("q_").
# The quoted value is kept verbatim; the unquoted one is converted from the
# resolved number and may not match the source text.
# Both must keep the source text verbatim.

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.

[AI Generated] nit: bool_title: True on line 36 still comes out as "true" (output.txt:7), so "Both must keep the source text verbatim" does not hold for bools. Can the comment say only numbers (and timestamps) are kept verbatim?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants