Repository navigation
Conversation
Variable defaults like 1.0, 1e3 or 0012345678901234 are floats in the config; they reach Python as JSON integers and come back as ints, which the merge reports as an unexpected change. Output records the error. Co-authored-by: Isaac <no-reply@databricks.com>
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 4 tests: regression=0 unreleased=0 coverage=4 failing=0
|
✅ Integration test reportCommit: c872249
Top 3 slowest tests (at least 2 minutes):
|
There was a problem hiding this comment.
Automated review at c872249. Each finding was verified against the code.
No blocking issues found. 1 non-blocking comment(s) below.
This PR adds a new acceptance test (bundle/python/numeric-variable-default) that documents the current broken behavior when whole-number float variable defaults are round-tripped through the Python mutator. It covers several numeric variants (leading zeros, whole floats, exponents, complex values, and huge numbers) and records the errors in the golden file. No code changes are included. The only concrete issue is a rule violation around test artifact cleanup.
| @@ -0,0 +1,4 @@ | |||
| # The column depends on the size of the Python output, which includes paths. | |||
| [[Repls]] | |||
There was a problem hiding this comment.
[nice to have] The script removes .databricks, __pycache__, and tmp.json with rm -fr (script line 7) instead of declaring them in Ignore. The testing rules require Ignore for test artifacts. Add Ignore = [".databricks", "__pycache__", "tmp.json"] here and drop the rm -fr line from script.
| @@ -0,0 +1,4 @@ | |||
| # The column depends on the size of the Python output, which includes paths. | |||
| [[Repls]] | |||
| Old = '__generated_by_python__\.yml:\d+:\d+' | |||
There was a problem hiding this comment.
This test fails on Windows because the path separator before __generated_by_python__.yml is a backslash there. Could the replacement cover the separator too?
Sankalp-Mittal
left a comment
There was a problem hiding this comment.
[AI Generated] Review by review-factory (Claude Opus 5.5 + Claude Fable 5.2, cross-verified). Only points the reviewers agreed on are posted.
| @@ -0,0 +1,4 @@ | |||
| # The column depends on the size of the Python output, which includes paths. | |||
| [[Repls]] | |||
There was a problem hiding this comment.
[AI Generated] Major: On Windows loadOutput builds this path with filepath.Join, so the huge error reads [TEST_TMP_DIR]\__generated_by_python__.yml and won't match the golden. Can you add the '\\' → / Repl from bundle/validate/yaml_anchors/test.toml?
| @@ -0,0 +1,4 @@ | |||
| # The column depends on the size of the Python output, which includes paths. | |||
There was a problem hiding this comment.
[AI Generated] The golden records an internal error as the expected output, but nothing marks it as a bug. Add a Badness = "..." line above [[Repls]], as validate/yaml_duplicate_keys/shadowed_invalid_subtree/test.toml does?
Changes
New acceptance test
bundle/python/numeric-variable-default. Output records current behavior, no code changes.Why
With a
python:section, a variable default that YAML reads as a whole-number float (1.0,1e3,0012345678901234, also inside complex variables) fails every bundle command:The CLI sends the float to Python as a JSON integer, Python returns an int, and the merge reports the kind change. The
hugecase (a whole float beyond int64) fails differently: Python's output can't be parsed back.Tests
Only a new test.
This pull request and its description were written by Isaac.