Skip to content

chore(deps): update kibana-openapi-spec digest to 5c49938#2031

Merged
elastic-renovate-prod[bot] merged 5 commits intomainfrom
renovate/kibana-openapi-spec-digest
Mar 27, 2026
Merged

chore(deps): update kibana-openapi-spec digest to 5c49938#2031
elastic-renovate-prod[bot] merged 5 commits intomainfrom
renovate/kibana-openapi-spec-digest

Conversation

@elastic-renovate-prod
Copy link
Copy Markdown
Contributor

@elastic-renovate-prod elastic-renovate-prod Bot commented Mar 26, 2026

This PR contains the following updates:

Package Update Change
kibana-openapi-spec digest 574644c -> 5c49938

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

Note

Update Fleet output models to use new kbapi enum types from digest 5c49938

  • Updates generated Kibana OpenAPI spec to digest 5c49938, which renames enum types for Elasticsearch, Kafka, and Logstash outputs.
  • Refactors SSL handling in models_ssl.go to use a new outputSSLAPIModel intermediary struct with per-output-type conversion methods, replacing direct kbapi.NewOutputSsl/kbapi.UpdateOutputSsl usage.
  • Fixes nil pointer dereference in SSL field extraction for Elasticsearch, Kafka, and Logstash fromAPI methods — absent SSL now yields a null/empty Terraform object value.
  • Updates Kafka field serialization in models_kafka.go to use new typed wrapper constructors for ConnectionType, Username, Password, and CompressionLevel, with diagnostic collection on conversion errors.
  • Adds agent_features_disable_policy_change_acks_enabled field to the advanced settings API payload struct in models_advanced_settings.go.

Changes since #2031 opened

  • Adjusted horizontal spacing and alignment of struct field declarations [29e24aa]

Macroscope summarized 023c164.

@elastic-renovate-prod elastic-renovate-prod Bot enabled auto-merge (squash) March 26, 2026 15:35
@elastic-renovate-prod
Copy link
Copy Markdown
Contributor Author

elastic-renovate-prod Bot commented Mar 26, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: generated/kbapi/Makefile
Command failed: make renovate-post-upgrade
go: downloading go1.26.1 (linux/arm64)
2026/03/26 23:27:29 "schemas.output_elasticsearch.properties.shipper" not found
panic: "schemas.output_elasticsearch.properties.shipper" not found

goroutine 1 [running]:
log.Panicf({0x158655?, 0x2f?}, {0x3042f8099858?, 0x12f960?, 0x3042f6f4d070?})
	/home/ubuntu/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.26.1.linux-arm64/src/log/log.go:460 +0x74
main.Map.MustGet(0x3042f77eac90?, {0x3042f803eff0, 0x2f})
	/tmp/renovate/repos/github/elastic/terraform-provider-elasticstack/generated/kbapi/transform_schema.go:227 +0x68
main.Map.CreateRef(0x3042f77eac90, 0x3042f40da0e0, {0x3042f8062f50, 0xe}, {0x3042f803eff0, 0x2f})
	/tmp/renovate/repos/github/elastic/terraform-provider-elasticstack/generated/kbapi/transform_schema.go:341 +0x44
main.transformFleetPaths(0x3042f40da0e0)
	/tmp/renovate/repos/github/elastic/terraform-provider-elasticstack/generated/kbapi/transform_schema.go:1144 +0xbc8
main.main()
	/tmp/renovate/repos/github/elastic/terraform-provider-elasticstack/generated/kbapi/transform_schema.go:56 +0x314
exit status 2
make[1]: *** [Makefile:20: transform] Error 1
make: *** [Makefile:177: renovate-post-upgrade] Error 2

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 26, 2026

⚠️ Terraform acceptance tests failed for snapshot stack version 9.4.0-SNAPSHOT.
This failure is non-blocking because snapshot builds are allowed to fail.

Run: https://github.com/elastic/terraform-provider-elasticstack/actions/runs/23629126400

@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch from 5f52058 to 992924a Compare March 26, 2026 15:58
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to 8f9bd51 chore(deps): update kibana-openapi-spec digest to 0663de0 Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch from 992924a to c4adf87 Compare March 26, 2026 16:00
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to 0663de0 chore(deps): update kibana-openapi-spec digest to 8775e42 Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch 4 times, most recently from 4ae0d93 to 78d102e Compare March 26, 2026 16:09
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to 8775e42 chore(deps): update kibana-openapi-spec digest to 5ab9e1e Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch 4 times, most recently from 6dacf63 to 9d6248b Compare March 26, 2026 16:14
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to 5ab9e1e chore(deps): update kibana-openapi-spec digest to e14f410 Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch from 9d6248b to ac66e6d Compare March 26, 2026 23:19
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to e14f410 chore(deps): update kibana-openapi-spec digest to 85f4c56 Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch from ac66e6d to 1779612 Compare March 26, 2026 23:27
@elastic-renovate-prod elastic-renovate-prod Bot changed the title chore(deps): update kibana-openapi-spec digest to 85f4c56 chore(deps): update kibana-openapi-spec digest to 5c49938 Mar 26, 2026
@elastic-renovate-prod elastic-renovate-prod Bot force-pushed the renovate/kibana-openapi-spec-digest branch from 1779612 to cb77618 Compare March 26, 2026 23:27
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.

