Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a project-id to ProjectMetadata #109955

Closed
wants to merge 23 commits into from

Conversation

tvernum
Copy link
Contributor

@tvernum tvernum commented Jun 20, 2024

No plans to merge, just here for CI
Builds on #109460 and #109659

tvernum added 23 commits June 7, 2024 12:22
This replaces `Metadata.Custom` with two new interfaces
- `Metdata.ClusterCustom`
- `Metdata.ProjectCustom`

Every implementation of `Custom` has been converted to one of these
two interfaces based on whether it is topological (Cluster) based (such
as Autoscaling and DesiredNodes) or data (Project) based (such as
DataStreams and Templates)
Otherwise the node tool cannot tell what to parse as a cluster custom
and what to treat as a project custom
ClusterState has two accessor methods for the same field. This makes
mocking painful. Use "metadata()" consistently in these tests
This adds backward compatibility code to handle cluster `Metadata`
(and `MetadataDiff`) to versions that have a single `Custom` interface
(before the split to `ClusterCustom` and `ProjectCustom`)
This commit adds a new `ProjectMetadata` class and migrates fields
from `Metadata` into the new class. Each `Metadata` instance has
exactly one `ProjectMetadata` field.

The API to `Metadata` is essentially unchanged with existing methods
delegating to methods on the new class.

However, serialization (Transport and XContent) has changed to reflect
the new class structure.
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.

None yet

2 participants