Commit 7675d8c
authored
fix: manifest load from local template path (#4785)
## Summary
This branch fixes `databricks apps manifest` so it behaves like a true
manifest viewer for AppKit templates, especially when resolving a local
template via `DATABRICKS_APPKIT_TEMPLATE_PATH` or `--template`.
**Preserve raw manifest output** (`cmd/apps/manifest.go`):
Previously, the command loaded `appkit.plugins.json` into the CLI's
internal manifest struct and then re-serialized it, which dropped fields
not represented in that struct such as `scaffolding`, `rules`, and
richer field metadata. The change now reads `appkit.plugins.json`
directly and writes the raw file contents to stdout, so local templates
and newer manifest schema fields are preserved exactly as authored.
### Supporting infrastructure
- **`cmd/apps/init_test.go`** — Strengthens manifest-related tests by
asserting exact raw output instead of checking for a couple of JSON
substrings.
- **`cmd/apps/init_test.go`** — Adds coverage for the
`DATABRICKS_APPKIT_TEMPLATE_PATH` fallback so `runManifestOnly()` is
verified to resolve and print a local template manifest when no explicit
`--template` is provided.
### Other changes
- Updates the `apps manifest` help text in `cmd/apps/manifest.go` to
clarify that it prints the manifest's raw contents.
- Keeps template resolution behavior aligned with `apps init`; only the
output format of `apps manifest` changed.
Co-authored-by: MarioCadenas <MarioCadenas@users.noreply.github.com>1 parent 7079857 commit 7675d8c
2 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
645 | | - | |
646 | | - | |
| 646 | + | |
647 | 647 | | |
648 | 648 | | |
649 | 649 | | |
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
55 | 54 | | |
56 | 55 | | |
57 | 56 | | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | | - | |
67 | 66 | | |
68 | 67 | | |
69 | 68 | | |
| |||
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
86 | | - | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
0 commit comments