Skip to content

[2.1] Fixes #38002: Serve certification with both dates on every read; profiler skips unparseable tables - #38562

Merged
yan-3005 merged 2 commits into
2.1from
backport/2.1/pr-38257
Nov 24, 2026
Merged

yan-3005 merged 2 commits into
2.1from
backport/2.1/pr-38257

Conversation

@gh-bot-collate

Copy link
Copy Markdown

Automated backport of #38257 to 2.1.

Source PR #38257
Author @Vamsi-klu
Merge commit 5b5cb590bcdd231cb23895f4aa587db75eddfbe3
Method Conflicts resolved by Claude — worth a read of the diff.

Resolution notes

Backport notes: PR #38257 → 2.1

Conflict

openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TableRepository.java conflicted
in addDataModel, at the dao.update(...) call the PR touches.

The PR's actual change there is a one-line swap:

- dao.update(table.getId(), table.getFullyQualifiedName(), JsonUtils.pojoToJson(table));
+ dao.update(table.getId(), table.getFullyQualifiedName(), serializeForStorage(table));

(serializeForStorage already exists on 2.1 — it came in cleanly via the EntityRepository.java
side of this same cherry-pick.)

The conflict itself wasn't caused by this change: on main, the line immediately after is
storePendingGlossaryTerms(heldTerms, updatedBy);, part of unrelated "pending glossary term" logic
that doesn't exist in 2.1's addDataModel (no heldTerms/updatedBy locals, no
storePendingGlossaryTerms call anywhere in this method on this branch). Git pulled that adjacent
line into the conflict hunk even though it isn't part of PR #38257.

Resolution

Applied only the serializeForStorage(table) swap and left everything else in addDataModel
(including the surrounding comment block) exactly as it is on 2.1. Did not introduce
storePendingGlossaryTerms/heldTerms — that functionality is out of scope for this backport and
depends on code not present on 2.1.

What to check by hand

  • Confirm addDataModel on 2.1 still reads as before, just with serializeForStorage(table) in
    place of JsonUtils.pojoToJson(table).
  • All other files in this cherry-pick (EntityRepository.java, the ingestion profiler/ometa changes,
    the new CertificationWithoutExpiryIT.java, the ADR, and the test updates) applied without
    conflicts — worth a normal review pass but nothing was hand-resolved there.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #38257 is asked to look.

resolver run

…iler skips unparseable tables (#38257)

* Fixes #38002: serve certification with both dates on every read

A certification is read from any tag_usage row under the configured
classification, but only rows written through validateAndStampCertification
carry an expiry. Tags on create, dbt dataModel tags, a classification switch
and the 1.12.5 migration leave it out, so typed clients (the Python
AssetCertification requires expiryDate) reject the entity.

- The read builder derives a missing expiry as appliedDate + the configured
  validityPeriod (the stamping arithmetic, now shared through expiryFor); a
  missing appliedAt reads as the epoch. The batch list path uses the same
  builder instead of its inline copy.
- Bulk reads load certification whenever tags or certification is requested,
  as setFieldsInternal does, and clear it otherwise, so a stale inline copy in
  the entity row is never served (the profiler lists with fields=tags).
- addDataModel and the CSV change-event write go through serializeForStorage,
  so they stop storing certification inline.
- A Redis read-bundle entry whose certification lacks a date is treated as not
  loaded and rebuilds itself.

ADR:2026-11-20-certification-reads-derive-a-missing-expiry-from-the-validity-period

* Fixes #38002: profiler skips and reports a table it cannot parse

One table the client cannot parse (a certification served without the
expiryDate its model requires, by a server without the fix) failed the whole
list page, and the profiler dropped every table from that page to the end of
the database.

list_entities and list_all_entities take an optional on_skip hook, called for
each element skip_on_failure drops. The profiler lists tables with
skip_on_failure=True and records each skipped table in status.failed with its
FQN, so the run summary still counts it.

(cherry picked from commit 5b5cb59)
@gh-bot-collate
gh-bot-collate Bot requested review from a team as code owners November 24, 2026 08:28
@gh-bot-collate
gh-bot-collate Bot requested review from ulixius9 and removed request for a team November 24, 2026 08:28
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Nov 24, 2026
@gh-bot-collate

Copy link
Copy Markdown
Author

🤖 This backport will not merge itself: 2.1 has no required status checks, so there is nothing for auto-merge to wait on. Merge it by hand once CI is green.

# Conflicts:
#	openmetadata-service/src/main/java/org/openmetadata/service/jdbi3/TableRepository.java
@yan-3005

Copy link
Copy Markdown
Contributor

Merged the latest 2.1 in (fc473bc) to clear the conflict in TableRepository.addDataModel: #38511 had just added storePendingGlossaryTerms next to the dao.update this PR switches to serializeForStorage. Resolved to match main (both lines). The rest of the backport is line-for-line identical to #38257 on main. Verified on the merged 2.1 code (MySQL + Elasticsearch): EntityRepositoryCertificationTest 46 + BundleWarmupCertificationBackfillTest 5 (51/0); CertificationWithoutExpiryIT 15/0, TableResourceIT 168/0.

@yan-3005
yan-3005 merged commit 69b4f42 into 2.1 Nov 24, 2026
34 of 35 checks passed
@yan-3005
yan-3005 deleted the backport/2.1/pr-38257 branch November 24, 2026 13:53
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.

3 participants