mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-15 10:48:31 +00:00
playwright: add debug log in case of ingestion pipeline failure. (#20600)
* debug dbt test * failed status * Refactor: Update ServiceIngestion tests and logging mechanism - Removed the testMatch for ServiceIngestion.spec.ts in playwright.config.ts. - Updated ServiceIngestion.spec.ts to include additional ingestion classes and improved the handling of failed pipeline logs by fetching logs via API instead of using the clipboard. - Enhanced logging for failed pipelines to provide clearer output in the console. * minor change
This commit is contained in:
parent
c04e1a1dd6
commit
4aed3acbd7
@ -351,6 +351,21 @@ class ServiceBaseClass {
|
|||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
await page.waitForSelector(`td:has-text("${ingestionType}")`);
|
await page.waitForSelector(`td:has-text("${ingestionType}")`);
|
||||||
|
|
||||||
|
const pipelineStatus = await page
|
||||||
|
.locator(`[data-row-key*="${workflowData.name}"]`)
|
||||||
|
.getByTestId('pipeline-status')
|
||||||
|
.last()
|
||||||
|
.textContent();
|
||||||
|
// add logs to console for failed pipelines
|
||||||
|
if (pipelineStatus?.toLowerCase() === 'failed') {
|
||||||
|
const logsResponse = await apiContext
|
||||||
|
.get(`/api/v1/services/ingestionPipelines/logs/${workflowData.id}/last`)
|
||||||
|
.then((res) => res.json());
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.log(logsResponse);
|
||||||
|
}
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page
|
page
|
||||||
.locator(`[data-row-key*="${workflowData.name}"]`)
|
.locator(`[data-row-key*="${workflowData.name}"]`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user