Skip to content

CI: Enable AOT analyzers on library projects, skip AOT publish on PRs#2971

Merged
reakaleek merged 1 commit intomainfrom
best-pamphlet
Apr 2, 2026
Merged

CI: Enable AOT analyzers on library projects, skip AOT publish on PRs#2971
reakaleek merged 1 commit intomainfrom
best-pamphlet

Conversation

@reakaleek
Copy link
Copy Markdown
Member

@reakaleek reakaleek commented Mar 26, 2026

What

Enable Roslyn's AOT/trim analyzers on all library projects in the docs-builder dependency closure, and skip the native AOT publish step on pull requests.

Why

AOT/trim errors (IL2026/IL3050) only surfaced during the native ILC publish step in CI, not during local builds or the lint job. This made issues like anonymous-type serialization bugs invisible until the container publish stage.

How

  • Add <IsAotCompatible>true</IsAotCompatible> to 12 library projects that were missing it (5 already had PublishAot which enables the same analyzers)
  • Gate the Publish AOT, Publish Containers, and Run Container CI steps behind github.event_name == 'push' so they only run on merges to main, not on PRs

Test plan

  • PR CI should pass with only compile + test (no AOT publish)
  • Verify main branch still runs the full AOT publish + container steps after merge

🤖 Generated with Claude Code

… PRs

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@reakaleek reakaleek requested a review from a team as a code owner March 26, 2026 15:58
@reakaleek reakaleek requested a review from technige March 26, 2026 15:58
Copy link
Copy Markdown
Member

@Mpdreamz Mpdreamz left a comment

Choose a reason for hiding this comment

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

Nice!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5a92f9a6-d485-4844-8e00-b767e6e749cb

📥 Commits

Reviewing files that changed from the base of the PR and between 42b43e9 and 69191f9.

📒 Files selected for processing (13)
  • .github/workflows/ci.yml
  • src/Elastic.Documentation.Configuration/Elastic.Documentation.Configuration.csproj
  • src/Elastic.Documentation.LegacyDocs/Elastic.Documentation.LegacyDocs.csproj
  • src/Elastic.Documentation.LinkIndex/Elastic.Documentation.LinkIndex.csproj
  • src/Elastic.Documentation.Links/Elastic.Documentation.Links.csproj
  • src/Elastic.Documentation.Navigation/Elastic.Documentation.Navigation.csproj
  • src/Elastic.Documentation.ServiceDefaults/Elastic.Documentation.ServiceDefaults.csproj
  • src/Elastic.Documentation/Elastic.Documentation.csproj
  • src/authoring/Elastic.Documentation.Refactor/Elastic.Documentation.Refactor.csproj
  • src/services/Elastic.Changelog/Elastic.Changelog.csproj
  • src/services/Elastic.Documentation.Assembler/Elastic.Documentation.Assembler.csproj
  • src/services/Elastic.Documentation.Isolated/Elastic.Documentation.Isolated.csproj
  • src/services/Elastic.Documentation.Services/Elastic.Documentation.Services.csproj

📝 Walkthrough

Walkthrough

The pull request updates the CI/CD workflow to restrict publish and container steps to push events only, preventing these operations from running on other event types like pull requests. Additionally, all twelve project files across the solution now declare AOT (Ahead-of-Time) compatibility by adding the IsAotCompatible property to their respective project configurations, enabling potential future AOT-based deployments.

Suggested labels

ci, chore

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and clearly summarizes the main changes: enabling AOT analyzers on library projects and skipping AOT publish on PRs.
Description check ✅ Passed The description is well-organized, explains the problem, the solution, and how it was implemented, all relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch best-pamphlet

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

@reakaleek reakaleek removed the chore label Mar 26, 2026
Copy link
Copy Markdown

@technige technige left a comment

Choose a reason for hiding this comment

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

👍 make it so!

