chore: remove unused lastSuccessfulTime field from CronOMJobStatus - #32780
chore: remove unused lastSuccessfulTime field from CronOMJobStatus#32780detail-app[bot] wants to merge 1 commit into
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
✅ Playwright Results — workflow succeededValidated commit ✅ 557 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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) 45m 41s ⏱️ Max setup 4m 13s · max shard execution 17m 37s · max shard-job elapsed before upload 21m 20s · reporting 4s 🌐 234.87 requests/attempt · 2.82 app boots/UI scenario · 8.61% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Describe your changes:
Removed the
lastSuccessfulTimefield — its@JsonProperty/@JsonFormatannotations, theprivate Instant lastSuccessfulTimedeclaration, and thegetLastSuccessfulTime()/setLastSuccessfulTime()accessors — fromCronOMJobStatusin theopenmetadata-k8s-operatormodule.I worked on removing dead code from the k8s-operator status model because the
lastSuccessfulTimefield has zero callers and is never persisted to Kubernetes.Type of change:
High-level design:
N/A — small change.
Why this is dead code
CronOMJobStatusis the status sub-resource type of theCronOMJobKubernetes Custom Resource (CronOMJobResource extends CustomResource<CronOMJobSpec, CronOMJobStatus>). It exposes four fields via@JsonProperty; of these, onlylastSuccessfulTimeis dead:getLastSuccessfulTime()norsetLastSuccessfulTime()is invoked anywhere in the codebase. The reconciler (CronOMJobReconciler) reads/writeslastScheduleTime,lastOMJobName, andmessagebut never toucheslastSuccessfulTime.CronOMJobReconcilerTest,CRDSchemaValidationTest) or integration tests (K8sOMJobOperatorIT).openmetadata-k8s-operator/src/main/resources/crds/cronomjob-crd.yamldeclareslastScheduleTime,lastOMJobName, andmessageunderstatusbut omitslastSuccessfulTime, so Kubernetes would prune it from the status sub-resource even if it were set.openmetadata-service/.../k8s/README.mdmentions onlylastScheduleTimeandlastOMJobName).Since the field is never written, it always serializes to
nulland carries no behavior. Removing it makes the status model accurately reflect what the operator actually tracks, avoiding the misleading impression that a "last successful time" feature is implemented.Tests:
Use cases covered
No behavioral change — the removed field was never read or written, so no user-visible scenario is affected.
Unit tests
mvn test -pl openmetadata-k8s-operator→ 66 tests, 0 failures, 0 errors (includesCronOMJobReconcilerTestandCRDSchemaValidationTest, both of which constructCronOMJobStatus).Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
mvn compile -pl openmetadata-k8s-operator -q→ success.mvn test -pl openmetadata-k8s-operator -DfailIfNoTests=false→ 66 tests, 0 failures, 0 errors.UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.History
Dead Code PRs can be configured here.