Skip to content

Comments

Allow ech as an alias for ess#2770

Merged
cotti merged 5 commits intomainfrom
fix/ess_alias
Feb 24, 2026
Merged

Allow ech as an alias for ess#2770
cotti merged 5 commits intomainfrom
fix/ess_alias

Conversation

@cotti
Copy link
Contributor

@cotti cotti commented Feb 23, 2026

Fixes #563

Summary

This PR fixes gaps in the support for treating the ech deployment subtype as an alias for ess, ensuring consistent handling across JSON, YAML, and Markdown sources.

Test coverage

  • Tests for JSON round-tripping to verify that ech is deserialized as ess, serializes back as ess, and that when both ess and ech are present, the correct precedence is applied.
  • Authoring tests to ensure the new aliasing behavior works in front matter and inline Markdown scenarios, including precedence rules and top-level usage.

@cotti cotti self-assigned this Feb 23, 2026
@cotti cotti added the fix label Feb 23, 2026
@cotti cotti marked this pull request as ready for review February 23, 2026 16:08
@cotti cotti requested a review from a team as a code owner February 23, 2026 16:08
@cotti cotti requested a review from reakaleek February 23, 2026 16:08
]
""";

var deserialized = JsonSerializer.Deserialize<ApplicableTo>(json, _options);
Copy link
Member

@reakaleek reakaleek Feb 23, 2026

Choose a reason for hiding this comment

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

I don't think we need to test the JSON deserializer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, changed it to the pattern elsewhere in the tests now.

Copy link
Member

Choose a reason for hiding this comment

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

Ah nevermind. I just realized the alias logic is within the serializer?

@cotti cotti requested a review from reakaleek February 23, 2026 16:57
Copy link
Member

@reakaleek reakaleek left a comment

Choose a reason for hiding this comment

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

Approving. But I think we should get feedback from @shainaraskas.

@cotti
Copy link
Contributor Author

cotti commented Feb 23, 2026

As the scenario where using both in the same applicability statement would incur information loss for the ess statement, a warning was added if this is detected.

@cotti cotti merged commit a82205a into main Feb 24, 2026
30 checks passed
@cotti cotti deleted the fix/ess_alias branch February 24, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

alias ech for Elastic Cloud Hosted in applies_to

3 participants