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:
Shailesh Parmar 2025-04-04 12:56:38 +05:30 committed by GitHub
parent c04e1a1dd6
commit 4aed3acbd7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,6 +351,21 @@ class ServiceBaseClass {
await page.waitForLoadState('networkidle');
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(
page
.locator(`[data-row-key*="${workflowData.name}"]`)