feat: add support for the --all to proxy remove#834
Open
eureka928 wants to merge 11 commits intoopentensor:stagingfrom
Open
feat: add support for the --all to proxy remove#834eureka928 wants to merge 11 commits intoopentensor:stagingfrom
--all to proxy remove#834eureka928 wants to merge 11 commits intoopentensor:stagingfrom
Conversation
…d error on conflicting args
--all to proxy remove
Contributor
Author
|
Hi @thewhaleking would you review my PR? |
f576009 to
874e5e6
Compare
thewhaleking
requested changes
Mar 19, 2026
| ), | ||
| ] = "", | ||
| ] = None, | ||
| all: bool = typer.Option( |
Contributor
There was a problem hiding this comment.
all is a builtin fn in Python. Use all_
| f"era: {period}\n" | ||
| ) | ||
| # Validate that either delegate is provided or --all is used, but not both | ||
| if not all and not delegate: |
Contributor
There was a problem hiding this comment.
This changes the flow. Previously if a user did not provide --delegate, he would be prompted. Now he is not. This should fall back to prompting a delegate if --all is not explicitly used (or allow "all" as a keyword)
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
Refactor of #791, addressing reviewer feedback from @thewhaleking.
This PR adds the
--allflag tobtcli proxy removeso users can remove all proxies in a single operation. The two review comments on #791 have been addressed:--delegatetogether with--allnow returns an error instead of silently ignoring the delegate.remove_proxies()function has been merged into the existingremove_proxy()function using aremove_all: bool = Falseparameter, reducing code duplication.Type of change
What's changed
CLI validation flow
Usage
Remove a single proxy
Remove all proxies (requires typing "REMOVE" to confirm)
Remove all proxies without prompt
Testing
Unit tests
Lint
Checklist
--allto proxy remove #791 addressedContribution by Gittensor, learn more at https://gittensor.io/