Skip to content

Conversation

@maxdml
Copy link
Collaborator

@maxdml maxdml commented Aug 14, 2025

Major fix: deadline computation for enqueued workflows. Previously we'd actually set the deadline when the workflow was enqueued, not dequeued. This PR fixes it by considering the timeout when setting the final deadline. (Note: we also revert the change from #53 and let resumeWorkflow clear the deadline. It'll be recomputed from the timeout in RunAsWorkflow.)

Also:

  • Add a test TimeoutOnlySetOnDequeue, to verify the above fix
  • Record a workflow error when the function is called with the wrong parameter types. This could happen if the client enqueues a workflow with the wrong input type.
  • Prevent the spawning of child workflows within steps and add a test (ChildWorkflowCannotBeSpawnedFromStep)
  • Add a GHA to perform vulnerability checks and static analysis
  • Set toolchain to 1.25 (and update test GHA accordingly). Note this is not the minimum version required by library consumers.
  • Run go vet in test GHA
  • Add "join discord" badge to README
  • Make hardcoded values package level constants
  • Fix a small bug where returning the admin server object would be missing the port
  • Handle errors when writing the response in the healthcheck admin endpoint
  • Set ReadHeaderTimeout on the admin server to prevent Slowloris attacks
  • Handle sub millisecond timeouts (round to next millisecond)
  • Handle negative timeouts (can happen with propagation delays): set timeout to 1ms
  • Use a sync.Map for the workflow registry
  • Check the executable is a regular file before opening it to compute its hash
  • Remove unused WorkflowFunctionNotFound -- I don't see a use case for it
  • Use struct{}{} instead of bool for notification channels (struct{}{} use zero space)
  • Use an input struct for dequeueWorkflows
  • Cleanup handles implementation with a base handler that implement once shared logic (GetStatus, GetWorkflowID). other handles compose with this struct.
  • Handle errors when failing to close notification listener connection
  • Handle error when closing the connection used to set LISTEN channels in Postgres
  • Handle errors (and print a log entry) when failing to run a scheduled workflow
  • Fix possible integer overflows when converting uint to int (for queue priorities and fork start step)
  • Complete DLQ test: resume the DLQ-ed workflow and check it can now run to completion. Check that the completed workflow can be ran many times past the retry limit.
  • Pass workflowCustomNametoFQN to new contexts

Copy link
Member

@kraftp kraftp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes and new tests look good. PR is large enough that I can't claim I caught everything, but high-level is good.

@maxdml maxdml marked this pull request as ready for review August 14, 2025 20:21
Base automatically changed from q-dedup-and-prio to main August 14, 2025 20:29
@maxdml maxdml merged commit 3aaf85a into main Aug 14, 2025
2 checks passed
@maxdml maxdml deleted the bag-o-stuff branch August 14, 2025 20:40
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.

3 participants