Skip to content

Conversation

@harshach
Copy link
Collaborator

@harshach harshach commented Nov 26, 2025

Describe your changes:

This PR implements input and output port functionality for Data Products to support Data Mesh architecture patterns. Data products can now explicitly declare which data assets they consume (input ports) and which data assets they produce or expose (output ports).


Summary by Gitar

Data Model & Schema Changes:

  • Added inputPorts and outputPorts fields to DataProduct entity as EntityReference lists
  • Introduced new relationship types INPUT_PORT and OUTPUT_PORT in entityRelationship.json
  • Updated Elasticsearch mappings across all languages (en, jp, ru, zh) to index port metadata

Backend Implementation:

  • Implemented relationship-based storage in DataProductRepository with bulk operations (add/remove input/output ports)
  • Added REST API endpoints: PUT /dataProducts/{name}/inputPorts/{add|remove} and PUT /dataProducts/{name}/outputPorts/{add|remove}
  • Integrated port data into search indexes with proper field exclusions and change event generation

SDK & Client Support:

  • Java SDK: Added fluent API methods in DataProducts class for port management
  • Python SDK: Implemented port operations in domain_mixin and dataproducts modules

Testing Coverage:

  • 15+ new test methods covering CRUD operations, bulk operations, field-based retrieval, and search propagation
  • Tests validate multiple entity types as ports (tables, topics, dashboards, pipelines)

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • The issue properly describes why the new feature is needed, what's the goal, and how we are building it. Any discussion
    or decision-making process is reflected in the issue.
  • I have updated the documentation.
  • I have added tests around the new logic.

@github-actions
Copy link
Contributor

TypeScript types have been updated based on the JSON schema changes in the PR

@github-actions github-actions bot requested a review from a team as a code owner November 26, 2025 02:58
@gitar-bot
Copy link

gitar-bot bot commented Nov 26, 2025

CI failed for 478fac5: Both Trivy build-and-scan jobs failed due to disk space exhaustion on CI runners - this is an infrastructure issue unrelated to the PR changes.

Issue

Both build-and-scan CI jobs (56415225010 and 56415225106) failed during Trivy security scanning with identical errors.

Root Cause

Disk space exhaustion on the GitHub Actions runner:

FATAL Fatal error run error: image scan error: scan error: scan failed: 
failed analysis: analyze error: pipeline error: failed to analyze layer: 
unable to get uncompressed layer: failed to get the layer: unable to populate: 
unable to open: failed to copy the image: 
write /tmp/trivy-14953/docker-export-3682722584: no space left on device

Details

  • Job 56415225010: Failed writing to /tmp/trivy-14953/docker-export-3682722584
  • Job 56415225106: Failed writing to /tmp/trivy-14311/docker-export-3872610031
  • Both failures occurred during Docker image layer analysis by Trivy
  • The CI runner's /tmp directory ran out of available disk space while extracting and scanning container image layers

Relationship to PR Changes

This failure is NOT related to the PR changes. This PR modifies:

  • Data Product backend functionality (Java services)
  • Python SDK for data products
  • JSON schemas and TypeScript type definitions
  • Elasticsearch index mappings

None of these changes affect Docker image building, Trivy scanning behavior, or CI runner disk usage.

Suggested Fix

The solution is to retry the CI jobs, as this is a transient infrastructure issue. The CI runner may have been in a degraded state or had accumulated temporary files from previous builds. A fresh runner should have sufficient disk space.

Reply with Gitar please fix to apply these suggestions.
Auto-apply is off - enable it here to let Gitar commit future updates automatically.
Did we get this right? 👍 / 👎 to help improve future analysis.

@github-actions
Copy link
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.49% (49658/78218) 40.54% (23692/58447) 44.37% (7532/16974)

@sonarqubecloud
Copy link

@gitar-bot
Copy link

gitar-bot bot commented Nov 28, 2025

🔍 CI failure analysis for 998c891: Playwright retry completed for both shards with improved results: 3 failed tests reduced to 2, with 96.2% overall pass rate. Python type checking remains the only PR-related issue.

Issue

Playwright retry completed for shard 6/6:

  • Retry run (6, 6) - Job 56602797956: 2 failed, 5 flaky, 356 passed

Root Cause

Playwright Retry Results - BOTH SHARDS IMPROVED

