mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 04:56:54 +00:00
Fix: Remove unintended inclusion of child aliases after cluster after changes (#17472)
* Fix: Remove unintended inclusion of child aliases after cluster alias update * fix the dataAssetWidget and entityDoc playwright failure --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
parent
dc46072df0
commit
d31215e72c
@ -287,11 +287,7 @@ public class ElasticSearchClient implements SearchClient {
|
||||
try {
|
||||
Set<String> aliases = new HashSet<>(indexMapping.getParentAliases(clusterAlias));
|
||||
aliases.add(indexMapping.getAlias(clusterAlias));
|
||||
// Get the child aliases
|
||||
List<String> childAliases = indexMapping.getChildAliases(clusterAlias);
|
||||
|
||||
// Add the child aliases to the set of aliases
|
||||
aliases.addAll(childAliases);
|
||||
IndicesAliasesRequest.AliasActions aliasAction =
|
||||
IndicesAliasesRequest.AliasActions.add()
|
||||
.index(indexMapping.getIndexName(clusterAlias))
|
||||
|
||||
@ -280,11 +280,7 @@ public class OpenSearchClient implements SearchClient {
|
||||
try {
|
||||
Set<String> aliases = new HashSet<>(indexMapping.getParentAliases(clusterAlias));
|
||||
aliases.add(indexMapping.getAlias(clusterAlias));
|
||||
// Get the child aliases
|
||||
List<String> childAliases = indexMapping.getChildAliases(clusterAlias);
|
||||
|
||||
// Add the child aliases to the set of aliases
|
||||
aliases.addAll(childAliases);
|
||||
IndicesAliasesRequest.AliasActions aliasAction =
|
||||
IndicesAliasesRequest.AliasActions.add()
|
||||
.index(indexMapping.getIndexName(clusterAlias))
|
||||
|
||||
@ -19,14 +19,12 @@ import { PipelineClass } from '../../support/entity/PipelineClass';
|
||||
import { SearchIndexClass } from '../../support/entity/SearchIndexClass';
|
||||
import { TableClass } from '../../support/entity/TableClass';
|
||||
import { TopicClass } from '../../support/entity/TopicClass';
|
||||
import { UserClass } from '../../support/user/UserClass';
|
||||
import { performAdminLogin } from '../../utils/admin';
|
||||
import {
|
||||
createNewPage,
|
||||
getEntityTypeSearchIndexMapping,
|
||||
redirectToHomePage,
|
||||
} from '../../utils/common';
|
||||
import { checkDataAssetWidget } from '../../utils/entity';
|
||||
import { performUserLogin } from '../../utils/user';
|
||||
|
||||
const entities = [
|
||||
TableClass,
|
||||
@ -48,20 +46,20 @@ const menuLabel = {
|
||||
SearchIndex: 'search Search Indexes',
|
||||
};
|
||||
|
||||
// use the admin user to login
|
||||
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||
|
||||
entities.forEach((EntityClass) => {
|
||||
const user = new UserClass();
|
||||
const entity = new EntityClass();
|
||||
|
||||
test.describe(entity.getType(), () => {
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await user.create(apiContext);
|
||||
const { apiContext, afterAction } = await createNewPage(browser);
|
||||
await entity.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test('Check Data Asset and Service Filtration', async ({ browser }) => {
|
||||
const { page, afterAction } = await performUserLogin(browser, user);
|
||||
test('Check Data Asset and Service Filtration', async ({ page }) => {
|
||||
await redirectToHomePage(page);
|
||||
await checkDataAssetWidget(
|
||||
page,
|
||||
@ -69,12 +67,10 @@ entities.forEach((EntityClass) => {
|
||||
getEntityTypeSearchIndexMapping(entity.type),
|
||||
toLower(entity.service.serviceType)
|
||||
);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test.afterAll('Cleanup', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await user.delete(apiContext);
|
||||
const { apiContext, afterAction } = await createNewPage(browser);
|
||||
await entity.delete(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
@ -27,7 +27,7 @@ test.describe('API docs should work properly', () => {
|
||||
|
||||
await expect(
|
||||
page.getByRole('link', {
|
||||
name: 'openmetadata-dev@googlegroups.com',
|
||||
name: 'openmetadata-dev@googlegroups',
|
||||
})
|
||||
).toBeVisible();
|
||||
|
||||
|
||||
@ -1202,8 +1202,6 @@ export const checkDataAssetWidget = async (
|
||||
index: string,
|
||||
serviceType: string
|
||||
) => {
|
||||
await page.click('[data-testid="welcome-screen-close-btn"]');
|
||||
|
||||
const quickFilterResponse = page.waitForResponse(
|
||||
`/api/v1/search/query?q=&index=dataAsset*${serviceType}*`
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user