Skip to content

[Getting Started] Deprecate feature flag (part 1 of 2)#245311

Merged
wildemat merged 20 commits intoelastic:mainfrom
wildemat:wildemat/search-team/11480/deprecate-ff
Dec 11, 2025
Merged

[Getting Started] Deprecate feature flag (part 1 of 2)#245311
wildemat merged 20 commits intoelastic:mainfrom
wildemat:wildemat/search-team/11480/deprecate-ff

Conversation

@wildemat
Copy link
Contributor

@wildemat wildemat commented Dec 4, 2025

Closes #244961
Closes #244715
Closes #244716

Part of 11480

Summary

Following guidance to deprecate feature flag before full removal. This ensures that there won't be any code deployed that defaults to false after core has removed the feature flag evaluation from their service.

Part 2 will move getting started tests out of the feature flag FTR config, and also clean up other branching logic.

Changes

  • Default feature flag to true as a fallback wherever it is fetched
  • Update search nav tests to expect getting started in the sidenav and tour where applicable
  • Because the default page of search solution redirects users to getting_started url using a local storage key, some tests must be updated to manually navigate back to the homepage. We've found that manually setting the local storage key in FTRs is not reliable.
  • Fixed a bug in the redirect logic that caused FTRs to sometimes find duplicate components caused by a render race condition.
  • Register Getting started plugin within enterprise search to avoid breaking role-based tests elsewhere in kibana

Tests

These changes will close #244715, #244716 and #244961 skipped tests

Executed the updated tests:

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config.ts --include x-pack/solutions/search/test/functional_search/tests/solution_navigation.ts
✅ 3 passing (11.5s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config.ts --include x-pack/solutions/search/test/functional_search/tests/classic_navigation.ts
✅ 2 passing (15.6s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config/config.basic.ts --include x-pack/solutions/search/test/functional_search/tests/solution_navigation.basic.ts
✅ 3 passing (10.1s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config/config.basic.ts --include x-pack/solutions/search/test/functional_search/tests/classic_navigation.basic.ts
✅ 2 passing (18.4s)

yarn test:ftr:runner --config x-pack/solutions/search/test/serverless/functional/configs/config.ts --include x-pack/solutions/search/test/serverless/functional/test_suites/navigation.ts
✅ 9 passing (1.0m)

Release Note

Adds a new getting started page within the Elasticsearch solution which offers hands on feature tutorials. This page defaults as the initial destination for users creating a new Elasticsearch project.

@wildemat wildemat changed the title default getting started to 'true' and update nav tests Dec 4, 2025
@wildemat wildemat marked this pull request as ready for review December 4, 2025 21:53
@wildemat wildemat requested a review from a team as a code owner December 4, 2025 21:53
@wildemat wildemat added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:Search v9.3.0 labels Dec 4, 2025
@wildemat wildemat requested a review from a team as a code owner December 8, 2025 20:18
@wildemat wildemat requested a review from a team as a code owner December 9, 2025 21:30
@wildemat wildemat requested a review from a team as a code owner December 9, 2025 21:30
Comment on lines +64 to +71
'/app/elasticsearch/getting_started'
)}#some=hash-value`
);
await find.byCssSelector('[data-test-subj="userMenuButton"]', 20000);

// We need to make sure that both path and hash are respected.
const currentURL = parse(await browser.getCurrentUrl());
expect(currentURL.pathname).to.eql('/app/elasticsearch/home');
expect(currentURL.pathname).to.eql('/app/elasticsearch/getting_started');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

All new search solution visitors will have an initial redirect to getting_started. Instead of changing just the expect to look for getting_started, I updated the cloud onboarding url as well, to be more clear.

return renderApp(coreStart, services, element, queryClient);
},
status: AppStatus.inaccessible,
status: AppStatus.accessible,
Copy link
Contributor Author

@wildemat wildemat Dec 10, 2025

Choose a reason for hiding this comment

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

This avoids flaky hide/show of the sidenav item for getting started while feature flag check happens. With the feature flag now defaulting to true we should initialize the plugin to accessible

@wildemat wildemat closed this Dec 10, 2025
auto-merge was automatically disabled December 10, 2025 15:26

Pull request was closed

