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

feat: add "pause" method to all connectors #4558

Merged
merged 7 commits into from
Apr 4, 2024

Conversation

fontanierh
Copy link
Contributor

Description

  • we need to be able to pause/resume connectors for https://github.com/dust-tt/tasks/issues/599
  • we currently have stop/resume methods, but those are ill-defined and not implemented on all connectors. They are mostly used to restart connectors that rely on long-running workflows
  • Kind of in a rush, because https://github.com/dust-tt/tasks/issues/599 is currently causing a lot of operational toil
  • short term, we want to add the "unpause" method.
  • mid term, we want to cleanup the "connectors" interface, likely w/ an abstract base class. We likely will rename / delete / create some methods.

Risk

not much, purely additive

Deploy Plan

  • run initdb for connectors on prodbox
  • deploy code

@fontanierh fontanierh marked this pull request as ready for review April 3, 2024 16:57
Copy link

github-actions bot commented Apr 3, 2024

Warnings
⚠️

Files in **/lib/models/ have been modified and the PR has the migration-ack label. Don't forget to run the migration from the -edge infrastructure.

Generated by 🚫 dangerJS against 7204d91

connectors/src/api/webhooks/webhook_intercom.ts Outdated Show resolved Hide resolved
connectors/src/connectors/github/index.ts Outdated Show resolved Hide resolved
connectors/src/connectors/google_drive/index.ts Outdated Show resolved Hide resolved
connectors/src/resources/connector_resource.ts Outdated Show resolved Hide resolved
connectors/src/resources/storage/models/connector_model.ts Outdated Show resolved Hide resolved
@fontanierh fontanierh force-pushed the feat/pause-functionality-connectors branch from 58c0db1 to bbb732b Compare April 4, 2024 12:45
@fontanierh fontanierh force-pushed the feat/pause-functionality-connectors branch from bbb732b to 7204d91 Compare April 4, 2024 12:47
@fontanierh fontanierh requested review from PopDaph and flvndvd April 4, 2024 12:47
Copy link
Contributor

@lasryaric lasryaric left a comment

Choose a reason for hiding this comment

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

terminateAllWorkflowsForConnectorId() logic discussed on Slack looks good to me 🙏

Copy link
Contributor

@flvndvd flvndvd left a comment

Choose a reason for hiding this comment

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

LGTM

@fontanierh fontanierh added the migration-ack 📁 Label to acknowledge that a migration is required. label Apr 4, 2024
@fontanierh fontanierh merged commit 12bd151 into main Apr 4, 2024
7 checks passed
@fontanierh fontanierh deleted the feat/pause-functionality-connectors branch April 4, 2024 13:56
flvndvd pushed a commit that referenced this pull request May 26, 2024
* feat: pause connectors

* endpoint

* front bindings

* terminate the workflows

* better naming

* more instance methods

* r

---------

Co-authored-by: Henry Fontanier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration-ack 📁 Label to acknowledge that a migration is required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants