Skip to content

Conversation

@nielsbauman
Copy link
Contributor

This ProjectCustom class is currently registered as a writeable in ClusterModule and its XContent entry is registered in the SLM plugin. We use RegisteredPolicySnapshots in the SnapshotsService, so we should move its XContent entry to ClusterModule as well.

This avoids the following warning from showing up in some tests:

Skipping unknown custom [ProjectCustom] object with type
registered_snapshots

…odule`

This `ProjectCustom` class is currently registered as a writeable in
`ClusterModule` and its XContent entry is registered in the SLM plugin.
We use `RegisteredPolicySnapshots` in the `SnapshotsService`, so we
should move its XContent entry to `ClusterModule` as well.

This avoids the following warning from showing up in some tests:
> Skipping unknown custom [ProjectCustom] object with type
registered_snapshots
@nielsbauman nielsbauman added >non-issue :Data Management/ILM+SLM Index and Snapshot lifecycle management labels Nov 3, 2025
@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Data Management Meta label for data/management team labels Nov 3, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR moves the XContent registry entry for RegisteredPolicySnapshots from the SLM plugin to ClusterModule to align with where its writeable registration already exists, eliminating test warnings about unknown custom objects.

  • Removes RegisteredPolicySnapshots XContent registration from SnapshotLifecycle plugin
  • Adds RegisteredPolicySnapshots XContent registration to ClusterModule

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
x-pack/plugin/slm/src/main/java/org/elasticsearch/xpack/slm/SnapshotLifecycle.java Removes the XContent registry entry and import for RegisteredPolicySnapshots
server/src/main/java/org/elasticsearch/cluster/ClusterModule.java Adds the XContent registry entry for RegisteredPolicySnapshots

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@lukewhiting lukewhiting left a comment

Choose a reason for hiding this comment

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

LGTM 👍🏻

@nielsbauman nielsbauman enabled auto-merge (squash) November 3, 2025 09:03
@nielsbauman nielsbauman merged commit c3f1ae2 into elastic:main Nov 3, 2025
34 checks passed
@nielsbauman nielsbauman deleted the registered-snapshots branch November 3, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/ILM+SLM Index and Snapshot lifecycle management >non-issue Team:Data Management Meta label for data/management team v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants