Skip to content

acc: run bundle/deploy/mlops-stacks locally - #5829

Merged
radakam merged 14 commits into
mainfrom
acc-local-mlops-stacks
Aug 3, 2026
Merged

acc: run bundle/deploy/mlops-stacks locally#5829
radakam merged 14 commits into
mainfrom
acc-local-mlops-stacks

Conversation

@radakam

@radakam radakam commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Changes

Run bundle/deploy/mlops-stacks locally in addition to cloud.

bundle init mlops-stacks clones from GitHub, which local acceptance tests cannot do, so this checks in a pinned copy of the template under acceptance/bundle/deploy/mlops-stacks/template/. Local runs init from that copy; cloud runs still clone, keeping the real git-clone path covered. A test.toml repl rewrites the local path back to bundle init mlops-stacks so both legs share one golden file.

Only the files the template renders for this config are vendored (48 of 105, pinned to 9b387898 in template.REVISION). That set is derived by rendering upstream, so ./task bump-mlops-stacks moves to upstream HEAD and regenerates the golden output without manual reconciliation.

Two notes: upstream's project directory is named with a backtick template invocation, an illegal Go module path that breaks TestFilePath repo-wide, so it is vendored as {{.input_project_name}} (a no-op transform here). .wsignore exempts the vendored tree, which needed include_hidden in validate_whitespace.py to reach its .github/ files.

@radakam
radakam temporarily deployed to test-trigger-is July 3, 2026 14:23 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 3, 2026 14:23 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 3, 2026 14:44 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 3, 2026 14:44 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot

eng-dev-ecosystem-bot commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: fd5863d

Run: 30810012473

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 309 1066 4:35
💚​ aws windows 4 4 311 1064 4:26
💚​ azure linux 4 4 308 1066 4:49
💚​ azure windows 4 4 310 1064 4:06
💚​ gcp linux 1 5 309 1066 4:19
💚​ gcp windows 1 5 311 1064 4:08
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows azure linux azure windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R
Top 3 slowest tests (at least 2 minutes):
duration env testname
3:11 aws windows TestAccept
3:05 gcp windows TestAccept
2:49 azure windows TestAccept

@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 07:47 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 07:47 — with GitHub Actions Inactive
@radakam
radakam force-pushed the acc-local-mlops-stacks branch from cc3d0b3 to 456aec7 Compare July 6, 2026 08:14
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 08:15 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 08:15 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 08:54 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 08:54 — with GitHub Actions Inactive
@radakam
radakam marked this pull request as ready for review July 6, 2026 09:46

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

can we add Taskfile entry that upgrades mlops repo to the latest from github?

Comment thread acceptance/bundle/deploy/mlops-stacks/script
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 10:34 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 10:34 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 10:37 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 10:37 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 11:14 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 11:14 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 11:17 — with GitHub Actions Inactive
@radakam
radakam temporarily deployed to test-trigger-is July 6, 2026 11:17 — with GitHub Actions Inactive
radakam added 8 commits July 30, 2026 12:46
Flip bundle/deploy/mlops-stacks to Local = true so it runs against the
local testserver in addition to cloud.

Local runs cannot git-clone mlops-stacks from GitHub, so vendor a pinned
copy of the template under acceptance/bundle/deploy/mlops-stacks/template/
and use it when CLOUD_ENV is unset. A test.toml Repl normalizes the init
command in output so local and cloud golden files stay unified.
The offline copy vendored for the local run only needs the files required
to render this test's config and satisfy its assertions: the template
machinery (schema, library, run_validations, update_layout), the asserted
root README, databricks.yml, the three included resource YAMLs, and the
four referenced notebooks (BatchInference, Train, ModelValidation,
ModelDeployment).

Drop the remaining 112 files (docs, images, CICD workflows, tests,
feature-store/MLflow-recipe/monitoring variants, binary parquet fixtures).
They are either FS/recipe-gated (never rendered for this config) or synced
but unreferenced, so removing them leaves output.txt byte-identical and the
test passing on both engines. The cloud run is unaffected; it still clones
mlops-stacks from GitHub.
…-stacks template

