Skip to content

Fixes #35485: Inherit owners on test suite and ingestion pipeline list reads - #35489

Open
TeddyCr wants to merge 1 commit into
open-metadata:mainfrom
TeddyCr:fix/test-suite-owner-inheritance
Open

TeddyCr wants to merge 1 commit into
open-metadata:mainfrom
TeddyCr:fix/test-suite-owner-inheritance

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #35485

A basic test suite inherits its table's owners, and an ingestion pipeline inherits its service's owners. Fetching either by id still returned the inherited owner, but the list endpoints returned owners: []:

  • GET /v1/dataQuality/testSuites?fields=owners
  • GET /v1/dataQuality/testSuites/search/list?fields=owners, which backs the Data Quality page
  • GET /v1/services/ingestionPipelines?fields=owners&service=<fqn>

Cause. #25751 added getParentReference to TestSuiteRepository and IngestionPipelineRepository. That sends list reads through the bulk path in EntityRepository.setInheritedFields(List, Fields), which loads each parent with getInheritableFields() and applies applyInheritance(). Both defaults cover domains and tags only, and neither repository overrode them, so owners were dropped on every list read. A GET by id goes through the per-entity setInheritedFields, which does inherit owners. The existing ITs only covered that path, so the regression went unnoticed.

Fix. Both repositories now override getInheritableFields() to load owners,domains and inherit owners in applyInheritance() before calling super. This is how TableRepository, DatabaseSchemaRepository and StoredProcedureRepository already work.

Effects of the fix:

  • The bulk loader resolves inheritance on the parents it loads, so a test-suite pipeline also gets the table owner through its basic suite.
  • Because super.applyInheritance() also inherits tags, these list reads now pick up propagated tags when tag propagation is on. Other entities already behave this way; the per-entity path for these two still doesn't.

Type of change:

  • Bug fix

High-level design:

N/A — small change: two repository overrides plus tests.

Tests:

Use cases covered

  • Listing test suites returns a basic suite with its table's owner, marked inherited: true.
  • The Data Quality page's search/list returns a basic suite with its table's owner, marked inherited: true.
  • Listing a service's ingestion pipelines returns each pipeline with the service's owner, marked inherited: true.

Unit tests

  • No new unit test. The bulk path needs a fully built repository and DAO collection, and the repo has no unit-level harness for it. The behavior is covered at the HTTP level by the ITs below.
  • The 17 planner-selected unit classes (incl. TestSuiteRepositoryTest, IngestionPipelineRepositoryTest, TestSuiteIndexTest) pass; see the block below.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for the changed list endpoints.
  • Files added/updated:
    • TestSuiteResourceIT: list_basicSuiteInheritsTableOwner, searchList_basicSuiteInheritsTableOwner
    • IngestionPipelineOwnerInheritanceIT: test_listedPipelinesInheritServiceOwner
  • All three failed before the fix and pass with it:
    • table owner missing from [] (both test-suite tests; the search one after its 2-minute wait)
    • Service owner missing from listed pipeline owners [] (pipelines)
  • The existing single-GET tests (test_inheritOwnerFromTable, test_inheritedOwners_fromService) passed in both runs.

Local Java test run: FAILED

  • Commit: bda19964bdd9 (base upstream/main)
  • Finished: 2026-10-15 00:11 UTC · 28.0 min
  • Details: the classes each step ran, why these tests, the commands
Step Scope Classes Tests Failed Skipped Min Result
unit openmetadata-service (17 classes) 17 357 0 0 1.4 passed
integration mysql-elasticsearch · parallel 50 2745 0 194 7.6 passed
integration mysql-elasticsearch · isolated 4 117 0 15 6.7 passed
integration postgres-opensearch · search-it 1 1 1 0 12.3 FAILED

Failed: TestCaseStaleDefinitionReindexIT#brokenTestDefinitionRelationshipIsReportedNotSilentlyDropped(TestNamespace)

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Manual testing performed

No separate manual run. The ITs above make the same HTTP calls a user would, against a real MySQL + Elasticsearch stack:

  1. Set an owner on a table (or a dashboard service) via PUT.
  2. Create the table's basic test suite (or a metadata pipeline for the service).
  3. GET /v1/dataQuality/testSuites?fields=owners&testSuiteType=basic, GET /v1/dataQuality/testSuites/search/list?fields=owners&fullyQualifiedName=<suite fqn>, and GET /v1/services/ingestionPipelines?fields=owners&service=<service fqn> each return the parent's owner with inherited: true. Before the fix they returned owners: [].

UI screen recording:

Not applicable — backend-only fix; no UI code changes.

