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

[Upgrade Assistant] Hide features that don't need to be migrated from flyout #115535

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ const mockedResponse = {
},
],
},
{
feature_name: 'kibana',
minimum_index_version: '7.1.2',
upgrade_status: 'MIGRATION_NEEDED',
indices: [
{
index: '.kibana',
version: '7.1.2',
},
],
},
],
migration_status: 'MIGRATION_NEEDED',
};
Expand Down Expand Up @@ -75,7 +86,12 @@ describe('Migrate system indices API', () => {
method: 'GET',
path: '/_migration/system_features',
});
expect(resp.payload).toEqual(mockedResponse);
expect(resp.payload).toEqual({
...mockedResponse,
features: mockedResponse.features.filter(
(feature) => feature.migration_status !== 'NO_MIGRATION_NEEDED'
),
});
});

it('returns an error if it throws', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ export function registerSystemIndicesMigrationRoutes({
const status = await getESSystemIndicesMigrationStatus(client.asCurrentUser);

return response.ok({
body: status,
body: {
...status,
features: status.features.filter(
(feature) => feature.migration_status !== 'NO_MIGRATION_NEEDED'
),
},
});
} catch (error) {
return handleEsError({ error, response });
Expand Down