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 Unintuitive Behavior #573

Merged
merged 6 commits into from
Aug 8, 2024
Merged

Fix Unintuitive Behavior #573

merged 6 commits into from
Aug 8, 2024

Conversation

kraftp
Copy link
Contributor

@kraftp kraftp commented Aug 7, 2024

This fixes unintuitive behaviors that sparked user complaints:

  1. Scheduled workflows now default to ExactlyOncePerIntervalWhenActive. This means that if an executor is started after being deactivated for a long time, it does not try to "catch up" on past scheduled workflows. This is paired with a related bugfix (Test the workflow makeup modes #577) so this behavior and flag now work as intended.

  2. Communicator retries now clearly emit error messages that explain what's going on, so they're no longer swallowed.

  3. Fixed an issue where workflow errors were logged twice: once by the workflow and once by the handler.

@@ -15,7 +15,7 @@ export enum SchedulerMode {

export class SchedulerConfig {
crontab: string = '* * * * *'; // Every minute
mode ?: SchedulerMode = SchedulerMode.ExactlyOncePerInterval;
mode ?: SchedulerMode = SchedulerMode.ExactlyOncePerIntervalWhenActive;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should just get rid of the default, make people think which one they want. It's a pretty significant difference.

I wonder about communicator retries also... it's pretty fundamental.

Copy link
Contributor Author

@kraftp kraftp Aug 8, 2024

Choose a reason for hiding this comment

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

To eliminate the breaking change, I'm going to revert the communicator retries change and instead log exceptions retried by communicators so they aren't swallowed.

Copy link
Contributor Author

@kraftp kraftp Aug 8, 2024

Choose a reason for hiding this comment

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

For the scheduled workflows, it never seems to have worked right anyways, so I'm fine changing the default and making sure it works as intended.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to have no default because that's an even bigger breaking change, and now this PR has no breaking changes at all (except to what's already broken).

@kraftp kraftp merged commit 3c3cebe into main Aug 8, 2024
2 checks passed
@kraftp kraftp deleted the kraftp/fix-behavior branch August 8, 2024 18:17
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