Skip to content

Commit

Permalink
Fix interactive Setup UI never reaches Finished state (#165273)
Browse files Browse the repository at this point in the history
Resolves #162518

This PR updates the logic that detects whether Kibana has booted
correctly during interactive setup.

The issue described in #162518 was a false positive and only effected
Kibana when run in development mode.

We already have end-to-end tests which go through the entire enrollment
flow and ensure that Kibana correctly redirects to the login page once
interactive setup completes:

https://github.com/elastic/kibana/blob/main/test/interactive_setup_functional/tests/enrollment_token.ts#L78-L81

These tests passed with both the previous and the updated logic.
However, the end-to-end tests do not check development mode which is why
the build never failed and we started seeing this issue.
  • Loading branch information
thomheymann authored Aug 31, 2023
1 parent 4125ae2 commit c392779
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 424 deletions.
9 changes: 1 addition & 8 deletions src/plugins/interactive_setup/public/progress_indicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ function isKibanaPastPreboot(response?: Response, body?: StatusResponse) {
if (!response?.headers.get('content-type')?.includes('application/json')) {
return false;
}

return (
// Status endpoint may require authentication after `preboot` stage.
response?.status === 401 ||
// We're only interested in the availability of the critical core services.
(body?.status?.core?.elasticsearch?.level === 'available' &&
body?.status?.core?.savedObjects?.level === 'available')
);
return body?.status?.overall?.level === 'available';
}

export const ProgressIndicator: FunctionComponent<ProgressIndicatorProps> = ({ onSuccess }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./management'));

// platform security
loadTestFile(require.resolve('./security/api_keys'));
loadTestFile(require.resolve('./security/navigation/avatar_menu'));

// Management
Expand Down
Loading

0 comments on commit c392779

Please sign in to comment.