Eliminate GetAwaiter().GetResult() from Kubernetes and installer async boundaries#1230
Open
jimmyp wants to merge 7 commits into
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…Prerequisite Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…m, IScriptWorkspace, ScriptWorkspaceFactory Eliminates GetAwaiter().GetResult() from the hot paths in ScriptServiceV2 and FileTransferService by threading async overloads all the way from IOctopusFileSystem up through IScriptWorkspace.CheckReadinessAsync and IScriptWorkspaceFactory.GetWorkspaceAsync. KubernetesPhysicalFileSystem now has a true async EnsureDiskHasEnoughFreeSpaceAsync override; its sync bridge retains one GetAwaiter only for inherently-sync config-store callers that never exercise the Kubernetes disk-check path in production. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…hFreeSpaceAsync overload to avoid sync fallback Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…RemoveAsync Replace Lazy<V1ConfigMap> + GetAwaiter init with a static CreateAsync factory that eagerly loads ConfigMap data. Add SaveAsync/SetAsync/RemoveAsync overrides that call configMapService.Patch asynchronously. Sync methods bridge to async via GetAwaiter for compat. Add async variants to IWritableKeyValueStore with default Task.FromResult implementations in KeyValueStoreBase. DI registrations updated to call CreateAsync. ShowConfigurationCommand updated to await SaveAsync. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…tAwaiter from EnsureMachineKeyAndIvLoaded Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… calls have explanatory comments Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Eliminates all
.GetAwaiter().GetResult()calls from hot production code paths that were blocking unnecessarily after the EFT-3295 async migration.CheckAsync(CancellationToken);PowerShellPrerequisiteis now truly asyncEnsureDiskHasEnoughFreeSpaceAsyncchain through Kubernetes file system, script workspace, workspace factory, ScriptServiceV2, FileTransferService, ScriptPodLogEncryptionKeyProviderCreateAsyncfactory +SaveAsync/SetAsync/RemoveAsynconIWritableKeyValueStoreInitializeAsync— key pre-loaded before any encrypt/decryptRemaining GetAwaiter (all acceptable)
WindowsServiceHost.cs— ServiceBase.Run worker thread (Windows SCM forced)ConfigurationModule.csx2 — Autofac sync factory (startup only)ConfigMapKeyValueStore.csx4 — IWritableKeyValueStore sync compat wrappersKubernetesPhysicalFileSystem.csx1 — sync bridge, not hit in production hot paths🤖 Generated with Claude Code