Skip to content

acc: record bundle generate pipeline not creating an empty root_path dir - #8287

Open
denik wants to merge 1 commit into
mainfrom
acc-record-generate-pipeline-empty-root-path
Open

denik wants to merge 1 commit into
mainfrom
acc-record-generate-pipeline-empty-root-path

Conversation

@denik

@denik denik commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Changes

Adds acceptance/bundle/generate/pipeline_empty_root_path: a pipeline whose root_path is an empty workspace folder. bundle generate pipeline writes root_path: src/pl into the config but creates no src/pl directory, because FlushToDisk only creates parent directories of downloaded files. The generated bundle then fails bundle validate with stat src/pl: no such file or directory. The test records this behavior with a Badness note; the fix is the stacked PR (#8289).

This is the pipeline twin of the app bug fixed in #8244, where it was raised as a follow-up in review.

Why

A new small test directory instead of extending lakeflow_pipelines: that test mocks workspace/list to always return files, so it cannot model an empty folder. The new test runs against the testserver's real workspace and pipelines handlers, takes about 0.1s per variant, and has the usual DMS matrix from acceptance/bundle/generate.

This PR was created by analyzing coverage gaps.

Coverage: http://go/cli/dashboard/coverage/file/cmd/bundle/generate/pipeline.go (NewGeneratePipelineCommand, the RootPath != "" branch around lines 91-96).

Tests

The new test passes locally with both DMS variants. It records the current wrong behavior.

Gaps and risks

  • Only local (testserver). The empty-folder case does not depend on backend behavior beyond workspace list returning no objects.
  • The Windows error text gets a Repl, copied from app_not_yet_deployed.
  • Risk: low (test-only).

🤖 AI agent (claude-opus-5-5, isaac_claude)

This pull request and its description were written by Isaac.

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions github-actions Bot added DABs DABs related issues test-only-fix PRs that update failing of flaky tests without changing CLI code. labels Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Regression test report ✅

Commit: 8925d2438 | Workflow run

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

2 tests: regression=0 unreleased=0 coverage=2 failing=0
test branch main (21589ba) latest (v1.28.0)
TestAccept/bundle/generate/pipeline_empty_root_path/DMS= ✅ ✅ ✅
TestAccept/bundle/generate/pipeline_empty_root_path/DMS=true ✅ ✅ ✅
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

✅ Integration test report

Commit: 8925d24

Run: 46845970922

Env 💚​RECOVERED ✅​pass 🙈​skip Time
💚​ aws linux-2core-8gb 1 60 7 1:34
💚​ aws-windows-latest-4core-16gb 1 60 7 3:13
💚​ azure linux-2core-8gb 1 60 7 1:36
💚​ azure-windows-latest-4core-16gb 1 60 7 3:09
💚​ gcp linux-2core-8gb 1 60 7 1:35
💚​ gcp-windows-latest-4core-16gb 1 60 7 3:13
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 3 slowest tests (at least 2 minutes):
duration env testname
3:12 aws-windows-latest-4core-16gb TestAccept
3:12 gcp-windows-latest-4core-16gb TestAccept
3:08 azure-windows-latest-4core-16gb TestAccept
@denik
denik marked this pull request as ready for review December 2, 2026 09:25
@denik
denik requested review from a team as code owners December 2, 2026 09:25

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

Automated review at 8925d24. Each finding was verified against the code.

No blocking issues found. 1 non-blocking comment(s) below.

This PR adds the pipeline_empty_root_path acceptance test. It records, under a Badness note, that bundle generate pipeline writes root_path: src/pl without creating the directory, so bundle validate then fails. The test is small and the recorded output matches the current behavior on Linux and macOS. The one thing to check is the Windows Repls entry: the description says it was copied from app_not_yet_deployed, but no test.toml exists there, and the op name it matches may not be what current Go reports.

Badness = "For a pipeline whose root_path is an empty workspace folder, generate writes root_path: src/pl but does not create src/pl, so the generated bundle fails validate with 'stat src/pl: no such file or directory'. The generated config should validate."

# Windows reports the missing directory with a different error.
[[Repls]]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[nice to have] The description says this Repl was copied from app_not_yet_deployed, but that test has only script and output.txt, so nothing in the repo backs this exact text. The error comes from translateDirectoryPath calling os.DirFS(...).Stat. That rewrites only the path and keeps the op name from Go's Windows stat. For a missing path, current Go falls through from GetFileAttributesEx to CreateFile and reports CreateFile src/pl: .... If it does, this pattern never matches and the Windows run differs from the golden. Did the Windows task test cell run this test? If not, could you loosen the pattern to something like (GetFileAttributesEx|CreateFile) src/pl: The system cannot find the (path|file) specified\.?

@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 Sonnet 5.5 + Claude Opus 5.5 + Claude Opus 5.5, cross-verified). Only points the reviewers agreed on are posted.

No issues found.

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 factory-generated test-only-fix PRs that update failing of flaky tests without changing CLI code.

4 participants