Refactor DeveloperCertificateService to use ProcessSpec and ProcessUtil APIs with async/await#14110
Merged
danegsta merged 3 commits intodanegsta/trustfrom Jan 24, 2026
Merged
Conversation
16 tasks
… APIs Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update logging PR to use ProcessSpec and ProcessUtil APIs
Refactor DeveloperCertificateService to use ProcessSpec and ProcessUtil APIs
Jan 24, 2026
danegsta
reviewed
Jan 24, 2026
| try | ||
| { | ||
| return false; | ||
| var result = task.GetAwaiter().GetResult(); |
Member
There was a problem hiding this comment.
@copilot update this method (and IsCertificateTrusted) to be async instead of calling GetAwaiter and synchronously resolving the task.
Contributor
Author
There was a problem hiding this comment.
Converted both methods to async in commit b7d5fcb:
IsCertificateTrusted→IsCertificateTrustedAsyncwith CancellationToken supportIsCertificateTrustedInMacOsKeychain→IsCertificateTrustedInMacOsKeychainAsync- Replaced
GetAwaiter().GetResult()withawait task.WaitAsync(cancellationToken) - Used
await usingfor proper async disposal ofIAsyncDisposable - Updated call site in
DcpHost.csto use the async method
Co-authored-by: danegsta <50252651+danegsta@users.noreply.github.com>
Copilot
AI
changed the title
Refactor DeveloperCertificateService to use ProcessSpec and ProcessUtil APIs
Refactor DeveloperCertificateService to use ProcessSpec and ProcessUtil APIs with async/await
Jan 24, 2026
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.
Description
Refactors certificate trust checking methods to use repository's internal process execution APIs instead of directly creating
ProcessStartInfoand callingProcess.Start(), and converts synchronous methods to async for proper async/await patterns.Changes:
ProcessStartInfowithProcessSpecfor process configurationProcess.Start()withProcessUtil.Run()for process executionIsCertificateTrustedtoIsCertificateTrustedAsyncwithCancellationTokensupportIsCertificateTrustedInMacOsKeychaintoIsCertificateTrustedInMacOsKeychainAsyncGetAwaiter().GetResult()) with proper async/await patternsawait usingfor proper async disposal ofIAsyncDisposableinstead of try-finally with synchronous disposalAspire.Hosting.Dcp.Process, removedSystem.DiagnosticsDcpHost.csto use the async methodBefore:
After:
This brings the code in line with process execution patterns and async/await best practices used throughout the rest of the Aspire.Hosting codebase.
Checklist
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.