Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(workflows): allow op ctx to do all the things #1938

Open
wants to merge 1 commit into
base: 01-16-feat_fdb_sqlite_workflows_driver
Choose a base branch
from

Conversation

MasterPtato
Copy link
Contributor

Changes

Copy link
Contributor Author

MasterPtato commented Jan 24, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@MasterPtato MasterPtato marked this pull request as ready for review January 24, 2025 00:52
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR modifies the Chirp workflow system to allow operation contexts to dispatch workflows, signals, and messages while maintaining safety constraints against recursive workflow dispatching.

  • Added from_workflow flag in SignalBuilder and WorkflowBuilder to prevent dispatching from within workflow operations
  • Changed MessageBuilder to own its MessageCtx rather than borrowing it, removing lifetime parameters and simplifying the API
  • Made OperationCtx::new() asynchronous and added MessageCtx support for message operations
  • Added safety checks in builders to prevent potential infinite recursion while allowing more flexible operation context capabilities
  • Standardized workflow/signal/message handling patterns across different context types (Api, Test, Standalone)

💡 (4/5) You can add custom instructions or style guidelines for the bot here!

11 file(s) reviewed, 4 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

cloudflare-workers-and-pages bot commented Jan 24, 2025

Deploying rivet with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4c4f509
Status: ✅  Deploy successful!
Preview URL: https://4441902d.rivet.pages.dev
Branch Preview URL: https://01-24-fix-workflows-allow-op.rivet.pages.dev

View logs

@MasterPtato MasterPtato force-pushed the 01-16-feat_fdb_sqlite_workflows_driver branch from 296889a to 7171a84 Compare January 24, 2025 01:10
@MasterPtato MasterPtato force-pushed the 01-24-fix_workflows_allow_op_ctx_to_do_all_the_things branch 2 times, most recently from d0218f6 to c2ae964 Compare January 24, 2025 01:15
@MasterPtato MasterPtato force-pushed the 01-16-feat_fdb_sqlite_workflows_driver branch from 7171a84 to ff931bf Compare January 24, 2025 01:57
@MasterPtato MasterPtato force-pushed the 01-24-fix_workflows_allow_op_ctx_to_do_all_the_things branch from c2ae964 to 6153a52 Compare January 24, 2025 01:57
@MasterPtato MasterPtato force-pushed the 01-16-feat_fdb_sqlite_workflows_driver branch from ff931bf to 1fbcc04 Compare January 24, 2025 22:26
@MasterPtato MasterPtato force-pushed the 01-24-fix_workflows_allow_op_ctx_to_do_all_the_things branch from 6153a52 to 50e531c Compare January 24, 2025 22:26
@MasterPtato MasterPtato force-pushed the 01-16-feat_fdb_sqlite_workflows_driver branch from 1fbcc04 to 0ec8ed1 Compare January 25, 2025 02:06
@MasterPtato MasterPtato force-pushed the 01-24-fix_workflows_allow_op_ctx_to_do_all_the_things branch from 50e531c to 4c4f509 Compare January 25, 2025 02:06
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.

1 participant