elastic / elastic/elastic-package
Add "blueprint" to `AllowedPackageTypes`
- Dominant language
- Go
- Stars
- 72
- Forks
- 141
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 55
Description
## Title
Add `"blueprint"` to `AllowedPackageTypes`
## Summary
A new `blueprint` package type is being introduced in package-spec (dynamic IaC for integrations, elastic/package-spec#1209 and related PRs). `elastic-package` does not yet recognize it as a valid package type, so every core command fails before doing any real work.
## Root cause
`internal/packages/packages.go:44`:
```go
var AllowedPackageTypes = []string{"input", "integration", "content"}
```
`isPackageManifest()` uses this list to decide whether a directory is a valid package root. Because `"blueprint"` is absent, `lint`, `build`, `format`, and `check` all fail with `package root not found` for any package of this type. Confirmed locally.
## Impact
- Blocks any local development on `blueprint` packages using elastic-package tooling.
- **Hard prerequisite for the integrations repo publish pipeline.** `mage listPackages` → `citools.IsValid()` only checks that name/type/version are non-empty, so a `blueprint` package will be discovered and pass that check — then fail downstream at `elastic-package check` / `build --zip` with `package root not found`. This fix must land before any `blueprint` package is merged into the integrations repo.
- The `blueprint` type currently has **zero semantic validation** — everything in `code/go/internal/validator/spec.go` is scoped to `integration` and `input` types, so none of it runs for `blueprint`. Worth a separate decision on whether basic checks (changelog link, version integrity) should be wired up before GA, but out of scope for this issue.
## Proposed fix
- Add `"blueprint"` to `AllowedPackageTypes` in `internal/packages/packages.go`.
- Update `cmd/create_package.go`: add `blueprint` to the interactive wizard menu and to `--type` flag validation.
## Suggested acceptance criteria
- [ ] `"blueprint"` added to `AllowedPackageTypes`
- [ ] `elastic-package create package --type blueprint` works via wizard and flag
- [ ] `lint`, `build`, `format`, `check` succeed against a minimal `blueprint` package fixture
- [ ] (Optional/follow-up) Decide whether baseline semantic validation should run for `blueprint`
## References
- package-spec PR #1209 (dynamic IaC for integrations) and related review feedback
- Blocks: integrations repo publish pipeline support for `blueprint` packages
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.