Checklist:

  • I have read the CONTRIBUTING document.

  • My PR title is Fixes <issue-number>: <short explanation>

  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.

  • I have commented on my code, particularly in hard-to-understand areas. — Not applicable: the overrides follow an existing pattern and need no comment.

  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed. — Not applicable: no schema changes.

  • For a UI feature or feature task: … — Not applicable: backend-only.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • Decision check — Not applicable: this restores existing behavior and adds no new contract, default or rule.

  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

🤖 Generated with Claude Code

… pipeline list reads

TestSuiteRepository and IngestionPipelineRepository name their parent through
getParentReference, which sends list reads down the bulk inheritance path. That
path loads the parent with getInheritableFields() and applies applyInheritance(),
whose defaults cover domains and tags only, so a listed basic suite lost its
table's owners and a listed pipeline lost its service's owners. A GET by id still
inherited them through the per-entity setInheritedFields.

Load owners on the parent and inherit them in applyInheritance, as Table,
DatabaseSchema and StoredProcedure already do. New ITs cover the test suite list,
the test suite search/list used by the Data Quality page, and the pipeline list.
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Oct 14, 2026
@gitar-bot

gitar-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Repository list reads now inherit owners and tags for test suites and ingestion pipelines, which could show incorrect ownership or propagated metadata.

Overrides getInheritableFields() and applyInheritance() in TestSuiteRepository and IngestionPipelineRepository so list reads return inherited owners, matching the per-entity GET path. Owners from the parent table or service now appear on listed test suites and ingestion pipelines marked inherited: true. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@TeddyCr
TeddyCr marked this pull request as ready for review October 14, 2026 23:51
@TeddyCr
TeddyCr requested a review from a team as a code owner October 14, 2026 23:51
@TeddyCr
TeddyCr requested review from mohityadav766 and a balanced review from Copilot October 14, 2026 23:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@TeddyCr

TeddyCr commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Local Java test run: FAILED — details

  • Commit: bda19964bdd9 (base upstream/main)
  • The summary is in the PR description.

Failed: TestCaseStaleDefinitionReindexIT#brokenTestDefinitionRelationshipIsReportedNotSilentlyDropped(TestNamespace)

Tests run locally

  • unit · openmetadata-service (17 classes): DataContractPipelineTokenRefreshTest (6 passed), IngestionLogStreamFactoryTest (11 passed), IngestionPipelineRepositoryTest (43 passed), IngestionPipelineResourceDeleteTest (5 passed), IngestionPipelineResourceStatusTest (1 passed), IngestionPipelineSecretsTest (3 passed), IngestionPipelineSortCursorTest (11 passed), IngestionPipelineStaleQueuedStatusTest (4 passed), IngestionPipelineStatusIndexTest (1 passed), IngestionPipelineTriggeredByTest (3 passed), OpenMetadataConnectionBuilderTest (5 passed), ReindexingUtilDocBuildContextTest (7 passed), RunIngestionPipelineImplTest (7 passed), SearchIndexFactoryTest (215 passed), SearchRepositoryTest (23 passed), TestSuiteIndexTest (7 passed), TestSuiteRepositoryTest (5 passed)
  • integration · mysql-elasticsearch · parallel: 50 classes, 2551 tests executed (listed below)
  • integration · mysql-elasticsearch · isolated: AppsResourceIT (30 passed, 6 skipped), DataContractValidationAppIT (3 passed), TestSuiteReindexIT (1 passed), WorkflowDefinitionResourceIT (68 passed, 9 skipped)
  • integration · postgres-opensearch · search-it: TestCaseStaleDefinitionReindexIT (0 passed, 1 failed)

Per-class counts come from the test reports, which can credit a test to the wrong class when classes run concurrently, and keep only the last run of a nested class that several test classes inherit. The summary's step totals are Maven's own counts.

integration · mysql-elasticsearch · parallel: 51 classes