Shard 3/6 Comparison:

  • Initial: 1 failed, 3 flaky, 403 passed
  • Retry: 1 failed, 2 flaky, 404 passed
  • ✓ Improvement: 1 flaky test now passing consistently

Shard 6/6 Comparison:

  • Initial: 3 failed, 4 flaky, 356 passed
  • Retry: 2 failed, 5 flaky, 356 passed
  • ✓ Improvement: 1 failed test (TestSuite) now passing on retry (marked flaky)

Combined Impact:

  • Total initial: 4 failed, 7 flaky, 759 passed (95.8%)
  • Total retry: 3 failed, 7 flaky, 760 passed (96.2%)
  • ✓ 1 fewer persistent failure
  • ✓ 1 more test passing
  • ✓ Pass rate improved: 95.8% → 96.2%

Analysis:

  1. Retry validated flakiness: The improvement across both shards confirms these are environmental/timing issues, not code problems.

  2. Test variability: TestSuite test moved from "failed" to "flaky" status, demonstrating inconsistent behavior characteristic of environmental issues.

  3. All failures unrelated to PR:

    • ServiceForm: Service name validation
    • AutoPilot (2 tests): Service creation and status checks
    • No connection to Data Product input/output ports
  4. High overall reliability: 96.2% pass rate with 760/790 non-flaky tests passing.

Details

Retry Results - Shard 6/6
2 failed:
  - AutoPilot.spec.ts:95:11 (Mysql)
    Create Service and check AutoPilot status
  - AutoPilot.spec.ts:95:11 (Airflow)
    Create Service and check AutoPilot status

5 flaky (passed on retry):
  - ServiceEntity.spec.ts:156:5
    Dashboard Service > Inactive Announcement create & delete
  - TestSuite.spec.ts:62:5
    Logical TestSuite (was "failed" in initial run)
  - Users.spec.ts:429:3
    Check permissions for Data Steward
  - Users.spec.ts:831:3
    Default persona change and removal
  - EntityVersionPages.spec.ts:152:5
    Entity Version pages > Spreadsheet

356 passed (1.2h)
Combined Retry Summary

Persistent failures across retry (3 total):

  • Shard 3/6: ServiceForm validation (1)
  • Shard 6/6: AutoPilot Mysql & Airflow (2)

Flaky tests across retry (7 total):

  • Shard 3/6: ExploreDiscovery tests (2)
  • Shard 6/6: ServiceEntity, TestSuite, Users (2), EntityVersionPages (5)

Pass rate: 96.2% (760/790 non-flaky tests)

Combined CI Status

Python Type Checking (3 failures - Related - MUST FIX):

  • Requires cast() annotations in dataproducts.py lines 149 & 178

Playwright E2E (Improved):

  • Both shards retried with improved results
  • 4 failed → 3 failed, 759 passed → 760 passed
  • All failures unrelated to PR changes

Maven PostgreSQL CI (1 failure - Unrelated):

  • Known concurrent update bug detection test

Infrastructure (4 failures - Unrelated):

  • Trivy, Maven Collate, Python 3.12 issues

Suggested Fix

For Python Type Checking (must fix before merge):

from typing import Any, Dict, List, cast

# Line 149:
payload = {
    "assets": [
        cast(Dict[str, Any], port.model_dump(mode="json", exclude_none=True))
        for port in ports
    ]
}

# Line 178:
payload = {
    "assets": [
        cast(Dict[str, Any], asset.model_dump(mode="json", exclude_none=True))
        for asset in assets
    ]
}

For Playwright Tests:

The retry across both shards demonstrated clear improvement, validating that failures are environmental. The 3 persistent failures (ServiceForm, AutoPilot Mysql/Airflow) should not block this PR as they're completely unrelated to Data Product ports functionality.

Gitar Rules 🎸 2 actions taken

Gitar Rules

🎸 Flaky Test Auto-Retry: Both shards retried with improved results (96.2% pass rate)
🎸 PR Summary Enhancement: Comprehensive summary exists and remains accurate
  • Auto-apply suggestions - Allow Gitar to commit updates to this branch

Tip

Comment Gitar fix CI or enable auto apply.

Was this helpful? React with 👍 / 👎 | This comment will update automatically (Docs)

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

Labels

backend 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.

2 participants