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

Fixes #7038: When promises could have been updated, we still have the… #727

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions initial-promises/node-server/common/1.0/update.cf
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,14 @@ body action u_background
############################################
body classes success(if, else, kept)
{
promise_kept => { "${kept}" };
promise_repaired => {"${if}"};
repair_failed => { "${else}" };
repair_denied => { "${else}" };
repair_timeout => { "${else}" };
promise_kept => { "${kept}" };
promise_repaired => { "${if}" };
repair_failed => { "${else}" };
repair_denied => { "${else}" };
repair_timeout => { "${else}" };

cancel_kept => { "${else}" };
cancel_repaired => { "${else}" };
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't there be "${if}" in cancel_kept and "${kept}" too in cancel_repaired ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure it would be relevant. If we cancel the repaired class as well, we'll most likely hide the update that occured, and user may scratch their head on why promises are updated, but report kept

Copy link
Member

Choose a reason for hiding this comment

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

So we'll report both a kept and repaired status ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, the code is clever, and report the worse state (repaired in case of success and repaired, error in case of repaired and error, etc)

Copy link
Member

Choose a reason for hiding this comment

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

OK


# persist for 4 minutes so that it wont overlap with the next
# execution in 5 minutes
Expand Down
3 changes: 3 additions & 0 deletions techniques/system/common/1.0/update.st
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ body classes success(if, else, kept)
repair_denied => { "${else}" };
repair_timeout => { "${else}" };

cancel_kept => { "${else}" };
cancel_repaired => { "${else}" };

# persist for 4 minutes so that it wont overlap with the next
# execution in 5 minutes
persist_time => "4";
Expand Down