packages: expose iac_blueprints and provider_permissions in manifest structs - #1888
packages: expose iac_blueprints and provider_permissions in manifest structs#1888jeniawhite wants to merge 2 commits into
Conversation
TL;DRThe Buildkite lint job failed because the PR introduces Go formatting drift in Remediation
Investigation detailsRoot CauseThe new Evidence
VerificationNo 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. |
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>
7751c60 to
033ffb5
Compare
💚 Build Succeeded
History
|
| 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"` |
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
@teresaromero |
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. |
iac_blueprintsandprovider_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 thespec 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.