[UA] Ignore additional warnings handled by Cloud (#35005)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2019-04-12 10:49:45 -07:00 committed by GitHub
parent 8cd353d9c8
commit 09c77bb310
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 2 deletions

View file

@ -83,4 +83,44 @@ describe('getUpgradeAssistantStatus', () => {
expect(result).toHaveProperty('readyForUpgrade', true);
expect(result).toHaveProperty('cluster', []);
});
it('filters out TLS deprecation on Cloud', async () => {
deprecationsResponse = {
cluster_settings: [
{
level: 'warning',
message: 'TLS v1.0 has been removed from default TLS/SSL protocols',
url: 'https://...',
},
],
node_settings: [],
ml_settings: [],
index_settings: {},
};
const result = await getUpgradeAssistantStatus(callWithRequest, {} as any, true);
expect(result).toHaveProperty('readyForUpgrade', true);
expect(result).toHaveProperty('cluster', []);
});
it('filters out GCS Repository settings deprecation on Cloud', async () => {
deprecationsResponse = {
cluster_settings: [
{
level: 'warning',
message: 'GCS Repository settings changed',
url: 'https://...',
},
],
node_settings: [],
ml_settings: [],
index_settings: {},
};
const result = await getUpgradeAssistantStatus(callWithRequest, {} as any, true);
expect(result).toHaveProperty('readyForUpgrade', true);
expect(result).toHaveProperty('cluster', []);
});
});

View file

@ -13,6 +13,12 @@ import {
DeprecationInfo,
} from 'src/legacy/core_plugins/elasticsearch';
const CLOUD_FILTERS = [
'Security realm settings structure changed',
'TLS v1.0 has been removed from default TLS/SSL protocols',
'GCS Repository settings changed',
];
export interface EnrichedDeprecationInfo extends DeprecationInfo {
index?: string;
node?: string;
@ -65,8 +71,8 @@ const getClusterDeprecations = (deprecations: DeprecationAPIResponse, isCloudEna
.concat(deprecations.node_settings);
if (isCloudEnabled) {
// In Cloud, this is changed at upgrade time. Filter it out to improve upgrade UX.
return combined.filter(d => d.message !== 'Security realm settings structure changed');
// In Cloud, this is handled at upgrade time. Filter it out improve upgrade UX.
return combined.filter(d => CLOUD_FILTERS.indexOf(d.message) === -1);
} else {
return combined;
}