Skip to content

Remove dead code and run testInsertWorkflowStatusValidation - #598

Merged
devhawk merged 2 commits into
mainfrom
remove-dead-code
Oct 1, 2026
Merged

devhawk merged 2 commits into
mainfrom
remove-dead-code

Conversation

@devhawk

@devhawk devhawk commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Deletes code that has no references in any module, main or test, and turns on a test that never ran.

Removed

  • StepResult.withOutput, withError, ofError
  • DBOSIntegration.RegisteredWorkflowConsumer. Unused since Update WF registration API #382 replaced the registration callback with WorkflowRegistry.
  • DebugTriggers: the sleep and semaphore actions, which nothing set, and the hit-count bookkeeping (DebugPoint, CallSiteInfo, getPointLocationsSnapshot, releaseDebugTrigger), which nothing read. debugTriggerPoint now runs the callback and throws the configured SQLException, the only two actions any test uses.
  • SerializationUtil.safeParse, safeParseArgs, safeParseError
  • Constants.SYS_DB_SUFFIX, POSTGRES_DEFAULT_DB
  • DBOSAspect.getMethodName
  • DBOSContext.getStepId, getTimeout, getNextDeadline, getDeadline. Also removes the timeout field, which only getTimeout read, and its constructor parameter.
  • Test helpers: DBUtils.clearTables, closeDS, dumpResultSet, and the two delete helpers that only clearTables called.

Constants, SerializationUtil and DBOSContext are SDK internals, not public API, so these go without a deprecation release.

Test fix

SystemDatabaseTest.testInsertWorkflowStatusValidation has had no @Test annotation since it was added in #339, so it never ran. It now has one, and it passes.

Testing

  • spotlessCheck, compileTestJava, :transact:javadoc and PMD pass.
  • The SystemDatabaseTest.testInsertWorkflowStatus* tests pass (7).
  • SingleExecutionTest, DebouncerTest and DebouncerClientTest, the classes that set debug triggers, pass (80).

🤖 Generated with Claude Code

Delete members with no references in any module, main or test:

- StepResult.withOutput, withError, ofError
- DBOSIntegration.RegisteredWorkflowConsumer
- DebugTriggers sleep and semaphore actions, which nothing set, and the
  hit-count bookkeeping (DebugPoint, CallSiteInfo, getPointLocationsSnapshot,
  releaseDebugTrigger), which nothing read
- SerializationUtil.safeParse, safeParseArgs, safeParseError
- Constants.SYS_DB_SUFFIX, POSTGRES_DEFAULT_DB
- DBOSAspect.getMethodName
- DBOSContext.getStepId, getTimeout, getNextDeadline, getDeadline, and the
  timeout field that only getTimeout read
- Test helpers DBUtils.clearTables, closeDS, dumpResultSet, and the two
  delete helpers only clearTables called

testInsertWorkflowStatusValidation had no @test annotation and never ran.
Annotate it; it passes.
@devhawk
devhawk requested review from kraftp, maxdml and qianl15 October 1, 2026 21:26
@devhawk
devhawk marked this pull request as ready for review October 1, 2026 22:06
devhawk added a commit that referenced this pull request Oct 1, 2026
The `test-demo-apps` matrix jobs ran without `setup-gradle`. Each one
downloaded the Gradle distribution and the full Spring Boot dependency
tree from Maven Central on every run, and they have failed several times
on `429 Too Many Requests` (e.g. the widget-store job on #598).

- Add `gradle/actions/setup-gradle@v5` to the `test-demo-apps` job,
matching `test.yml` and the `publish` job.
- Run the demo-app tests on pushes to `main`. `setup-gradle` only writes
its cache on the default branch, and each job restores only its own
cache. Without a `main` run, PR runs would have nothing to restore.

The `main` run is a separate job; `publish` does not depend on it. PRs
pick up the cache after the first push to `main` with this change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@devhawk
devhawk merged commit ce0af0f into main Oct 1, 2026
8 checks passed
@devhawk
devhawk deleted the remove-dead-code branch October 1, 2026 22:35
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