[ML] Transforms: Enable SLO transforms installer on CI (#165470)

## Summary

This enables the installer for SLO transforms on CI.

- For the `many_fields_transform` performance journey, it will then look
for the "Create transform" on top of the table instead of the "Create
your first transform" button. Command to test the performance journey:
`node scripts/run_performance.js --journey-path
x-pack/performance/journeys/many_fields_transform.ts --skip-warmup`
- For the functional tests that assert the empty transform list, this
adds a command to delete all transforms before running those tests.
This commit is contained in:
Walter Rafelsberger 2023-09-22 17:13:38 +02:00 committed by GitHub
parent f52ca02a3d
commit cdaa3d3851
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 6 deletions

View file

@ -15,11 +15,11 @@ export const journey = new Journey({
.step('Go to Transforms', async ({ page, kbnUrl, kibanaPage }) => {
await page.goto(kbnUrl.get(`app/management/data/transform`));
await kibanaPage.waitForHeader();
await page.waitForSelector(subj('transformCreateFirstButton'));
await page.waitForSelector(subj('transformButtonCreate'));
await page.waitForSelector(subj('globalLoadingIndicator-hidden'));
})
.step('Go to data view selection', async ({ page }) => {
const createButtons = page.locator(subj('transformCreateFirstButton'));
const createButtons = page.locator(subj('transformButtonCreate'));
await createButtons.first().click();
await page.waitForSelector(subj('savedObjectsFinderTable'));
})

View file

@ -22,7 +22,7 @@ export class DefaultSLOInstaller implements SLOInstaller {
) {}
public async install() {
if (this.isInstalling || process.env.CI) {
if (this.isInstalling) {
return;
}
this.isInstalling = true;

View file

@ -310,6 +310,8 @@ export const useIndexData = (
if (
dataGrid.status === INDEX_STATUS.LOADED &&
dataViewFields !== undefined &&
Array.isArray(histogramsForFieldsData) &&
histogramsForFieldsData.length > 0 &&
loadIndexDataStartTime.current !== undefined
) {
const loadIndexDataDuration = window.performance.now() - loadIndexDataStartTime.current;

View file

@ -17,6 +17,10 @@ export default function ({ getService }: FtrProviderContext) {
describe('with no data loaded', function () {
before(async () => {
await transform.securityUI.loginAsTransformPowerUser();
// For this test to work, make sure there are no pre-existing transform present.
// For example, solutions might set up transforms automatically.
await transform.api.cleanTransformIndices();
});
after(async () => {

View file

@ -17,6 +17,10 @@ export default function ({ getService }: FtrProviderContext) {
describe('with no data loaded', function () {
before(async () => {
await transform.securityUI.loginAsTransformViewer();
// For this test to work, make sure there are no pre-existing transform present.
// For example, solutions might set up transforms automatically.
await transform.api.cleanTransformIndices();
});
after(async () => {

View file

@ -27,7 +27,7 @@ export default function upgradeAssistantFunctionalTests({
try {
/**
* Trigger "Total shards" ES Upgrade readiness check
* the number of shards in the test cluster is 25-27
* the number of shards in the test cluster is 25-29
* so 5 max shards per node should trigger this check
* on both local and CI environments.
*/
@ -53,7 +53,7 @@ export default function upgradeAssistantFunctionalTests({
persistent: {
cluster: {
// initial cluster setting from x-pack/test/functional/config.upgrade_assistant.js
max_shards_per_node: 27,
max_shards_per_node: 29,
},
},
},

View file

@ -31,7 +31,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
'cluster.routing.allocation.disk.threshold_enabled=true', // make sure disk thresholds are enabled for UA cluster testing
'cluster.routing.allocation.disk.watermark.low=30%',
'cluster.info.update.interval=10s',
'cluster.max_shards_per_node=27',
'cluster.max_shards_per_node=29',
],
},
};