Skip to content

Fixes #37663: keep version author on lifeCycle-only updates (2.0) - #37995

Merged
ulixius9 merged 4 commits into
2.0from
ulixius9/37663-fix-2.0
Nov 18, 2026
Merged

ulixius9 merged 4 commits into
2.0from
ulixius9/37663-fix-2.0

Conversation

@ulixius9

@ulixius9 ulixius9 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37663

Backport of #37977 to 2.0. The three commits are cherry-picked with -x. A lifeCycle PATCH doesn't bump the version, but it was saving usage-bot as the current version's updatedBy/updatedAt. usage-bot's next PATCH in the session then consolidated over ingestion-bot's version and credited its column descriptions to usage-bot ("Authored by"). keepCurrentVersionAttribution() keeps the original author and timestamp in all three no-version-bump store paths.

The only conflict was in DataInsightsEnricherBehaviorIT: 2.0 has no createdAt assertion in that test, so only the updatedAt assertion changes here.

Type of change:

  • Bug fix

High-level design:

N/A — small change; see #37977.

Tests:

Use cases covered

  • ingestion-bot adds a column description, then another principal PATCHes lifeCycle twice within the session window. updatedBy, updatedAt and the columns.name.description changeSummary author all stay ingestion-bot.
  • A lifeCycle-only bulk update keeps the table's existing updatedAt, and the Data Insights daily snapshots stay intact.

Unit tests

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for the changed behavior.
  • ChangeSummaryResourceIT#testLifeCyclePatchesKeepDescriptionAuthor (new)
  • DataInsightsEnricherBehaviorIT#lifecycleOnlyBulkUpdate_keepsExistingTableInBothDailySnapshots (updated)

Run on the 2.0 backport head 34eb250feb6, mysql-elasticsearch, parallel lane:

Run Commit Result
mvn spotless:check -pl openmetadata-service,openmetadata-integration-tests 34eb250feb6 ✅ clean
ChangeSummaryResourceIT (all 5) + DataInsightsEnricherBehaviorIT (all 11) 34eb250feb6 ✅ PASSED, 16/16

Broader checks (full scope) were not run; the merge queue runs them.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Not applicable (no UI changes).

Visual regression baselines

  • Not applicable (no rendering change).

Manual testing performed

None beyond the integration tests above.

UI screen recording:

Not applicable — backend-only bug fix.

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.

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

  • Self-review: same diff as Fixes #37663: keep version author on lifeCycle-only updates #37977, which was reviewed against REVIEW.md; the only change here is the conflict resolution described above.

  • Decision check: N/A — no new contract.

  • I have added a test that covers the exact scenario we are fixing.

RetriggerView in GreptileConfidence Score: 4/5

The behavior change looks sound, but the two outstanding repository requirements must be satisfied before merging.

Findings

  1. P2 Unchanged variables remain mutable ▶
  2. P2 Patch operation strings are duplicated ▶

Summary

Preserves the current version’s author and timestamp when only lifeCycle changes.

  • Lifecycle-only updates keep the current version's author and time.

Reviews (2) · Last reviewed commit: "Merge branch '2.0' into ulixius9/37663-f..." · Reviewed by Greptile

A lifeCycle PATCH does not bump the version, but it restamped the current
version's updatedBy/updatedAt. usage-bot then looked like the author of the
ingestion-bot version, so its next PATCH in the session consolidated over that
version and re-attributed the column description change summary to usage-bot.

(cherry picked from commit de72c1a)
DataInsightsEnricherBehaviorIT asserted updatedAt moved on a lifeCycle-only
bulk update; it now stays on the current version, so assert that instead.

(cherry picked from commit 86777c2)
@ulixius9
ulixius9 requested a review from a team as a code owner November 17, 2026 14:33
@ulixius9
ulixius9 requested review from TeddyCr and removed request for a team November 17, 2026 14:33
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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.

@gitar-bot

gitar-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Changing audit attribution for lifecycle-only updates may affect who is credited for later consolidated column-description changes.

Keeps the original version author and timestamp on lifeCycle-only updates across the three no-version-bump store paths, so a follow-up PATCH no longer reattributes ingestion-bot's column descriptions to usage-bot. 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

Comment on lines +289 to +290
Table table = createTestTableWithColumns(ns);
Table described =

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.

P2 Unchanged variables remain mutable

The new test and helpers omit final from locals and parameters that never change. The Java guide requires it. Add final to these declarations, including table, described, afterUsage, and the helper parameters. This repository requirement must be satisfied before merging.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Map<String, Object> lifeCycle = Map.of("accessed", Map.of("timestamp", timestamp));
return SdkClients.adminClient()
.tables()
.patch(table.getId(), jsonPatch("add", "/lifeCycle", lifeCycle));

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.

P2 Patch operation strings are duplicated

Both new calls to jsonPatch repeat "add". The Java guide requires a named constant when a string appears more than once. Define one constant and use it in both calls. This repository requirement must be satisfied before merging.

Context Used: CLAUDE.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@ulixius9
ulixius9 merged commit 9911bcd into 2.0 Nov 18, 2026
36 of 38 checks passed
@ulixius9
ulixius9 deleted the ulixius9/37663-fix-2.0 branch November 18, 2026 07:38
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.

2 participants