Use per-deployment keys for race-free deployment tracking#747
Merged
EhabY merged 1 commit intocoder:mainfrom Jan 23, 2026
Merged
Use per-deployment keys for race-free deployment tracking#747EhabY merged 1 commit intocoder:mainfrom
EhabY merged 1 commit intocoder:mainfrom
Conversation
Replace shared deployment usage list with per-deployment access timestamps and derive known hostnames from secrets.keys(). This eliminates race conditions when multiple VS Code windows access simultaneously. Changes: - Store access timestamps in per-deployment memento keys instead of a shared list that could lose data during concurrent writes - Derive known hostnames from secrets.keys() instead of maintaining a separate list, simplifying the implementation - Add error handling in listStoredDeployments() and pruning logic - Fix test flakiness by using fake timers for timestamp ordering
70c21d0 to
a05a04c
Compare
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
coder.deploymentUsagelist with per-deploymentcoder.access.<hostname>keys to eliminate race conditions when multiple VS Code windows access deployments concurrently
secrets.keys()instead of maintaining a separate list,simplifying the implementation and ensuring consistency