Fix async conversion issues#234
Merged
Merged
Conversation
The TaskGroup iterated over dict keys of self.sts_dicts instead of items, creating duplicate tasks that exhausted mock responses. Since k8s fetches all data in single kubectl/helm calls (unlike argocd which needs per-app manifest fetches), TaskGroup is unnecessary here. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
webbrowser.open is sync in production but was mocked with the async run_interactive method. Added a sync run_interactive_sync for mocking sync callables that don't need to be awaited. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
avail_services and avail_versions were async but typer autocompletion callbacks must be synchronous. Made them sync and use _run_async() internally to call the async create_version_map. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
_check_description called _check_service which raised CommandError when the service didn't exist yet. For first-time deployments, catch the error and proceed with no existing description. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The command functions (start, stop, restart) are now async but were called without await in the sync do_work thread worker. Wrapped with _run_async() to properly execute the coroutine. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Member
Author
|
@OCopping I've made these fixes and tested all the functions of ec manually against p47. I think all is well. |
OCopping
approved these changes
Mar 27, 2026
Contributor
|
There is one import linting issue though |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
OCopping
approved these changes
Mar 27, 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.
Summary
_get_service_dataTaskGroup iterating over dict keys instead of items, causing all k8s tests to fail withExceptionGroupwebbrowser.openmocked with async function, causingtest_log_historyfailuresavail_services,avail_versions) incompatible with typer's sync-only autocompletiondeployfailing for services not yet in argocd (first-time deploy)Test plan
pytest tests/— 34 passed, 0 failed, 0 errorsec deployfor a service not yet in argocd🤖 Generated with Claude Code