Skip to content

[Fleet] Re-enable kibana version checks in 9.0#208169

Merged
jsoriano merged 13 commits intoelastic:mainfrom
jsoriano:re-enable-kibana-version-check-9.0
Feb 11, 2025
Merged

[Fleet] Re-enable kibana version checks in 9.0#208169
jsoriano merged 13 commits intoelastic:mainfrom
jsoriano:re-enable-kibana-version-check-9.0

Conversation

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano jsoriano commented Jan 24, 2025

Summary

Revert the change in #198172.

It re-enables version constraints for packages in 9.0 by default, following the plan described in internal issue https://github.com/elastic/ingest-dev/issues/4484.

We already have some packages ready for 9.0, and many more coming, so it should be enough for testing purposes during the FF.

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

List of packages will be reduced to some few till more packages are prepared to 9.0. This situation will be addressed soon as most packages are being migrated these days.

@jsoriano jsoriano added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Fleet Team label for Observability Data Collection Fleet team labels Jan 24, 2025
@jsoriano jsoriano self-assigned this Jan 24, 2025
@jsoriano jsoriano requested a review from a team as a code owner January 24, 2025 11:03
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/fleet (Team:Fleet)

@kpollich
Copy link
Copy Markdown
Member

Looks like the fleet_server integration isn't coming back the registry and tests are failing as a result

Fleet cloud preconfiguration › Preconfigured cloud policy › Adding APM to a preconfigured agent policy after first setup › Works and preconfigure correctly agent policies
--
  |  
  | FleetError: Setup failed: {"level":"available","summary":"Fleet setup failed","meta":{"error":"[Elastic Cloud agent policy] could not be added. [fleet_server] could not be installed due to error: [PackageNotFoundError: [fleet_server] package not found in registry]"},"reported":true}

@kpollich
Copy link
Copy Markdown
Member

We need to add a 9.0.0 condition to the integration, publish a new version, and let the package-registry:lite distribution update, I think.

https://github.com/elastic/integrations/blob/81964393d9c1a72becbafe33912a99c66b54668f/packages/fleet_server/manifest.yml#L8-L10

@jsoriano
Copy link
Copy Markdown
Member Author

We need to add a 9.0.0 condition to the integration, publish a new version, and let the package-registry:lite distribution update, I think.

https://github.com/elastic/integrations/blob/81964393d9c1a72becbafe33912a99c66b54668f/packages/fleet_server/manifest.yml#L8-L10

Doing this in elastic/integrations#12460

Another option by now would be to keep the disable in the kibana config used for testing, as we were doing in https://github.com/elastic/kibana/pull/198172/files#diff-292c3f307d3d0d341a361d12416d04609a3f525be268242c2a06be06fd8d5810L188

@jsoriano
Copy link
Copy Markdown
Member Author

Tests also expect for the apache package to be available.

@kpollich
Copy link
Copy Markdown
Member

Looks like there are test failures with brittle assertions that are expecting a certain number of packages to exist, etc.

I think we should probably skip these tests and replace them with something more robust. @nchaulet what do you think? I think we have run into problems like this before and wondering what your take is.

@nchaulet
Copy link
Copy Markdown
Member

nchaulet commented Jan 30, 2025

Looks like there are test failures with brittle assertions that are expecting a certain number of packages to exist, etc.
I think we should probably skip these tests and replace them with something more robust. @nchaulet what do you think? I think we have run into problems like this before and wondering what your take is.

I am not sure what will be the best solution here, as we are running test with lite distribution of package registry we expect packages to be relatively stable, skipping them seems a good temporary solution but once we will be in the 9.x cycle this should probably stay stable and we can re-enable those test?

Also disabling that flag in tests is kind of tricky as we will not test the same behaviour.

Should we wait to have the most important packages available? merging this without having endpoint available means it's not really usable by users no?

@jsoriano
Copy link
Copy Markdown
Member Author