@reakaleek reakaleek merged commit 7347a91 into main Apr 2, 2026
28 of 31 checks passed
@reakaleek reakaleek deleted the best-pamphlet branch April 2, 2026 15:19
cotti pushed a commit that referenced this pull request Apr 2, 2026
… PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cotti added a commit that referenced this pull request Apr 2, 2026
* Add skip-labels to evaluate-pr's output

* Add tests

* Resolve conflicts

* Fix docs-builder redirect tests (#3008)

* Fix redirect tests

* Remove changelog redirects implemented elsewhere

* Search: Use default semantic_text inference, remove Jina mappings (#3014)

Elasticsearch Serverless now defaults semantic_text to Jina, making
the explicit Jina sub-fields redundant and the ELSER inference ID
unnecessary. This removes both inference ID constants, all .jina
field mappings, and lets semantic_text fields use the platform default.

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

* chore: Update config/versions.yml eck 3.3.2 (#3019)

Made with ❤️️ by updatecli

Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>

* Deploy: Use write-scoped filesystem for apply command (#3021)

The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp,
causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files
in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access.

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

* Update Azure EDOT CF version (#3022)

+CC @zmoog

* Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

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

* HTML: Omit version meta tags for versionless pages (#3020)

* HTML: Omit version meta tags for versionless pages

Versionless pages (serverless, cloud, etc.) were rendering the sentinel
value 99999.0+ in product_version and DC.identifier meta tags. Now these
tags are omitted entirely when the page's versioning system is versionless.

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

* HTML: Restore required modifier on CurrentVersion property

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

---------

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

* Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025)

* Layout: Adapt to static elastic-nav by making secondary nav sticky

The global elastic-nav.js (v2026-03) changed the header from fixed to
static positioning. This makes the secondary docs nav sticky at the top
and simplifies --offset-top to match its height.

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

* Layout: Only make secondary nav sticky on md+ viewports

On mobile the sticky secondary nav takes too much vertical space.
Keep it static on small screens (--offset-top: 0) and only sticky
on md+ where it provides persistent navigation.

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

* chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities

Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and
prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh).

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

* Layout: Add bottom border to secondary nav

The visual separator was coming from #main-container's border-top,
which scrolls away. Adding border-b to the nav itself keeps the
line visible while sticky.

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

* Layout: Remove border-top from main-container

The secondary nav now has border-b, so the main-container border-t
was causing a double border.

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

---------

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

* lint

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Jan Calanog <jan.calanog@elastic.co>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>
Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
cotti pushed a commit that referenced this pull request Apr 7, 2026
… PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
cotti added a commit that referenced this pull request Apr 7, 2026
* Add skip-labels to evaluate-pr's output

* Add tests

* Resolve conflicts

* Fix docs-builder redirect tests (#3008)

* Fix redirect tests

* Remove changelog redirects implemented elsewhere

* Search: Use default semantic_text inference, remove Jina mappings (#3014)

Elasticsearch Serverless now defaults semantic_text to Jina, making
the explicit Jina sub-fields redundant and the ELSER inference ID
unnecessary. This removes both inference ID constants, all .jina
field mappings, and lets semantic_text fields use the platform default.

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

* chore: Update config/versions.yml eck 3.3.2 (#3019)

Made with ❤️️ by updatecli

Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>

* Deploy: Use write-scoped filesystem for apply command (#3021)

The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp,
causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files
in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access.

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

* Update Azure EDOT CF version (#3022)

+CC @zmoog

* Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

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

* HTML: Omit version meta tags for versionless pages (#3020)

* HTML: Omit version meta tags for versionless pages

Versionless pages (serverless, cloud, etc.) were rendering the sentinel
value 99999.0+ in product_version and DC.identifier meta tags. Now these
tags are omitted entirely when the page's versioning system is versionless.

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

* HTML: Restore required modifier on CurrentVersion property

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

---------

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

* Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025)

* Layout: Adapt to static elastic-nav by making secondary nav sticky

The global elastic-nav.js (v2026-03) changed the header from fixed to
static positioning. This makes the secondary docs nav sticky at the top
and simplifies --offset-top to match its height.

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

* Layout: Only make secondary nav sticky on md+ viewports

On mobile the sticky secondary nav takes too much vertical space.
Keep it static on small screens (--offset-top: 0) and only sticky
on md+ where it provides persistent navigation.

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

* chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities

Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and
prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh).

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

* Layout: Add bottom border to secondary nav

The visual separator was coming from #main-container's border-top,
which scrolls away. Adding border-b to the nav itself keeps the
line visible while sticky.

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

* Layout: Remove border-top from main-container

The secondary nav now has border-b, so the main-container border-t
was causing a double border.

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

---------

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

* lint

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Jan Calanog <jan.calanog@elastic.co>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>
Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
itsalexcm pushed a commit that referenced this pull request Apr 7, 2026
… PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
itsalexcm pushed a commit that referenced this pull request Apr 7, 2026
* Add skip-labels to evaluate-pr's output

* Add tests

* Resolve conflicts

* Fix docs-builder redirect tests (#3008)

* Fix redirect tests

* Remove changelog redirects implemented elsewhere

* Search: Use default semantic_text inference, remove Jina mappings (#3014)

Elasticsearch Serverless now defaults semantic_text to Jina, making
the explicit Jina sub-fields redundant and the ELSER inference ID
unnecessary. This removes both inference ID constants, all .jina
field mappings, and lets semantic_text fields use the platform default.

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

* chore: Update config/versions.yml eck 3.3.2 (#3019)

Made with ❤️️ by updatecli

Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>

* Deploy: Use write-scoped filesystem for apply command (#3021)

The deploy apply command used RealRead which lacks AllowedSpecialFolder.Temp,
causing ScopedFileSystemException when AwsS3SyncApplyStrategy stages files
in /tmp/ for S3 upload. Switch to RealWrite which permits temp directory access.

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

* Update Azure EDOT CF version (#3022)

+CC @zmoog

* Enable AOT/trim analyzers on library projects and skip AOT publish on PRs (#2971)

Add IsAotCompatible to 12 library projects referenced by docs-builder so
Roslyn's trim/AOT analyzers (IL2026/IL3050) run during regular builds.
This catches AOT issues at compile time, removing the need for the
expensive native ILC publish step on pull requests.

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

* HTML: Omit version meta tags for versionless pages (#3020)

* HTML: Omit version meta tags for versionless pages

Versionless pages (serverless, cloud, etc.) were rendering the sentinel
value 99999.0+ in product_version and DC.identifier meta tags. Now these
tags are omitted entirely when the page's versioning system is versionless.

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

* HTML: Restore required modifier on CurrentVersion property

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

---------

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

* Layout: Adapt to static elastic-nav by making secondary nav sticky (#3025)

* Layout: Adapt to static elastic-nav by making secondary nav sticky

The global elastic-nav.js (v2026-03) changed the header from fixed to
static positioning. This makes the secondary docs nav sticky at the top
and simplifies --offset-top to match its height.

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

* Layout: Only make secondary nav sticky on md+ viewports

On mobile the sticky secondary nav takes too much vertical space.
Keep it static on small screens (--offset-top: 0) and only sticky
on md+ where it provides persistent navigation.

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

* chore: Upgrade lodash to 4.18.x to fix high severity vulnerabilities

Fixes code injection via _.template (GHSA-r5fr-rjxr-66jc) and
prototype pollution via _.unset/_.omit (GHSA-f23m-r3pf-42rh).

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

* Layout: Add bottom border to secondary nav

The visual separator was coming from #main-container's border-top,
which scrolls away. Adding border-b to the nav itself keeps the
line visible while sticky.

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

* Layout: Remove border-top from main-container

The secondary nav now has border-b, so the main-container border-t
was causing a double border.

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

---------

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

* lint

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Jan Calanog <jan.calanog@elastic.co>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: elastic-observability-automation[bot] <180520183+elastic-observability-automation[bot]@users.noreply.github.com>
Co-authored-by: Fabrizio Ferri-Benedetti <fabri.ferribenedetti@elastic.co>
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.

3 participants