Skip to content

packages: expose iac_blueprints and provider_permissions in manifest structs - #1888

Open
jeniawhite wants to merge 2 commits into
elastic:mainfrom
jeniawhite:evgb-supportiacblueprintsproviderpermissions
Open

packages: expose iac_blueprints and provider_permissions in manifest structs#1888
jeniawhite wants to merge 2 commits into
elastic:mainfrom
jeniawhite:evgb-supportiacblueprintsproviderpermissions

Conversation

@jeniawhite

Copy link
Copy Markdown

iac_blueprints and provider_permissionsare being added to the package-spec
(elastic/package-spec#1209, elastic/package-spec#1180). Adding to the registry's Go manifest structs to include
them, so the fields would appear in the JSON API responses.

This adds the necessary Go types (IaCBlueprint, ProviderPermission,
ProviderRole, PermissionEntry) and wires them into all four levels where the
spec allows the fields:

  • Package (package-level)
  • PolicyTemplate (policy-template-level)
  • Input (input-level, datastream.go)
  • DataStream (data-stream-level, datastream.go)

All fields are omitempty so there is no impact on existing packages that don't
declare them.

@jeniawhite
jeniawhite requested a review from a team as a code owner July 25, 2026 01:02
@jeniawhite
jeniawhite marked this pull request as draft July 25, 2026 01:02
@github-actions

Copy link
Copy Markdown

TL;DR

The Buildkite lint job failed because the PR introduces Go formatting drift in packages/datastream.go and packages/package.go; the repository formatting check reports both files as needing updates.

Remediation

  • Run gofmt -w packages/datastream.go packages/package.go and commit the resulting alignment changes.
  • Re-run .buildkite/scripts/lint.sh (or the repository mage check) before pushing.
Investigation details

Root Cause

The new IaCBlueprints and ProviderPermissions fields are not formatted with gofmt in the changed struct declarations. The affected declarations are in packages/datastream.go (the DataStream and Input structs) and packages/package.go (the Package and PolicyTemplate structs).

Evidence

  • Build: https://buildkite.com/elastic/package-registry/builds/2315
  • Job/step: :golangci-lint: Checks formatting / linting
  • Key log excerpt: packages/datastream.go: needs update and packages/package.go: needs update, followed by Error: running "git update-index --refresh" failed with exit code 1.

Verification

No tests were run because the lint job stopped at the formatting check.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

jeniawhite and others added 2 commits August 1, 2026 22:01
When ProviderPermissions (19 chars) was added to the Input and Package
structs, the pre-existing fields in those groups were not re-aligned to
match the new widest column, causing the lint/formatting check to fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jeniawhite
jeniawhite force-pushed the evgb-supportiacblueprintsproviderpermissions branch from 7751c60 to 033ffb5 Compare August 2, 2026 03:02
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

@jeniawhite
jeniawhite marked this pull request as ready for review August 5, 2026 01:32

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

Minor question. LGTM otherwise

Comment thread packages/package.go
Name string `config:"name" json:"name" yaml:"name" validate:"required"`
Description string `config:"description,omitempty" json:"description,omitempty" yaml:"description,omitempty"`
Resources []string `config:"resources,omitempty" json:"resources,omitempty" yaml:"resources,omitempty"`
Conditions map[string]interface{} `config:"conditions,omitempty" json:"conditions,omitempty" yaml:"conditions,omitempty"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How do these Conditions look like? Can we type safe them? Like if spec defines them in a specific format then a typed struct probably is good.

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

hi, thanks for the PR.

Couple comments:

  • please add a changelog entry under [unreleased] and the relevant category
  • as this is a new field optional, please provide some test fixtures with these fields, and regenerate the snapshots so the new fields are tested (testdata/packages)

you can find more here https://github.com/elastic/package-registry#development - let me know if you need further help

@bhapas

bhapas commented Aug 6, 2026

Copy link
Copy Markdown

please add a changelog entry under [unreleased] and the relevant category
as this is a new field optional, please provide some test fixtures with these fields, and regenerate the snapshots so the new fields are tested (testdata/packages)

@teresaromero
Can the CI catch these stuff jsut so things don't get missed up in future?

@teresaromero

Copy link
Copy Markdown
Contributor

@bhapas

Can the CI catch these stuff jsut so things don't get missed up in future?

We do have some workflows in other repos to control this and we are working on improving contribution docs so external contributors have a better experience. For the time being, we catch this things via pr-review. Things get missed up all the time and this is not a bad thing, its expected.

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