9.0 has been branched, we will have to backport this change.

@jsoriano jsoriano added backport:prev-minor and removed backport:skip This PR does not require backporting labels Jan 31, 2025
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Jan 31, 2025

@kpollich @nchaulet wdyt about disabling by now the constraint via config for tests, adding this to config/kibana.yml?

xpack.fleet.internal.registry.kibanaVersionCheckEnabled: false

(it was initially done this way https://github.com/elastic/kibana/pull/198172/files#diff-292c3f307d3d0d341a361d12416d04609a3f525be268242c2a06be06fd8d5810L188)

@nchaulet
Copy link
Copy Markdown
Member

@kpollich @nchaulet wdyt about disabling by now the constraint via config for tests, adding this to config/kibana.yml?

Seems acceptable as long we have a timeline for adding back the constraint soon.

@jsoriano jsoriano force-pushed the re-enable-kibana-version-check-9.0 branch from 827eff0 to e2d83ca Compare February 6, 2025 17:26
@jsoriano jsoriano requested review from a team as code owners February 6, 2025 17:26
@jsoriano
Copy link
Copy Markdown
Member Author

jsoriano commented Feb 7, 2025

I have modified some test configs so we keep version constraints disabled for these tests, but not for anything else.

@juliaElastic @nchaulet could any of you please do another review? Thanks!

@jsoriano jsoriano requested a review from juliaElastic February 7, 2025 14:19
Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jsoriano jsoriano enabled auto-merge (squash) February 7, 2025 14:45
Copy link
Copy Markdown
Member

@pheyos pheyos left a comment

Choose a reason for hiding this comment

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

x-pack/test/functional/config.base.js changes LGTM

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #9 / useReplaceCustomField calls the api when invoked with the correct parameters

Metrics [docs]

✅ unchanged

History

cc @jsoriano

@jsoriano
Copy link
Copy Markdown
Member Author

@elastic/kibana-cloud-security-posture could you please take a look 🙏 Thanks!

@jsoriano jsoriano merged commit a25dc3f into elastic:main Feb 11, 2025
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.0

https://github.com/elastic/kibana/actions/runs/13264586069

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 11, 2025
Revert the change in elastic#198172.

It re-enables version constraints for packages in 9.0 by default,
following the plan described in internal issue
elastic/ingest-dev#4484.

We already have some packages ready for 9.0, and many more coming, so it
should be enough for testing purposes during the FF.

Adjust some tests config so they continue disabling the constraints, as they
expect more packages than the ones available now.

(cherry picked from commit a25dc3f)
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 All backports created successfully

Status Branch Result
9.0

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@jsoriano jsoriano deleted the re-enable-kibana-version-check-9.0 branch February 11, 2025 14:29
kibanamachine added a commit that referenced this pull request Feb 11, 2025
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Fleet] Re-enable kibana version checks in 9.0
(#208169)](#208169)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jaime Soriano
Pastor","email":"jaime.soriano@elastic.co"},"sourceCommit":{"committedDate":"2025-02-11T13:58:08Z","message":"[Fleet]
Re-enable kibana version checks in 9.0 (#208169)\n\nRevert the change in
https://github.com/elastic/kibana/issues/198172.\n\nIt re-enables
version constraints for packages in 9.0 by default,\nfollowing the plan
described in internal
issue\nhttps://github.com/elastic/ingest-dev/issues/4484.\n\nWe already
have some packages ready for 9.0, and many more coming, so it\nshould be
enough for testing purposes during the FF.\n\nAdjust some tests config
so they continue disabling the constraints, as they\nexpect more
packages than the ones available
now.","sha":"a25dc3f530f52a37e55f35c584b1b85cd34f4fcc","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v9.1.0"],"title":"[Fleet]
Re-enable kibana version checks in
9.0","number":208169,"url":"https://github.com/elastic/kibana/pull/208169","mergeCommit":{"message":"[Fleet]
Re-enable kibana version checks in 9.0 (#208169)\n\nRevert the change in
https://github.com/elastic/kibana/issues/198172.\n\nIt re-enables
version constraints for packages in 9.0 by default,\nfollowing the plan
described in internal
issue\nhttps://github.com/elastic/ingest-dev/issues/4484.\n\nWe already
have some packages ready for 9.0, and many more coming, so it\nshould be
enough for testing purposes during the FF.\n\nAdjust some tests config
so they continue disabling the constraints, as they\nexpect more
packages than the ones available
now.","sha":"a25dc3f530f52a37e55f35c584b1b85cd34f4fcc"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208169","number":208169,"mergeCommit":{"message":"[Fleet]
Re-enable kibana version checks in 9.0 (#208169)\n\nRevert the change in
https://github.com/elastic/kibana/issues/198172.\n\nIt re-enables
version constraints for packages in 9.0 by default,\nfollowing the plan
described in internal
issue\nhttps://github.com/elastic/ingest-dev/issues/4484.\n\nWe already
have some packages ready for 9.0, and many more coming, so it\nshould be
enough for testing purposes during the FF.\n\nAdjust some tests config
so they continue disabling the constraints, as they\nexpect more
packages than the ones available
now.","sha":"a25dc3f530f52a37e55f35c584b1b85cd34f4fcc"}}]}] BACKPORT-->

Co-authored-by: Jaime Soriano Pastor <jaime.soriano@elastic.co>
kpollich added a commit that referenced this pull request Feb 25, 2025
## Summary

We re-enabled registry version checks in
#208169 but missed this Docker
template.

cc @jsoriano
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 25, 2025
…212382)

## Summary

We re-enabled registry version checks in
elastic#208169 but missed this Docker
template.

cc @jsoriano

(cherry picked from commit 6d6db2f)
kibanamachine added a commit that referenced this pull request Feb 25, 2025
…12382) (#212428)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[Fleet] Re-enable registry version check in Docker template
(#212382)](#212382)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Kyle
Pollich","email":"kyle.pollich@elastic.co"},"sourceCommit":{"committedDate":"2025-02-25T17:33:59Z","message":"[Fleet]
Re-enable registry version check in Docker template (#212382)\n\n##
Summary\n\nWe re-enabled registry version checks
in\nhttps://github.com//pull/208169 but missed this
Docker\ntemplate.\n\ncc
@jsoriano","sha":"6d6db2fe669e34503d987fef5651d447869a3eba","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","backport:prev-minor","v9.1.0"],"title":"[Fleet]
Re-enable registry version check in Docker
template","number":212382,"url":"https://github.com/elastic/kibana/pull/212382","mergeCommit":{"message":"[Fleet]
Re-enable registry version check in Docker template (#212382)\n\n##
Summary\n\nWe re-enabled registry version checks
in\nhttps://github.com//pull/208169 but missed this
Docker\ntemplate.\n\ncc
@jsoriano","sha":"6d6db2fe669e34503d987fef5651d447869a3eba"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212382","number":212382,"mergeCommit":{"message":"[Fleet]
Re-enable registry version check in Docker template (#212382)\n\n##
Summary\n\nWe re-enabled registry version checks
in\nhttps://github.com//pull/208169 but missed this
Docker\ntemplate.\n\ncc
@jsoriano","sha":"6d6db2fe669e34503d987fef5651d447869a3eba"}}]}]
BACKPORT-->

Co-authored-by: Kyle Pollich <kyle.pollich@elastic.co>
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this pull request Feb 27, 2025
…212382)

## Summary

We re-enabled registry version checks in
elastic#208169 but missed this Docker
template.

cc @jsoriano
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Mar 22, 2025
…212382)

## Summary

We re-enabled registry version checks in
elastic#208169 but missed this Docker
template.

cc @jsoriano
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.0.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants