chore(store): remove dead clock param + fix broken main (transactionRunner in two purger tests)#59
Open
endrju19 wants to merge 2 commits into
Open
chore(store): remove dead clock param + fix broken main (transactionRunner in two purger tests)#59endrju19 wants to merge 2 commits into
endrju19 wants to merge 2 commits into
Conversation
Repairs a broken main from a semantic merge collision between #55 and #54. #55 added two OutboxPurger tests while transactionRunner was still nullable; #54 (merged separately) made transactionRunner required but never saw those two tests. Each PR was green against its own base, but the merged result fails :okapi-core:compileTestKotlin ("No value passed for parameter 'transactionRunner'"). Adds the missing transactionRunner = noOpTransactionRunner() to both call sites.
… stores clock became unused after #58 (the lag-gauge fix replaced the per-status clock.instant() pre-seed with an empty map); the stores derive no timestamps from a clock. Removes the parameter and its java.time.Clock import from both adapters, drops the now-pointless clock pass-through from the two okapi-spring-boot store bean factories, and updates all store construction sites (benchmarks + integration tests) to the single-arg form. clock that still feeds OutboxPublisher / OutboxEntryProcessor / OutboxProcessor / MicrometerOutboxMetrics is left untouched. Breaking change (direct constructor users who passed an explicit clock) documented in CHANGELOG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two related changes in one PR. The first is an urgent fix —
maincurrently does not compile its tests.1. fix: repair broken
main(commit 1)./gradlew :okapi-core:compileTestKotlinfails onmainright now:Cause — a semantic merge collision between #55 and #54:
OutboxPurgertests whiletransactionRunnerwas still nullable, so they didn't pass it.transactionRunnerrequired and updated every call site it could see — but it never saw fix(purger): preserve partial-batch progress in error log on mid-loop failure #55's two new tests (different unmerged branch).This would have been caught by GitHub's "Require branches to be up to date before merging" (or a merge queue) — worth enabling.
Fix: add the missing
transactionRunner = noOpTransactionRunner()to both call sites (the helper already exists in the file and is used by the other 7 purger tests).2. chore: remove dead
clockfrom the stores (commit 2)clockbecame unused inPostgresOutboxStore/MysqlOutboxStoreafter #58 — that PR replaced thefindOldestCreatedAtper-statusclock.instant()pre-seed with an empty map, so the stores no longer read a clock at all. (clockwas in the stores only to feed that pre-seed, since the very first commit.)clockconstructor parameter +java.time.Clockimport from both adapters.clockpass-through from the twookapi-spring-bootstore bean factories (outboxStore()).PostgresOutboxStore(connectionProvider).clockthat still feedsOutboxPublisher/OutboxEntryProcessor/OutboxProcessor/MicrometerOutboxMetrics— those components legitimately take a clock. (Verified no staleclockreference, import, comment, or name remains.)Breaking change (documented in CHANGELOG): only affects direct constructor users who passed an explicit clock —
PostgresOutboxStore(connectionProvider, clock)must drop the second arg. The usualPostgresOutboxStore(connectionProvider)form is unchanged; Spring Boot users are unaffected.Test plan
./gradlew testClasses— all main + test + jmh sources compile (was failing onmain)./gradlew ktlintCheck— green (no orphaned imports)./gradlew :okapi-core:test :okapi-spring-boot:test— green (purger tests + autoconfig wiring)./gradlew :okapi-integration-tests:test --tests "*PostgresOutboxStoreTest" --tests "*MysqlOutboxStoreTest"— green (both adapters against real Postgres + MySQL via Testcontainers)