Port #3763 to main: fix the second snapshot-based update on an agent - #3849
Conversation
✅ Deploy Preview for golemcloud canceled.
|
|
Why "not having a test component" is an excuse for not porting one of the tests? We can add new test agents / test components if needed |
| #[derive(Clone, Debug)] | ||
| pub struct AgentConfig { | ||
| pub deleted_regions: DeletedRegions, | ||
| /// The regions of the oplog that replay must skip: jumps, reverts, and the prefix |
There was a problem hiding this comment.
unnecessary over-explaining comment
|
Found one issue that we did not find in the original PR:
|
|
Fixed in d542f71. A manual-update snapshot that cannot be read (wrong entry at the index, or a payload download failure) now returns a new Two regression tests in One thing I left alone: a failed start is held on the worker until it is resumed or unloaded, like every other instance-creation failure, so the tests resume before the second invoke. #3763 on |
Ports #3763 to
main.mainrestructuredPrivateDurableWorkerState::newto take a readyReplayState, so theset_overridebeing deleted lives inDurableWorkerCtx::createhere rather than in the state constructor. Same block, one call site up.All three
hot_updatetests are ported.manual_update_on_idle_twiceandmanual_update_on_idle_to_earlier_componentrun onmain'sagent-updates-v1/v2pair using theSnapshotUpdateTestagent, which stamps the build that wrote the snapshot into it.auto_update_on_idle_after_manual_updateneeds a recorded invocation that cannot replay under a later build, so it brings over theagent-counters-v2test component that 1.5.x got with the chaos suite in #3743. It isagent-counterswithSnapshotCounter::component_versionreturning 2 instead of 1, and the two release builds differ in exactly one byte.agent-countersgains that method returning 1, and the new app joinsrust_test_appsinbuild-components.sh.Verified by reintroducing the bug on this branch:
manual_update_on_idle_twicethen fails withTimeout waiting for agent .../SnapshotUpdateTest() to reach component revision 2, at exactly the second manual update.auto_update_on_idle_after_manual_updatesurvives that revert. That is expected and its doc comment says so: it guards the reducer folding the snapshot region into the skipped regions, not theset_overridedeletion, and it goes red when that fold is removed. Both directions were run.The eight
hot_updatetests matching*update_on_idle*pass on this branch after themainmerge. The earlier full-module run (20 passed, 1 failed,snapshot_after_auto_update_recovers_with_updated_component_contextfailing identically on unmodifiedmain) predates that merge and has not been repeated.🤖 Generated with Claude Code