Skip to content

MicroVM worker: the unknown-outcome warning says jobs are refused after the refusal ended #806

Open

Description

@ParidelPooya

Summary

The worker's warning for a SuspendMicrovm call with an unknown outcome says that jobs are refused, even when the refusal already ended during the call.

Details

  1. The warning says: "The worker refuses jobs until the MicroVM resumes, or for 30 seconds."
  2. The worker chooses this text for every unknown outcome without a terminate hook. It does not check whether the refusal is still in effect.
  3. A resume hook during the call ends the refusal. So does the 30-second end of a suspend hook's refusal during the call.
  4. After such a call, the worker starts no new refusal. A job sent right after the warning gets HTTP 202.
  5. Reviews measured this in three sequences:
    • a resume hook during the call;
    • a suspend hook, then a resume hook, during the call;
    • a suspend hook whose 30 seconds ended during the call.
  6. The first sequence is the likely one when the worker's own call suspended the MicroVM and its response was lost across the freeze.
  7. So the log states a refusal that has already ended. Behavior is correct; only the text is wrong.

Proposed fix

When the refusal is no longer in effect at the outcome, log a separate text. For example: "the suspend call for the idle MicroVM had an unknown outcome. The refusal of jobs already ended during the call, on a resume hook or after 30 seconds. So the worker accepts jobs, and the idle time starts again." Add the three sequences as tests. The JavaScript and Python workers have the same text, so both need the same change. JavaScript tracking issue: aws/aws-durable-execution-sdk-js#1056.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions