Repository navigation
docs(extras): correct MicroVM best practices - #826
Merged
Merged
Conversation
Address review comments on #825. A launch retry with changed settings now fails with MicrovmLaunchError, as RunMicrovm rejects the reused client token. The HTTP delivery, launch error, and idle time rules now state their exact conditions.
The launch error docs now cover a retry that RunMicrovm rejects, and limit the repeated job to run hook delivery. The worker forgets a callback ID after at least 1,000 other jobs end, not more than 1,000. Addresses review comments on #825.
This addresses the review of #826. List every case that selects HTTP delivery, and scope the HTTP launch guarantee to versions and aliases. Cut the unverified reused-token detail from the launch error docs.
The default strategy does not retry ValidationException. The previous commit removed it from the tier 2 list by mistake.
The ingress_network_connectors docstring stated twice that every session job goes over HTTP. Addresses the second review of #826.
yaythomas
approved these changes
Oct 24, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses the review comments on #825. It changes only documentation and one docstring.
"Deploys and versions" rule 1 removed the scenario where the service returns the first attempt's MicroVM and the session records a mismatched resume mode. The repository has no recorded service result for it. The rule now states the outcome that the JS
retry.tsstates:RunMicrovmrejects the reused client token withValidationException.default_microvm_retry_strategydoes not retry it, so the launch fails withMicrovmLaunchError."Job inputs" rule 3 now lists the three ways a job goes over HTTP:
runhook payload is over 4,096 code points.request.path.It also names
lambda:PassNetworkConnectoronALL_INGRESS. Without it,RunMicrovmfails withMicrovmLaunchError. The derived "about 3,600 code points" figure is removed."A job can run after
MicrovmLaunchError" now holds only forrunhook delivery. The change covers the best-practices rule, the Errors table, and theMicrovmLaunchErrordocstring. An HTTP launch request holds no job, and the request step starts only after a launch succeeds.The "What it does" bullet on a MicroVM that the operation never learned now covers a retry that
RunMicrovmrejects."Sessions" rule 2 states all three conditions for
auto_suspend_idle_time:auto_suspend_on_idle=True, at least 10 seconds, and at most the sessiontimeout. Each condition raisesValidationErrorwhen it is not met.The worker README now says that a callback ID is forgotten after at least 1,000 other jobs end, not after more than 1,000.
Review fixes
ingress_network_connectorsdocstring. The "about 3,600 code points" figure is removed.$LATESTconsequence in two sentences, and names no error code.MicrovmLaunchErroris short. A list below the table explains the two deliveries.PassNetworkConnectorexample names a role that allowsNO_INGRESSandINTERNET_EGRESS, but notALL_INGRESS.Testing
retry.pyandretry_test.py.launch(),run_job, andrun_session, and the teststest_fails_with_the_launch_error_and_skips_terminate.over_http,fits_run_hook, and_connector_arninoperation.py._validate_auto_suspendinsession.py, andsession_test.py.MAX_FINISHED_JOBSand its eviction inworker.py.hatch run dev-extras:covpasses 373 tests at 100 %.hatch fmt --checkpasses for the extras package.lintcommit.pypasses. Every link and anchor resolves.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.