Repository navigation
Conversation
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 1 tests: regression=1 unreleased=0 coverage=0 failing=0
TestAccept/apps/import/app-yml: branch ✅ | main (250c0ef) ❌ | latest (v1.26.0) ❌main (250c0ef): latest (v1.26.0): |
✅ Integration test reportCommit: d7fdb6b
Top 9 slowest tests (at least 2 minutes):
|
andrewnester
left a comment
There was a problem hiding this comment.
cmd/apps/import.go:604: Entries inside the env list still come from a Go map, so key order is random and the new golden fails on macOS and Windows. Can the entries be converted with a stable key order?
|
Fixed in 8673a71: app.yml is now loaded with |
andrewnester
left a comment
There was a problem hiding this comment.
No blocking findings from a full pass; I'll take a manual look at the remaining changes before approving.
The app's app.yml has a plain env value, a valueFrom reference and an unquoted value that YAML reads as a number. Today databricks.yml gets no config and app.yml is kept as is, although the command means to inline it. Co-authored-by: Isaac <no-reply@databricks.com>
8673a71 to
a154835
Compare
|
Not ready for merge — keeping this as a draft. An adversarial review found that once inlining actually runs it loses data, and the rebased test now shows it (
Options: (A) translate |
…test On Windows, Git Bash turns a leading-/ argument into a Windows path, so import-dir and apps deploy got C:/Program Files/Git/Workspace/... and failed. Disable the conversion for those two commands. Co-authored-by: Isaac <no-reply@databricks.com>
a154835 to
c701158
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
c701158 to
fd29ede
Compare
Co-authored-by: Isaac <no-reply@databricks.com>
fd29ede to
7c29561
Compare
macOS runners have bash 3.2, which has no &>>. Co-authored-by: Isaac <no-reply@databricks.com>
Records current behavior: app.yml is not inlined into databricks.yml. Co-authored-by: Isaac <no-reply@databricks.com>
generateAppBundle looked for app.yml/app.yaml before the downloader had written the app source to disk, so the config was never inlined into databricks.yml and app.yml was left in place. Download first, and build the inlined config as an ordered mapping so the output is deterministic. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
app.yml was parsed into map[string]any, so the keys inside env entries (and resources) came out in random order. Load it as a dyn.Value instead; the YAML saver orders keys by source line. Co-authored-by: Isaac <no-reply@databricks.com>
Replace the app-yml-inlined test with the app-yml test from the test-only PR. Its golden diff shows inlining now runs, and its Badness records that valueFrom entries lose their value and unquoted values are re-typed. Co-authored-by: Isaac <no-reply@databricks.com>
7c29561 to
d7fdb6b
Compare
## Changes Add acceptance test `acceptance/apps/import/app-yml`: `apps import` of an app whose `app.yml` has a plain env value, a `valueFrom` reference and an unquoted value YAML reads as a number (`3.10`). It records the generated `databricks.yml`, what is left on disk, and the app `config` the imported bundle deploys. ## Why `apps import` means to inline `app.yml` into `databricks.yml` as the app's `config` and remove it, but it looks for `app.yml` before the source files are downloaded, so it never finds it: `databricks.yml` gets no `config` and `app.yml` stays. The test pins that (with a `Badness` note) so a change to the inlining shows up as a golden diff. databricks#7675 is the attempt to make inlining run, and this test shows what it changes. ## Tests Test-only. Passes 20/20 runs locally. PR CI skips Windows for `acceptance/apps/**`; the script disables Git Bash path conversion for its two `/Workspace` arguments, and databricks#7675 (stacked on this, touches `cmd/apps`) runs the same script on Windows. _Found by analyzing test coverage gaps: the code path was not covered by any test._ This pull request and its description were written by Isaac. --------- Co-authored-by: Isaac <no-reply@databricks.com>
Warning
Not ready for merge. Making inlining run loses data:
valueFromentries from app.yml are copied verbatim, but bundle config expectsvalue_from, so the variable is deployed with no value (only a warning) while app.yml is deleted; unquoted values like3.10are re-typed and deployed as3.1. See theapp-ymlgolden diff and itsBadness. Stacked on #7689 (test-only), which records today's behaviour.Changes
Download the app's source files before inlining
app.yml, and build the inlinedconfigfrom ordered pairs.Why
apps importlooked forapp.ymlin the output directory before the downloader had written anything, soapp.ymlwas never inlined intodatabricks.ymland stayed on disk — since the command was added in #4293. Once inlining ran,command/envorder varied between runs because they were stored in a Go map.Tests
Uses
acceptance/apps/import/app-ymlfrom #7689; the golden diff showsconfigappearing indatabricks.yml,app.ymlbeing removed, and the data loss described above.Found by analyzing test coverage gaps: the code path was not covered by any test.
This pull request and its description were written by Isaac.