fix: add validation for system caches delete flags#629
Merged
lucasrod16 merged 2 commits intomainfrom Dec 19, 2024
Merged
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
3086e4e to
e55e620
Compare
Signed-off-by: Lucas Rodriguez <lucas.rodriguez@posit.co>
e55e620 to
955921e
Compare
aronatkins
approved these changes
Dec 19, 2024
Collaborator
aronatkins
left a comment
There was a problem hiding this comment.
CC @toph-allen - do you recall why we did not mark the language and version arguments as required?
The Connect API enforces the presence of language, version, and image name.
| "--version", | ||
| "-V", | ||
| help="The version of the target cache.", | ||
| required=True, |
Collaborator
There was a problem hiding this comment.
The system_caches_delete() function claims that language and version have Optional[..]. The delete_runtime_cache() function does the same. Should we update them to not have Optional[..] typing?
Contributor
Author
There was a problem hiding this comment.
Ahh good catch. I removed the Optional typing
dbkegley
approved these changes
Dec 19, 2024
Signed-off-by: Lucas Rodriguez <lucas.rodriguez@posit.co>
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.
Intent
Fixes #628
Type of Change
Approach
Use click's built-in validation,
required=TrueAutomated Tests
Added tests to the
TestSystemCachesDeleteclassDirections for Reviewers
Checklist