🟢 Low

When model.Kafka is unknown (not null), the code enters the if block at line 499 and calls typeutils.ObjectTypeAs, which returns nil for unknown values. Line 501 then dereferences nil (*kafkaObj), causing a panic. The check should use typeutils.IsKnown(model.Kafka) instead of !model.Kafka.IsNull().

🚀 Reply "fix it for me" or copy this AI Prompt for your agent:
In file internal/fleet/output/models_kafka.go around line 499:

When `model.Kafka` is unknown (not null), the code enters the `if` block at line 499 and calls `typeutils.ObjectTypeAs`, which returns `nil` for unknown values. Line 501 then dereferences `nil` (`*kafkaObj`), causing a panic. The check should use `typeutils.IsKnown(model.Kafka)` instead of `!model.Kafka.IsNull()`.

Evidence trail:
- internal/fleet/output/models_kafka.go lines 499-501 (REVIEWED_COMMIT): shows `if !model.Kafka.IsNull()` check followed by dereference of `*kafkaObj`
- internal/utils/typeutils/tfsdk.go lines 282-290: `ObjectTypeAs` returns `nil` when `!IsKnown(value)` (i.e., when value is unknown)
- internal/utils/typeutils/schema.go lines 33-35: `IsKnown` returns `!value.IsNull() && !value.IsUnknown()`, confirming unknown values are not considered known

Comment thread internal/fleet/agentpolicy/models_advanced_settings.go
@elastic-renovate-prod
Copy link
Copy Markdown
Contributor Author

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@elastic-renovate-prod elastic-renovate-prod Bot merged commit e38587d into main Mar 27, 2026
39 checks passed
@elastic-renovate-prod elastic-renovate-prod Bot deleted the renovate/kibana-openapi-spec-digest branch March 27, 2026 03:19
TinaHeiligers added a commit to elastic/kibana that referenced this pull request Apr 14, 2026
…wrappers (#260842)

## Summary

Follow up to [#258986](#258986) to
fix duplicated SSL/shipper struct definitions and `anyOf` catchall union
wrappers for Kafka conditional fields.

This PR:
- extracts shared SSL and shipper objects into standalone schemas with
`meta:{id}`
- output variants reference a single `$ref` component
- replaces the four `schema.conditional()` Kafka fields
(`compression_level`, `connection_type`, `username`, `password`) with
`schema.maybe()`
- produces clean OAS output
- moves cross-field validation to the service layer in `output.ts`,
matching the existing pattern for `compression_level` clearing
- allowlists breaking changes in OAS api contracts check

The net result is 27 fewer generated Go types and ~1,500 fewer lines in
the bundled OAS. On the provider side, this eliminates the ~450 lines of
adapter code added in
[PR#2031](elastic/terraform-provider-elasticstack#2031).

Relates to #228077

#### Breaking changes

The contract checker flags 352 changes across 3 fleet output endpoints.
None of these change runtime API behavior — they're all OAS
representation improvements that only affect code generators consuming
the spec.

- **SSL/shipper `object` → `$ref`**: oasdiff can't resolve through
`$ref`, so it reports type changes and "removed" sub-properties. The
actual data shapes are identical.
- **Kafka fields became optional**: `schema.conditional()` →
`schema.maybe()` is strictly more permissive. Service layer now enforces
the same cross-field constraints.
- **Kafka field types narrowed**: the old `schema.conditional()`
produced `anyOf: [array, boolean, number, object, string]` catchalls.
Now they're the correct specific types (`number`, `string`, etc.).

<details>
<summary>How to test this</summary>

1. Run the output model and service tests:
   ```
node scripts/jest
x-pack/platform/plugins/shared/fleet/server/types/models/output.test.ts
node scripts/jest
x-pack/platform/plugins/shared/fleet/server/services/output.test.ts
   ```
   All 7 model tests and 99 service tests should pass.

2. Run the contract checker for both distributions:
   ```
   node scripts/check_api_contracts.js --distribution stack
   node scripts/check_api_contracts.js --distribution serverless
   ```
   Both should report all breaking changes allowlisted.

3. Verify OAS snapshot changes by inspecting the diff on
`oas_docs/output/kibana.yaml`:
- `output_ssl` and `output_shipper` each appear once as component
definitions, referenced via `$ref` from all output variants
- Kafka `compression_level` is `type: number`, `connection_type` is
`type: string` with enum, `username` and `password` are `nullable: true,
type: string` — no `anyOf` catchalls

</details>

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

| Risk | Severity | Likelihood | Mitigation |
|---|---|---|---|
| Loosened Kafka field validation at schema level | Low | Low | Service
layer enforces the same cross-field rules. Existing service tests
(99/99) pass. |
| Shared SSL/shipper `$ref` changes OAS structure | Low | None observed
| Data shape is identical. TF provider codegen produces cleaner types
with no regressions. |

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
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.

1 participant