Skip to content

Conversation

@pchila
Copy link
Member

@pchila pchila commented Dec 11, 2025

As follow-up to new rollback information managed by fleet-server with elastic/fleet-server#5975 this PR adds the mapping of the new fields to .fleet-agents system index.

Resolves elastic/fleet-server#6039

@pchila pchila requested a review from a team as a code owner December 11, 2025 11:02
@pchila pchila added the :Core/Infra/Plugins Plugin API and infrastructure label Dec 11, 2025
@elasticsearchmachine elasticsearchmachine added v9.3.0 Team:Core/Infra Meta label for core/infra team external-contributor Pull request authored by a developer outside the Elasticsearch team labels Dec 11, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Hi @pchila, I've created a changelog YAML for you.

"type": "date"
},
"version": {
"type": "text",
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need both text and keyword type? Isn't it enough to have keyword?

Copy link
Member Author

Choose a reason for hiding this comment

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

I used the same definition for version used elsewhere in the mappings.
I also think that keyword may be enough but I thought that the text mapping was there for a good reason.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not aware of a reason, but I suppose it's okay to make it consistent with other version fields.

Copy link
Member Author

Choose a reason for hiding this comment

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

After discussing offline with @jillguyonnet about her comment, we came to the conclusion that it's worth trying to map field version as type: version.
She's going to run some tests and update the PR based on the outcome.

In case type: version doesn't work out, we can always go for type: keyword as suggested by @juliaElastic

@jillguyonnet
Copy link
Contributor

jillguyonnet commented Dec 12, 2025

Looks like I accidentally made my comment part of a pending review and it wasn't showing in the thread 🙈

Should we rather use the version field type? I don't foresee this being an issue in this case (it would be if we wanted to sort/compare rollback versions, cf. elastic/kibana#168604), but it should be the correct type for a version field.

I don't have any strong objections to text+keyword, version seems a bit cleaner though.

@ebeahan ebeahan added >bug v9.3.0 auto-backport Automatically create backport pull requests when merged and removed >enhancement v9.4.0 labels Dec 19, 2025
@elasticsearchmachine
Copy link
Collaborator

Hi @pchila, I've updated the changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Hi @pchila, I've updated the changelog YAML for you.

@jillguyonnet
Copy link
Contributor

Tested version type for version field, it seems to behave well including with IAR versioning.

@jillguyonnet
Copy link
Contributor

@elasticmachine merge upstream

@jillguyonnet jillguyonnet merged commit a4681c2 into elastic:main Dec 24, 2025
35 checks passed
pchila added a commit to pchila/elasticsearch that referenced this pull request Dec 24, 2025
…139363)

* Add upgrade.rollbacks mapping to .fleet-agents system index

* Update docs/changelog/139363.yaml

* Update docs/changelog/139363.yaml

* Update docs/changelog/139363.yaml

* Change version field type to version

---------

Co-authored-by: Eric Beahan <[email protected]>
Co-authored-by: jillguyonnet <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
9.3

elasticsearchmachine pushed a commit that referenced this pull request Dec 24, 2025
…#139993)

* Add upgrade.rollbacks mapping to .fleet-agents system index

* Update docs/changelog/139363.yaml

* Update docs/changelog/139363.yaml

* Update docs/changelog/139363.yaml

* Change version field type to version

---------

Co-authored-by: Eric Beahan <[email protected]>
Co-authored-by: jillguyonnet <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Plugins Plugin API and infrastructure >enhancement external-contributor Pull request authored by a developer outside the Elasticsearch team Team:Core/Infra Meta label for core/infra team v9.3.1 v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update .fleet-agent index mappings in elasticsearch for rollback fields

6 participants