Skip to content

Fixes open-metadata/openmetadata-collate#5995: remove external S3 sample-data storage support - #33143

Open
akashverma0786 wants to merge 17 commits into
mainfrom
fix-5995
Open

akashverma0786 wants to merge 17 commits into
mainfrom
fix-5995

Conversation

@akashverma0786

Copy link
Copy Markdown
Collaborator

Summary

Removes external S3 sample-data storage support per open-metadata/openmetadata-collate#5995.

  • Schema (connectionBasicType.json): stripped bucketName, prefix, filePathPattern, overwriteData, and the AWS S3 branch (with its awsCredentials.json ref) from the shared dataStorageConfig definition. sampleDataStorageConfig itself — the on/off toggle every connector $refs — is untouched.
  • Ingestion: deleted sample_data_handler.py (the Parquet-to-S3 upload path), the upload_sample_storage_config wiring in sampler_config.py/sampler_interface.py, and the orphaned get_storage_config_for_table/get_sample_storage_config helpers in sampler/config.py.

All of the removed ingestion code had zero callers anywhere in the codebase — confirmed by repo-wide grep and by live instrumentation against a real metadata classify run (MySQL source, MinIO as the configured S3 target): upload_sample_storage_config was always None at runtime, upload_sample_data() was never entered even with a fully valid, reachable S3 config set.

What's retained, verified live (same MinIO test)

  • storeSampleData / readSampleData — unaffected
  • OpenMetadata-hosted sample data (Table sampleData, the Sample Data tab) — unaffected; populated correctly with S3 config set and with it removed
  • Classification sampling — unaffected

Test plan

  • ruff check clean on all touched files
  • Existing unit tests updated (test_sampler_interface.py — dropped the two tests exercising the deleted S3-upload branch) and passing (20/20)
  • Real ingestion: MySQL → OpenMetadata via metadata classify, with a valid S3/MinIO sampleDataStorageConfig set — before and after this change, MinIO bucket stayed empty, OM's own sample data populated correctly
  • make generate + mvn clean install -pl openmetadata-spec to regenerate Java/Python/TS models from the schema change (not yet run in this PR)

…ple-data storage support

Strip the AWS S3 branch and its bucket/prefix/path-pattern/credential fields
from the shared sample-data storage schema, and delete the now-dead ingestion
code that read them: the upload_sample_storage_config wiring, the whole
sample_data_handler.py upload path, and the orphaned
get_storage_config_for_table/get_sample_storage_config helpers (zero callers,
confirmed by grep and by live instrumentation against a real MySQL + MinIO run).

