Skip to content

[azure_metrics] Fix compute_vm stream YAML indentation - #18822

Merged
zmoog merged 2 commits into
mainfrom
fix/azure_metrics-compute_vm-yaml-indent
May 6, 2026
Merged

[azure_metrics] Fix compute_vm stream YAML indentation#18822
zmoog merged 2 commits into
mainfrom
fix/azure_metrics-compute_vm-yaml-indent

Conversation

@zmoog

@zmoog zmoog commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Multi-line flow sequence ([...]) continuations in compute_vm/agent/stream/stream.yml.hbs were indented to column 5, while the parent - name: list item is at column 9. Older YAML parsers (go-yaml v2/v3, js-yaml, PyYAML) silently accept this, but Kibana 9.5+ uses eemeli/yaml which strictly enforces YAML 1.2 rule 9C9N. On 9.5.0 the integration fails to install with:

Flow sequence in block collection must be sufficiently indented and end with a ]
at line N, column 5

This PR re-indents the affected continuations to column 13, matching the convention already used in the resource_ids and unless branches of the same template. Confirmed with eemeli/yaml:

  • before fix → reproduces the error verbatim;
  • after fix → parses cleanly.

Affected lines: 40, 45–56, 107–118, 169–180 in compute_vm/agent/stream/stream.yml.hbs. Whitespace-only changes (no metric names added/removed).

Test plan

  • elastic-package check passes for packages/azure_metrics.
  • Install azure_metrics (Virtual Machines policy template) on Elastic Cloud 9.5.0 — installation succeeds.
  • Verify VM metrics flow end-to-end (Windows GuestMetrics + Linux GuestMetrics).
Multi-line flow sequence continuations in compute_vm/agent/stream/stream.yml.hbs
were indented to column 5, less than their parent `- name:` list item at column 9.

Older YAML parsers (go-yaml v2/v3, js-yaml, PyYAML) accept this, but Kibana 9.5+
uses eemeli/yaml which strictly enforces YAML 1.2 rule 9C9N: flow sequence
continuations must be indented past the parent block. Installation fails with:

  Flow sequence in block collection must be sufficiently indented and end with
  a ] at line N, column 5

Re-indents the affected continuations to column 13, matching the convention
already used in the resource_ids and unless branches of the same template.
@zmoog
zmoog requested a review from a team as a code owner May 5, 2026 11:24
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

@andrewkroh andrewkroh added Integration:azure_metrics Azure Resource Metrics Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services] labels May 5, 2026

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

LGTM

@zmoog
zmoog merged commit 380442e into main May 6, 2026
9 checks passed
@zmoog
zmoog deleted the fix/azure_metrics-compute_vm-yaml-indent branch May 6, 2026 09:49
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package azure_metrics - 1.11.1 containing this change is available at https://epr.elastic.co/package/azure_metrics/1.11.1/

herrBez pushed a commit to herrBez/integrations that referenced this pull request Jun 1, 2026
* [azure_metrics] Fix compute_vm stream YAML indentation

Multi-line flow sequence continuations in compute_vm/agent/stream/stream.yml.hbs
were indented to column 5, less than their parent `- name:` list item at column 9.

Older YAML parsers (go-yaml v2/v3, js-yaml, PyYAML) accept this, but Kibana 9.5+
uses eemeli/yaml which strictly enforces YAML 1.2 rule 9C9N: flow sequence
continuations must be indented past the parent block. Installation fails with:

  Flow sequence in block collection must be sufficiently indented and end with
  a ] at line N, column 5

Re-indents the affected continuations to column 13, matching the convention
already used in the resource_ids and unless branches of the same template.

* Update changelog PR link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:azure_metrics Azure Resource Metrics Team:obs-ds-hosted-services Observability Hosted Services team [elastic/obs-ds-hosted-services]

4 participants