AutoAssignIncidentIT (4 passed), AutoCloseIncidentIT (141 passed, 11 skipped), BaseEntityIT$ListEntityHistoryByTimestampPaginationTest (19 passed), ConfigResourceIT (12 passed), DataContractPermissionIT (18 passed, 1 skipped), DataContractResourceIT (14 passed), DataQualityDimensionMigrationIT (2 passed), DataQualityDimensionPropagationIT (10 passed), DataQualityLineageIT (21 passed, 5 skipped), DatabaseSmokeIT (1 passed), EntityProfileResourceIT (11 passed), GlossaryTermResourceIT (93 passed, 4 skipped), IncidentGroupsIT (24 passed, 1 skipped), IncidentPaginationIT (71 passed, 7 skipped), IncidentTaskIntegrationIT (2 passed), IncidentTaskNotificationIT (224 passed, 14 skipped), IngestionPipelineAgentTypeIT (11 passed), IngestionPipelineLogStreamIT (30 passed), IngestionPipelineLogStreamingResourceIT (7 passed), IngestionPipelineOwnerInheritanceIT (3 passed), IngestionPipelineProgressStreamIT (1 passed), IngestionPipelineResourceIT (112 passed, 12 skipped), IngestionPipelineSortIT (6 passed), K8sEnvVarSerializationIT (6 passed), K8sOMJobOperatorIT (88 passed, 13 skipped), K8sPipelineEnvVarIT (4 passed), LatestTestCaseResultListingIT (47 passed, 4 skipped), OrphanIngestionPipelineCleanupIT (4 passed), OrphanedTimeSeriesCleanupIT (40 passed, 4 skipped), PipelineStatusAuthorizationIT (10 passed), RunIngestionPipelineForEntityIT (6 passed), SeedDataPresenceIT (8 passed), SoftDeleteRetentionIT (20 passed), SqlTestDecoratorsIT (6 passed), StaleIncidentStatusIT (44 passed, 1 skipped), TableResourceIT (143 passed, 2 skipped), TestCaseCsvDomainIsolationIT (300 passed, 13 skipped), TestCaseDeleteResilienceIT (14 passed), TestCaseExportFilterIT (1 passed), TestCaseLatestStatusIT (428 passed, 53 skipped), TestCaseRelationshipRetentionCleanupIT (23 passed, 1 skipped), TestCaseResolutionStatusLegacyTestSuitesIT (1 passed), TestCaseResourceIT (1 passed), TestCaseResultAuthorizationIT (7 passed), TestCaseSoftDeleteSearchIT (1 passed), TestConnectionDefinitionResourceIT (9 passed), TestDefinitionResourceIT (1 passed), TestSuiteResourceIT (118 passed, 13 skipped), UserResourceIT (82 passed, 7 skipped), WorkflowResourceIT (74 passed, 7 skipped), WorkflowTriggerPermissionsIT (4 passed, 1 skipped)

Why these tests
  • area data-quality ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java
  • area ingestion-pipelines ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IngestionPipelineRepository.java
  • called from entity DataContract ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java
  • called from entity TestCase ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java
  • called from entity TestSuite ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IngestionPipelineRepository.java, openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java
  • changed test ← openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/IngestionPipelineOwnerInheritanceIT.java, openmetadata-integration-tests/src/test/java/org/openmetadata/it/tests/TestSuiteResourceIT.java
  • entity IngestionPipeline ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/IngestionPipelineRepository.java
  • entity TestSuite ← openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TestSuiteRepository.java
  • smoke ← code other than a test class changed
Commands
mvn -B package -pl openmetadata-service -am -Dspring-boot.repackage.skip=true -Dtest=DataContractPipelineTokenRefreshTest,IngestionLogStreamFactoryTest,IngestionPipelineRepositoryTest,IngestionPipelineResourceDeleteTest,IngestionPipelineResourceStatusTest,IngestionPipelineSecretsTest,IngestionPipelineSortCursorTest,IngestionPipelineStaleQueuedStatusTest,IngestionPipelineStatusIndexTest,IngestionPipelineTriggeredByTest,OpenMetadataConnectionBuilderTest,ReindexingUtilDocBuildContextTest,RunIngestionPipelineImplTest,SearchIndexFactoryTest,SearchRepositoryTest,TestSuiteIndexTest,TestSuiteRepositoryTest -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=parallel '-Dit.test=<50 classes>' -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Pmysql-elasticsearch -DintegrationTests.lane=global-state -Dit.test=AppsResourceIT,DataContractValidationAppIT,TestSuiteReindexIT,WorkflowDefinitionResourceIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false
mvn -B verify -pl :openmetadata-integration-tests -am -Dspring-boot.repackage.skip=true -Psearch-it -DdatabaseType=postgres -DsearchType=opensearch -Djpw.data.mode=ingest -Dit.test=TestCaseStaleDefinitionReindexIT -Dfailsafe.failIfNoSpecifiedTests=false -Dtest=NoUnitTestsInThisRun -Dsurefire.failIfNoSpecifiedTests=false

@TeddyCr
TeddyCr added this pull request to the merge queue Oct 15, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-10-16T02:16:43Z)

Blocked the queue: playwright-summary

Failed Playwright tests:

  • Pages/Entity.spec.ts › Inactive Announcement create & delete
  • Pages/ServiceEntity.spec.ts › Inactive Announcement create & delete

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test suites and ingestion pipelines lose inherited owners on list endpoints

3 participants