@wildemat wildemat reopened this Dec 10, 2025
@wildemat wildemat removed the request for review from a team December 10, 2025 15:27
@wildemat wildemat removed the request for review from a team December 10, 2025 15:29
Copy link
Contributor

@bhavyarm bhavyarm left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
searchHomepage 180.2KB 180.0KB -234.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
searchGettingStarted 6.8KB 6.6KB -184.0B

History

@wildemat wildemat merged commit 17eea5e into elastic:main Dec 11, 2025
12 checks passed
seanrathier pushed a commit to seanrathier/kibana that referenced this pull request Dec 15, 2025
Closes elastic#244961
Closes elastic#244715
Closes elastic#244716

Part of [11480](elastic/search-team#11480 (comment))

## Summary

Following
[guidance](https://docs.elastic.dev/kibana-dev-docs/tutorials/feature-flags-service#always-deprecate-first-remove-after)
to deprecate feature flag before full removal. This ensures that there
won't be any code deployed that defaults to `false` after core has
removed the feature flag evaluation from their service.

Part 2 will move getting started tests out of the feature flag FTR
config, and also clean up other branching logic.

## Changes
- Default feature flag to `true` as a fallback wherever it is fetched
- Update search nav tests to expect getting started in the sidenav and
tour where applicable
- Because the default page of search solution redirects users to
`getting_started` url using a local storage key, some tests must be
updated to manually navigate back to the homepage. We've found that
manually setting the local storage key in FTRs is not reliable.
- Fixed a bug in the redirect logic that caused FTRs to sometimes find
duplicate components caused by a render race condition.
- Register Getting started plugin within enterprise search to avoid
breaking role-based tests elsewhere in kibana

## Tests

These changes will close elastic#244715, elastic#244716 and elastic#244961 skipped tests

Executed the updated tests:

```
yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config.ts --include x-pack/solutions/search/test/functional_search/tests/solution_navigation.ts
✅ 3 passing (11.5s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config.ts --include x-pack/solutions/search/test/functional_search/tests/classic_navigation.ts
✅ 2 passing (15.6s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config/config.basic.ts --include x-pack/solutions/search/test/functional_search/tests/solution_navigation.basic.ts
✅ 3 passing (10.1s)

yarn test:ftr:runner --config x-pack/solutions/search/test/functional_search/config/config.basic.ts --include x-pack/solutions/search/test/functional_search/tests/classic_navigation.basic.ts
✅ 2 passing (18.4s)

yarn test:ftr:runner --config x-pack/solutions/search/test/serverless/functional/configs/config.ts --include x-pack/solutions/search/test/serverless/functional/test_suites/navigation.ts
✅ 9 passing (1.0m)
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
wildemat added a commit that referenced this pull request Dec 16, 2025
The Getting Started plugin's feature flag was defaulted to `true` and
related tests were updated in [this
pr](#245311)

We can remove the code that depended on this feature flag now, and later
on remove it from the core feature flag service ([[Getting Started]
Remove core service feature flag ( Jan 5, 26
)](elastic/search-team#12153 (comment)))

## Summary

- Remove all usage of the `searchSolution.gettingStartedEnabled` feature
flag from application and test code
- Moved getting started FTRs out of `config.feature_flags.ts`
- Removed nav tests from getting started FTRs as they are present in the
various existing navigation FTRs
- Updated redirect gate to use a ref to be sure we don't call the
redirect multiple times

## Testing
- Ran and passed the following FTRs:
	- Hosted
-
`x-pack/solutions/search/test/functional_search/tests/classic_navigation.ts`
-
`x-pack/solutions/search/test/functional_search/tests/solution_navigation.ts`
-
`x-pack/solutions/search/test/functional_search/tests/search_getting_started.ts`
	- Serverless
-
`x-pack/solutions/search/test/serverless/functional/test_suites/search_getting_started.ts`
-
`x-pack/solutions/search/test/serverless/functional/test_suites/navigation.ts`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
@wildemat wildemat added release_note:feature Makes this part of the condensed release notes and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 16, 2025
@wildemat wildemat requested a review from leemthompo December 16, 2025 15:36
@wildemat
Copy link
Contributor Author

@elastic/docs request to review Release notes in the PR description

@wildemat wildemat requested a review from a team December 16, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:feature Makes this part of the condensed release notes Team:Search v9.3.0

5 participants