Skip to content

acc: record that apps import does not inline app.yml - #7689

Merged
denik merged 5 commits into
mainfrom
denik/acc-apps-import-app-yml
Nov 17, 2026
Merged

denik merged 5 commits into
mainfrom
denik/acc-apps-import-app-yml

Conversation

@denik

@denik denik commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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. #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 #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.

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>
@denik
denik requested review from a team as code owners November 16, 2026 15:56
@github-actions github-actions Bot added the test-only-fix PRs that update failing of flaky tests without changing CLI code. label Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Commit: 1dda6cd5f | Workflow run

Regression test report

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

1 tests: regression=0 unreleased=0 coverage=1 failing=0
test branch main (250c0ef) latest (v1.26.0)
TestAccept/apps/import/app-yml ✅ ✅ ✅

@denik
denik marked this pull request as draft November 16, 2026 16:12
denik and others added 2 commits November 16, 2026 16:13
…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>
Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik marked this pull request as ready for review November 16, 2026 16:59
@denik

denik commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Windows: PR CI skips Windows for acceptance/apps/**, so this test's Windows run is in #7675 (stacked on this, same script): task test (windows, direct) and (windows, directdms) pass on fd29ede (https://github.com/databricks/cli/actions/runs/43909623690).

Follow-ups (out of scope for this PR), from an adversarial review:

  • testmask routes acceptance/apps/** only to the Linux/macOS aitools job, so acceptance-only changes there never run on Windows in PR CI; consider routing them to test too.
  • No acceptance coverage for apps import with app.yaml, --force-import, --cleanup, or an existing output directory.

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

No blocking or major issues found.

Comment thread acceptance/apps/import/app-yml/script Outdated
# valueFrom reference and an unquoted value that YAML reads as a number.
# MSYS_NO_PATHCONV keeps Git Bash on Windows from rewriting the /Workspace path.
APP_PATH="/Workspace/Users/$CURRENT_USER_NAME/myapp"
MSYS_NO_PATHCONV=1 $CLI workspace import-dir src "$APP_PATH" > /dev/null

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: Setup output from import-dir, apps create and apps deploy goes to /dev/null; testing.md asks for LOG.<name> so it shows under go test -v. Can these append to LOG.setup?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in bf226f9: the three setup commands append to LOG.setup.

Comment thread acceptance/apps/import/app-yml/script Outdated
fi

title "App config the bundle deploys (app.yml, if kept, is uploaded with the source)"
cd out

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: cd out / cd .. re-implements the withdir helper. Can this be withdir out trace $CLI bundle validate -o json | jq ..., as in acceptance/bundle/variables/sensitive/script:2?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in bf226f9: withdir out trace $CLI bundle validate -o json | jq ...; output.txt is unchanged.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik enabled auto-merge November 17, 2026 12:23
macOS runners have bash 3.2, which has no &>>.

Co-authored-by: Isaac <no-reply@databricks.com>
@denik
denik added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit f57cd9a Nov 17, 2026
23 checks passed
@denik
denik deleted the denik/acc-apps-import-app-yml branch November 17, 2026 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test-only-fix PRs that update failing of flaky tests without changing CLI code.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants