Skip to content

Allow blueprint type packages - #3828

Open
bhapas wants to merge 1 commit into
elastic:mainfrom
bhapas:blueprint_packages
Open

Allow blueprint type packages#3828
bhapas wants to merge 1 commit into
elastic:mainfrom
bhapas:blueprint_packages

Conversation

@bhapas

@bhapas bhapas commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add "blueprint" to AllowedPackageTypes so package-root detection recognizes blueprint packages. This unblocks format, lint, build, and check from failing early with package root not found.
  • Teach elastic-package create package to scaffold blueprint packages (wizard + --type blueprint): sample IaC under blueprints/, and omit img/, _dev/, categories, icons, and screenshots to match the upcoming package-spec layout.
  • Treat blueprint like other non-data-stream package types in PackageHasDataStreams.
  • Add unit/archetype coverage and a minimal fixture under internal/packages/testdata/blueprint.

Closes #3827

Relates to elastic/package-spec#1209 (blueprint package type / dynamic IaC).

Context

A new blueprint package type is being introduced in package-spec for canonical IaC base templates. Without recognizing that type in AllowedPackageTypes, every core command fails before doing real work. This is also a prerequisite for the integrations repo publish pipeline once blueprint packages start landing there.

Test plan

  • go test ./internal/packages/ ./internal/packages/archetype/ ./cmd/ -run 'TestAllowedPackageTypes|TestFindPackageRoot|TestPackage|TestCreatePackage'
  • elastic-package create package --type blueprint --name <tmp> creates a valid-looking package root (manifest type blueprint, blueprints/ present, no img//_dev)
  • elastic-package format -C internal/packages/testdata/blueprint succeeds
  • make build format lint licenser gomod (with CGO_ENABLED=0 for make update if needed in local env)
  • Confirm lint / build / check succeed against the fixture after bumping to a package-spec release that includes the blueprint type (currently blocked on package-spec#1209; verified locally against that PR tip via a temporary replace)

Follow-ups

  • Bump github.com/elastic/package-spec/v3 once the blueprint type ships, then re-run lint/build/check on the fixture (and optionally move/add a package under test/packages/ for CI coverage).
  • Decide whether baseline semantic validation (changelog link, version integrity, etc.) should be wired for blueprint before GA.

@bhapas
bhapas requested a review from a team as a code owner August 10, 2026 13:37
@bhapas
bhapas force-pushed the blueprint_packages branch from e32a300 to 8cb4ad3 Compare August 10, 2026 13:40
@@ -0,0 +1,16 @@
format_version: 3.6.6

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.

Probably 3.7.0

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.

This should be 3.7.0 or the version the spec contains the support of new type.

license: "Elastic-2.0"
conditions:
kibana:
version: "^8.0.0"

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.

Probably 9.6.0

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.

this was one of my feedback doubts; if blueprints are not used by fleet/kibana; does this require a version condition?

@bhapas bhapas self-assigned this Aug 10, 2026
@bhapas bhapas added the enhancement New feature or request label Aug 10, 2026

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

I would like to have a clear understanding of the new package from the spec side before moving forward on the elastic-package elastic/package-spec#1209

@@ -0,0 +1,16 @@
format_version: 3.6.6

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.

This should be 3.7.0 or the version the spec contains the support of new type.

license: "Elastic-2.0"
conditions:
kibana:
version: "^8.0.0"

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.

this was one of my feedback doubts; if blueprints are not used by fleet/kibana; does this require a version condition?

Comment thread pr-description.md

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.

please uncommit this file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "blueprint" to AllowedPackageTypes

2 participants