Skip to content

Fixes #38719: _get_fields (and TABLE_FIELDS/TAGS_FIELD it combines) is unused dead code - #38885

Merged
stout-yeoman merged 1 commit into
mainfrom
agent/issue-38719
Nov 30, 2026
Merged

stout-yeoman merged 1 commit into
mainfrom
agent/issue-38719

Conversation

@TeddyCr

@TeddyCr TeddyCr commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

This pull request was opened by an olivaw agent. It is an input to review, not an approved change — read the diff, not this description.

Fixes #38719

What olivaw checked (machine-observed, §8.2/A.1)

  • diff: non-empty
  • build: not_run
  • tests: not_run
  • base: fee94541294a7fa7d71575d1c2b0ee2bce4a35db
  • head: ea7cda3457ce1ad865e2b5abe5b495387a373ae2

No build or test command is configured for this workspace, so only the diff's existence was checked. Set run_config.build_cmd/test_cmd to have olivaw verify its own work.

What the agent says it did (unverified)

Done. Committed as ea7cda3 on agent/issue-38719.

What I verified before deleting

  • A repo-wide grep for _get_fields, TABLE_FIELDS, and TAGS_FIELD turned up only the definitions themselves in ingestion/src/metadata/profiler/source/metadata.py:50-51,105. Every other hit is unrelated Java/TypeScript code with coincidentally identical names.
  • Table fetching does now live in DatabaseFetcherStrategy._get_table_entities, which passes its own module-level FIELDS = ["tableProfilerConfig", "columns", "customMetrics", "tags"] (ingestion/src/metadata/profiler/source/fetcher/fetcher_strategy.py:61,280) — so the issue's account of how the method got orphaned holds.
  • The four modules that import this one (sampler/processor.py, workflow/profiler.py, and two profiler unit tests) reference none of the removed symbols.

What I changed: removed _get_fields and the two constants. 7 lines, nothing else.

Decisions I made

  • I left self.source_config in place. Removing _get_fields took away its only reader in this file, but it is a conventional public attribute on every Source subclass here, and its type annotation is what documents which pipeline configs this source accepts. Deleting it would reach past what the issue asked for.
  • I did not touch the behavioral discrepancy the issue mentions in passing — that FIELDS in fetcher_strategy.py requests "tags" unconditionally, where the dead method had gated it on processPiiSensitive. Whether always fetching tags is correct (likely yes: tags is now needed beyond PII classification) or a regression worth narrowing is a behavior question, not dead-code cleanup, and changing it would alter what the profiler requests from the server. Worth a separate issue if someone wants it revisited.

Verification limits: python3 -m py_compile passes on the edited file. I could not run ruff or the profiler unit tests — neither ruff nor the project's Python dependencies are installed in this environment. The change is a pure deletion of unreferenced code, so the compile check plus the grep above is the available evidence; I did not execute the test suite.

…source

OpenMetadataSource._get_fields() and the TABLE_FIELDS/TAGS_FIELD constants
it alone consumed became orphaned once table fetching moved into
EntityFetcher/FetcherStrategy, which uses its own FIELDS constant in
fetcher_strategy.py. Nothing in the tree referenced them, so drop them.

Co-Authored-By: Claude Opus 5 <[email protected]>
@TeddyCr
TeddyCr requested a review from a team as a code owner November 26, 2026 16:03
@TeddyCr
TeddyCr requested review from stout-yeoman and a balanced review from Copilot November 26, 2026 16:03
@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.

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 insufficient remaining quota.

@gitar-bot

gitar-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

Removing the unused profiler field helper and constants leaves executable behavior unchanged, limiting this cleanup to dead-code removal.

Removes the unused _get_fields method and its TABLE_FIELDS and TAGS_FIELD constants from the profiler OpenMetadata source, since table fetching now lives in DatabaseFetcherStrategy. 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

@stout-yeoman
stout-yeoman merged commit ac9aa51 into main Nov 30, 2026
36 of 37 checks passed
@stout-yeoman
stout-yeoman deleted the agent/issue-38719 branch November 30, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

_get_fields (and TABLE_FIELDS/TAGS_FIELD it combines) is unused dead code

3 participants