OpenMetadata-hosted sample-data storage, storeSampleData/readSampleData, and
classification sampling are unaffected — verified live: with S3 config fully
set, OM's own sample data still populated and MinIO received zero writes,
both before and after this change.
@akashverma0786
akashverma0786 requested a review from a team as a code owner September 10, 2026 13:28
@akashverma0786 akashverma0786 added the safe to test Add this label to run secure Github workflows on PRs label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

  • Linked issue open-metadata/openmetadata-collate#5995 does not exist or is not accessible.

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.

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/, public/jsons/) have been automatically updated
based on JSON schema changes in this PR.

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Too many files changed for review (111 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 758 → 758
- 0 added, 0 removed, 13 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/constant/config.ts
  openmetadata-ui/src/main/resources/ui/playwright/constant/service.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DashboardServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/MessagingServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/fixtures/base.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/service.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/serviceIngestion.ts
  … and 3 more

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

The Python checkstyle failed.

Please run make py_format and py_format_check in the root of your repository and commit the changes to this PR.
You can also use pre-commit to automate the Python code formatting.

You can install the pre-commit hooks with make install_test precommit_install.

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.85% (102455/140632) 57.58% (61982/107632) 58.83% (20351/34589)

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🔴 Playwright Results — workflow failed

Validated commit cdf9a010dc879af9696fabe1f2ffd20bca48d9d6 in Playwright run 34978033348, attempt 1.

✅ 4502 passed · ❌ 1 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Action needed: test(s) failed on every attempt against this PR’s validated commit — see Genuine Failures below. These are test failures, not CI budget or infrastructure issues.

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 55m 33s

⏱️ Max setup 4m 12s · max shard execution 22m 43s · max shard-job elapsed before upload 25m 54s · reporting 20s

🌐 221.15 requests/attempt · 2.23 app boots/UI scenario · 46.59% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 46.59% (convergence target: at most 15%).
  • Browser traffic was 221.15 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (10702 boots / 4795 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 158 0 0 0 0 0
✅ Shard chromium-02 149 0 0 0 0 0
✅ Shard chromium-03 168 0 0 0 0 0
✅ Shard chromium-04 152 0 0 0 0 0
🟡 Shard chromium-05 204 0 1 0 0 0
✅ Shard chromium-06 136 0 0 0 0 0
✅ Shard chromium-07 165 0 0 0 0 0
✅ Shard chromium-08 176 0 0 0 0 0
🟡 Shard chromium-09 167 0 1 0 0 0
✅ Shard chromium-10 168 0 0 0 0 0
✅ Shard chromium-11 158 0 0 0 0 0
✅ Shard chromium-12 179 0 0 0 0 0
✅ Shard chromium-13 177 0 0 0 0 0
🔴 Shard chromium-14 160 1 1 0 0 0
✅ Shard chromium-15 170 0 0 0 0 0
✅ Shard chromium-16 158 0 0 0 0 0
✅ Shard chromium-17 157 0 0 0 0 0
🟡 Shard chromium-18 148 0 1 0 0 0
✅ Shard chromium-19 141 0 0 0 0 0
✅ Shard chromium-20 146 0 0 0 0 0
✅ Shard chromium-21 159 0 0 1 0 0
🟡 Shard chromium-22 204 0 1 0 0 0
🟡 Shard chromium-23 165 0 1 0 0 0
✅ Shard chromium-24 179 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 114 0 0 0 0 0
✅ Shard import-export-02 36 0 0 0 0 0
✅ Shard ingestion-01 45 0 0 0 0 0
✅ Shard ingestion-02 49 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

Genuine Failures (failed on all attempts)

Flow/ConnectionConfigLayout.spec.tsshould hide the fieldless sample data storage config and keep advanced fields aligned (shard chromium-14)
�[31mTest timeout of 60000ms exceeded.�[39m
🟡 6 flaky test(s) (passed on retry)
  • Features/ContextCenterArticles.spec.tsdescription: switching articles does not bleed unsaved content into next article (shard chromium-05, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.tsColumn lineage for searchIndex -> dashboard (shard chromium-09, 1 retry)
  • Features/ActivityFeed.spec.tsAll badge, header and rendered list agree on the count (shard chromium-14, 1 retry)
  • Features/GlobalPageSize.spec.tsPage size should persist across different pages (shard chromium-18, 1 retry)
  • Pages/ExplorePageRightPanel.spec.tsShould perform CRUD and Removal operations for dashboardDataModel (shard chromium-22, 1 retry)
  • Pages/ExploreTree.spec.tsCopy field link should have valid URL format for APIEndpoint (shard chromium-23, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

akashverma0786 and others added 2 commits September 10, 2026 21:17
Collapsing storageConfig to a plain empty object routed it away from
CoreOneOfField into the generic object-field template, whose
shouldRenderNullTemplate returns null for any non-root object with zero
properties and additionalProperties:false — the "OpenMetadata Storage"
placeholder rendered as nothing under Sample Data Storage Config.

Wrapping it back in a single-item oneOf routes it through CoreOneOfField
instead, which renders the branch title even with one option (no dropdown,
per its own test coverage) rather than going through the null-returning path.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/, public/jsons/) have been automatically updated
based on JSON schema changes in this PR.

akashverma0786 and others added 2 commits September 12, 2026 11:21
…d S3-removal migration

- Flatten sampleDataStorageConfig.config to a top-level [No Sample Data Storage
  Config, OpenMetadata Storage] dropdown and delete the vestigial dataStorageConfig
  nesting. The prior single-branch storageConfig oneOf rendered no selector and an
  empty panel; the flattened two-option dropdown shows a real, selectable choice.
- Drop the now-unused DataStorageConfig plumbing from the TimescaleDB sampler.
- Add a MySQL+Postgres migration stripping the legacy S3 sampleDataStorageConfig
  shape from stored service/profiler configs (backward-compat; never writes externally).
- Update the ConnectionConfigLayout Playwright test to the no-S3 form.
- Regenerate dereferenced connection schemas (public jsons).
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 758 → 756
- 0 added, 2 removed, 0 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/fields/CoreOneOfField.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/templates/CoreObjectFieldTemplate.tsx

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@github-actions

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/, public/jsons/) have been automatically updated
based on JSON schema changes in this PR.

akashverma0786 and others added 3 commits September 13, 2026 13:25
# Conflicts:
#	.github/playwright/impact-map.generated.json
#	bootstrap/sql/migrations/native/2.1.0/mysql/postDataMigrationSQLScript.sql
#	bootstrap/sql/migrations/native/2.1.0/postgres/postDataMigrationSQLScript.sql
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 775 → 773
- 0 added, 2 removed, 0 changed spec-list

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/fields/CoreOneOfField.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/FormBuilderV1/templates/CoreObjectFieldTemplate.tsx

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

akashverma0786 and others added 4 commits September 13, 2026 13:51
no-positional-locator suppressions total is 1241 after prior fixes,
but the test still asserted the pre-fix count of 1243.
lodash startCase splits OpenMetadata into Open Metadata at the
lower-to-upper boundary, so the sampleDataStorageConfig oneOf option
titled "OpenMetadata Storage" rendered as "Open Metadata Storage".
Playwright's exact-text option lookup never matched, timing out.
After external S3 sample-data storage was removed, sampleDataStorageConfig.config
was left as a oneOf with two structurally identical empty branches ("No Sample Data
Storage Config" and "OpenMetadata Storage") — an invalid oneOf that also renders a
redundant, do-nothing selector. Collapse it to a single empty "OpenMetadata Storage"
object.

OpenMetadata-hosted storage has no settable fields, so hide the now-fieldless
sampleDataStorageConfig group from every connection form via DEF_UI_SCHEMA (same
pattern as policyAgentConfig); the empty box no longer renders.

Update the connection-config E2E to assert the field is hidden, and drop the
OpenMetadata label fix and its unit test that only existed to render the now-hidden
"OpenMetadata Storage" option.
@github-actions

Copy link
Copy Markdown
Contributor

✅ Generated Sources Auto-Updated

The generated TypeScript types (src/generated/) and dereferenced JSON
schemas (src/jsons/, public/jsons/) have been automatically updated
based on JSON schema changes in this PR.

@gitar-bot

gitar-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Removes external S3 sample-data storage support by stripping S3 fields from dataStorageConfig, deleting the unused sample_data_handler.py upload path, and cleaning up orphaned ingestion code. The sampleDataStorageConfig oneOf has two identical empty branches, which has been collapsed. Live testing confirms OpenMetadata-hosted sample data and classification sampling remain unaffected. No issues found.

✅ 1 resolved
Bug: sampleDataStorageConfig oneOf has two identical empty branches

📄 openmetadata-spec/src/main/resources/json/schema/entity/services/connections/connectionBasicType.json:126-139 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Flow/ConnectionConfigLayout.spec.ts:411-414
After stripping the S3 fields, the config oneOf now contains two structurally identical schemas — "No Sample Data Storage Config" and "OpenMetadata Storage", both just {"type":"object","additionalProperties":false}. Any value (including the empty {} that "OpenMetadata Storage" now produces) validates against BOTH branches, so a strict oneOf validator (exactly-one-match) rejects it. This also contradicts the commit title ("keep storageConfig as a single-branch oneOf") and the test comment claiming the selector "offers only the fieldless 'OpenMetadata Storage' choice" — the dropdown actually shows two options that behave identically. Collapse to a single branch (or remove the oneOf and keep one object schema) so the stored config is unambiguous.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

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

Labels

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