Skip to content

Prepare release 3.6.3#1168

Open
jsoriano wants to merge 10 commits into
elastic:mainfrom
jsoriano:prepare-release-3.6.3
Open

Prepare release 3.6.3#1168
jsoriano wants to merge 10 commits into
elastic:mainfrom
jsoriano:prepare-release-3.6.3

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented May 12, 2026

What does this PR do?

Prepares the release of package-spec 3.6.3.

Changes in this release:

  • Enhancement: Add optional release field to agentless deployment mode to explicitly declare its release stage. (#1130)

Why is it important?

Cuts the 3.6.3 patch release so that packages can use the new release field in agentless deployment mode.

Checklist

Related issues

Made with Cursor

Summary by CodeRabbit

  • Chores

    • Bumped compliance spec to 3.6.3 and updated compliance test generation.
    • Restored changelog structure for version 3.6.3 and removed stale pending markers.
  • New Features

    • Added a minimal OpenTelemetry test integration with logs and metrics streams and package manifest.
  • Documentation

    • New README for the OpenTelemetry test package and clarified manifest comments.
  • Tests

    • Enabled an OTel integration scenario and added related test fixtures.

Review Change Stack

jsoriano and others added 2 commits May 12, 2026 13:17
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@jsoriano jsoriano requested a review from a team as a code owner May 12, 2026 11:18
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

📝 Walkthrough

Walkthrough

Adds a minimal OpenTelemetry test package (manifests, streams, fields, README, changelog), enables a compliance scenario using it, centralizes policy-creation helpers with input-effective-name support, bumps spec to 3.6.3 in changelog and Buildkite, and inserts a release workflow step to review pending TODOs.

Changes

OTel compliance package and feature test

Layer / File(s) Summary
Package manifest, changelog, README
test/packages/good_integration_otel/manifest.yml, test/packages/good_integration_otel/changelog.yml, test/packages/good_integration_otel/docs/README.md, test/packages/good_v3/manifest.yml
Adds the new good_integration_otel package manifest, a package changelog entry, README, and inserts an explanatory comment in good_v3 manifest.
OTel data streams and fields
test/packages/good_integration_otel/data_stream/.../agent/stream/stream.yml.hbs, .../fields/base-fields.yml, .../manifest.yml
Adds OTLP HTTP receivers and pipelines for otel_logs and otel_metrics, and base field mappings and stream manifests for both data streams.
Compliance scenarios, validator, and policy helpers
compliance/features/basic.feature, code/go/pkg/validator/validator_test.go, compliance/compliance_test.go, compliance/kibana.go
Enables an active OTel compliance scenario using good_integration_otel, marks the package fixture valid in validator tests, centralizes agent-policy-id creation, adds step supporting inputEffectiveName, and updates Kibana policy creation to use input-effective-name and dataset handling.

Spec Version 3.6.3 Release Update

Layer / File(s) Summary
Changelog insertion and cleanup
spec/changelog.yml
Inserts missing top-level version: 3.6.3 block and removes a single pending comment line.
Buildkite compliance test matrix update
.buildkite/pipeline.trigger.compliance.tests.sh
Updates the compliance test matrix to run spec 3.6.3, adds 9.5.0-SNAPSHOT entry, and aligns 9.4.0 entry to 3.6.3.
Release workflow: review pending TODOs
.cursor/skills/package-spec-release/references/workflow.md
Adds a "5. Review pending TODOs" step that scans changelogs and features for pending markers, renumbers subsequent sections, and adds commit guidance for resolving pending TODOs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 A tiny package hops on stage,
Streams and fields take up the page,
Helpers stitch the policy name,
Spec bumped so tests play the same,
🎉 A rabbit cheers the release cage!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 22.22% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Prepare release 3.6.3' directly describes the main objective of the pull request, which is preparing a release for version 3.6.3 as evidenced by the spec/changelog.yml changes, version bump in the Buildkite pipeline, and compliance test updates.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

jsoriano and others added 3 commits May 12, 2026 13:21
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
mrodm
mrodm previously approved these changes May 12, 2026
Copy link
Copy Markdown
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Copy Markdown
Contributor

@teresaromero teresaromero left a comment

Choose a reason for hiding this comment

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

I think we need to fix good_v3 agentless deployment modes as its the shared package for the compliance tests. From claudes investigation:

Single root cause (shared by both jobs)

  compliance_test.go runs 27 scenarios; 26 pass, 1 fails — the same one in both stack versions:

  Scenario: Integration package with OTel input can be installed   # features/basic.feature:39
    And a policy is created with "good_v3" package, "1.1.0" version,
        "otel" template, "otel_logs" input, "otelcol" input type and dataset ""
    Error: failed to create package policy: request failed with status 400, body:
      {"statusCode":400,"error":"Bad Request",
       "message":"Input aws/s3 in good_v3 is not allowed for deployment mode 'default'"}

  Why this is happening

  This scenario was un-skipped on this branch in 709e41a — "Enable named inputs compliance test now that blockers are merged" (the named-inputs
  blockers were package-spec#1135 and kibana#262138).

  The test creates a policy for the otel policy template in good_v3 (test/packages/good_v3/manifest.yml:160). The package also defines an
  apache-agentless template (line 116) whose aws/s3 input is restricted to deployment_modes: ['agentless'] (line 149-152). Kibana 9.4.0 and
  9.5.0-SNAPSHOT are rejecting the request because they validate the package's aws/s3 input against the policy's deployment mode (default) — even
   though that input belongs to a different policy template that the test isn't using.

  So the "blockers merged" assumption in 709e41a doesn't hold for these stack versions: either the corresponding Kibana fix hasn't actually
  landed in 9.4.0 / today's 9.5.0-SNAPSHOT, or it only handles named inputs but not the cross-template deployment-mode check that the existing
  fixture exercises.

…scenario

good_v3 cannot be used for this scenario because it has a secondary policy
template (apache-agentless) with an input annotated as deployment_modes:
['agentless']. Kibana's simplified package-policy API validates all package
inputs regardless of the targeted template, causing a spurious 400 when
creating a non-agentless policy for the otel template.

The new compliance-only package is a minimal integration with a single otel
policy template and an otel_logs data stream, avoiding the cross-template
validation issue.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented May 12, 2026

good_v3 triggers a rare error condition in Fleet. It tries to validate all policy templates when creating a policy, even the ones that won't be used. This makes it impossible to have pure agentless policy templates in the same package where non-agentless templates are also available, as this can lead to contradictory situations.

Issue created about this: elastic/kibana#268930

I am leaving good_v3 as is, and adding a new simpler OTel integration package to be used in the compliance tests.

@jsoriano jsoriano requested review from mrodm and teresaromero May 12, 2026 15:03
title: OTel logs
description: Collect logs via OTel receiver
inputs:
- type: otelcol
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There should be two otelcol inputs here, to actually check resolution of ambiguous names, adding it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ah no, this cannot work yet, till compliance tests build packages with an elastic-package with elastic/elastic-package#3480.

I will add the second input after elastic-package is released and used here.

jsoriano and others added 3 commits May 12, 2026 17:40
…ance test

Add a second named otelcol input (otel_metrics) to the good_integration_otel
package so it has two inputs of the same type, exercising the qualified input
names feature from package-spec#1135 / kibana#262138.

Add a new compliance step variant that takes an explicit input effective name
(Fleet's term: name ?? type) to build the correct simplified policy inputs key
for named inputs.

The index template .otel suffix assertion is kept but skipped pending a Kibana
fix for named otelcol inputs not getting the suffix (kibana#268930).

Co-authored-by: Cursor <cursoragent@cursor.com>
Remove createPolicyForPackage (duplicated orchestration) in favour of
createPolicyForPackageInputAndDataset with empty input parameters.

Extract withAgentPolicyID helper to remove the repeated
NewKibanaClient/call/context.WithValue skeleton from the three step handlers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@compliance/kibana.go`:
- Around line 268-269: The code builds policyInputName using inputEffectiveName
without ensuring it's non-empty; update the guard that checks templateName,
inputName, and inputType to also verify inputEffectiveName != "" (or add an
explicit early-return/skip when inputEffectiveName is empty) before computing
policyInputName so you never produce "templateName-"; adjust any downstream
logic to handle the new early-return/skip if applicable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: d75c4d3f-68fb-42a1-bb6a-3e529cf7bc22

📥 Commits

Reviewing files that changed from the base of the PR and between 2ab2f13 and 671a223.

⛔ Files ignored due to path filters (1)
  • test/packages/good_integration_otel/img/sample-logo.svg is excluded by !**/*.svg
📒 Files selected for processing (17)
  • .buildkite/pipeline.trigger.compliance.tests.sh
  • .cursor/skills/package-spec-release/references/workflow.md
  • code/go/pkg/validator/validator_test.go
  • compliance/compliance_test.go
  • compliance/features/basic.feature
  • compliance/kibana.go
  • spec/changelog.yml
  • test/packages/good_integration_otel/changelog.yml
  • test/packages/good_integration_otel/data_stream/otel_logs/agent/stream/stream.yml.hbs
  • test/packages/good_integration_otel/data_stream/otel_logs/fields/base-fields.yml
  • test/packages/good_integration_otel/data_stream/otel_logs/manifest.yml
  • test/packages/good_integration_otel/data_stream/otel_metrics/agent/stream/stream.yml.hbs
  • test/packages/good_integration_otel/data_stream/otel_metrics/fields/base-fields.yml
  • test/packages/good_integration_otel/data_stream/otel_metrics/manifest.yml
  • test/packages/good_integration_otel/docs/README.md
  • test/packages/good_integration_otel/manifest.yml
  • test/packages/good_v3/manifest.yml

Comment thread compliance/kibana.go
Comment on lines 268 to +269
if templateName != "" && inputName != "" && inputType != "" {
policyInputName := templateName + "-" + inputType
policyInputName := templateName + "-" + inputEffectiveName
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider validating inputEffectiveName when building the policy input name.

The conditional on line 268 checks that templateName, inputName, and inputType are non-empty, but line 269 uses inputEffectiveName without verifying it's non-empty. If inputEffectiveName were empty, policyInputName would become "templateName-".

While the function comment indicates inputEffectiveName should always be valid when the other parameters are provided, an explicit guard would improve robustness.

🛡️ Suggested validation
-	if templateName != "" && inputName != "" && inputType != "" {
+	if templateName != "" && inputName != "" && inputType != "" && inputEffectiveName != "" {
 		policyInputName := templateName + "-" + inputEffectiveName
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if templateName != "" && inputName != "" && inputType != "" {
policyInputName := templateName + "-" + inputType
policyInputName := templateName + "-" + inputEffectiveName
if templateName != "" && inputName != "" && inputType != "" && inputEffectiveName != "" {
policyInputName := templateName + "-" + inputEffectiveName
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@compliance/kibana.go` around lines 268 - 269, The code builds policyInputName
using inputEffectiveName without ensuring it's non-empty; update the guard that
checks templateName, inputName, and inputType to also verify inputEffectiveName
!= "" (or add an explicit early-return/skip when inputEffectiveName is empty)
before computing policyInputName so you never produce "templateName-"; adjust
any downstream logic to handle the new early-return/skip if applicable.

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

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