Repository navigation
Fixes #37663: keep version author on lifeCycle-only updates (2.0) - #37995
Conversation
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)
(cherry picked from commit 50b4a4a)
❌ PR checklist incompleteThis 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 |
Code Review ✅ Approved 🟡 Medium riskChanging 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. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
| Table table = createTestTableWithColumns(ns); | ||
| Table described = |
There was a problem hiding this comment.
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)); |
There was a problem hiding this comment.
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!
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'supdatedBy/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.0has nocreatedAtassertion in that test, so only theupdatedAtassertion changes here.Type of change:
High-level design:
N/A — small change; see #37977.
Tests:
Use cases covered
lifeCycletwice within the session window.updatedBy,updatedAtand thecolumns.name.descriptionchangeSummary author all stay ingestion-bot.updatedAt, and the Data Insights daily snapshots stay intact.Unit tests
Backend integration tests
openmetadata-integration-tests/for the changed behavior.ChangeSummaryResourceIT#testLifeCyclePatchesKeepDescriptionAuthor(new)DataInsightsEnricherBehaviorIT#lifecycleOnlyBulkUpdate_keepsExistingTableInBothDailySnapshots(updated)Run on the
2.0backport head34eb250feb6, mysql-elasticsearch, parallel lane:mvn spotless:check -pl openmetadata-service,openmetadata-integration-tests34eb250feb6ChangeSummaryResourceIT(all 5) +DataInsightsEnricherBehaviorIT(all 11)34eb250feb6Broader checks (full scope) were not run; the merge queue runs them.
Ingestion integration tests
Playwright (UI) tests
Visual regression baselines
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.
The behavior change looks sound, but the two outstanding repository requirements must be satisfied before merging.
Findings
Summary
Preserves the current version’s author and timestamp when only
lifeCyclechanges.Reviews (2) · Last reviewed commit: "Merge branch '2.0' into ulixius9/37663-f..." · Reviewed by Greptile