The vendored MLOps Stacks template contained a directory named using a
backtick-quoted named-template invocation, which is an illegal Go module
file path (breaking TestFilePath and module packaging repo-wide). Rename
it to {{.input_project_name}}; for this test the project name is always
lowercase-alphanumeric, so the alphanumeric_underscore transform is a
no-op and rendered output is unchanged.

Also exempt the vendored template from the whitespace linter via
.wsignore, matching the existing "Developed elsewhere" convention, so
upstream files are kept as-is.
On Windows $TESTDIR expands with backslash separators, so the local
template path was rendered as ...\mlops-stacks/template and the repl
that maps it to the cloud template name "mlops-stacks" did not match,
failing the acceptance test on Windows. Match either separator before
"mlops-stacks".
Add `task update-mlops-stacks-template`, backed by
tools/update_mlops_stacks_template.py, to upgrade the vendored template to
the latest upstream commit. It refreshes only the currently-vendored files
(preserving the earlier pruning), undoes the illegal-Go-module-path
directory rename when mapping vendored paths back to upstream, and records
the new commit in template.REVISION.
Condense the update tool's docstring and the Windows-separator repl comment
to state the reason without the extra prose.
The name already says what it does; keep only the non-obvious "why" comments.
radakam added 2 commits July 30, 2026 12:46
Rename the task and its script for consistency, and resolve every upstream
source before copying any. The previous loop copied as it went and only
reported missing files afterwards, so a restructured upstream left the
vendored template half-refreshed and silently broke the test.

The closing hint also pointed at `./task test-update-templates`, which only
matches TestAccept/bundle/templates and never regenerates this test.
Restore the CLOUD_ENV split so local runs init from the vendored copy while
cloud runs keep exercising `bundle init mlops-stacks` against GitHub.

Both legs share one golden file, so they must render the same bundle. Bump the
vendored copy from 1c87ae24 to upstream HEAD 9b387898, the revision main's
cloud-only fix (#5929) already targets. Upstream restructured in
databricks/mlops-stacks#226: the four notebooks moved out of their notebooks/
subdirs and the resources now reference ../requirements.txt, which joins the
vendored set.

The local run then reproduces main's golden output byte for byte, so output.txt
is unchanged.
@radakam
radakam force-pushed the acc-local-mlops-stacks branch from 33d60c0 to a73d191 Compare July 30, 2026 12:56
The task follows upstream HEAD and rewrites a test input, so it is neither a
test-update-* task (those regenerate golden output from the current inputs)
nor a generate-* task (those must reproduce byte-for-byte in generate-check).
Name it for what it does and move it out from between the test-update-* entries
so neither grouping is implied. Rename the script to match.
Comment thread Taskfile.yml Outdated
Comment thread tools/bump_mlops_stacks.py Outdated
radakam added 2 commits August 3, 2026 08:26
The task rewrote a test input and left updating the golden output to the
person running it. Run the update from the task instead, scoped to this one
test rather than the full test-update.
The vendored set was hand-picked and the bump script read it back off disk, so
it could not tell why a file was vendored and errored out asking for manual
reconciliation whenever upstream moved one. The selection rule lived only in a
commit message.

Derive it instead: render upstream once with this test's config and keep the
template machinery plus every project file that produced output. The bump wipes
and re-copies, so renames and deletions upstream need no intervention. This
vendors 48 files rather than 16; the extra ones are files the template renders
that the cloud leg already gets from its clone. Output is unchanged.

.wsignore covers the vendored tree with a `**` pattern, which glob does not
apply to dot-prefixed names, so the whitespace fixer rewrote upstream content
under .github/ that the bump would restore on every run. Match hidden paths.
@radakam
radakam requested a review from janniklasrose August 3, 2026 10:48
Comment thread acceptance/bundle/deploy/mlops-stacks/script
Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
@radakam
radakam enabled auto-merge August 3, 2026 11:33
@radakam
radakam added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit bd3d777 Aug 3, 2026
30 checks passed
@radakam
radakam deleted the acc-local-mlops-stacks branch August 3, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants