-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-1011766: Added 'snow spcs image-repository url <repo_name>' command #708
Conversation
dd6509c
to
e4ba8bd
Compare
416f3f4
to
d5241ab
Compare
cb39f19
to
a26a7e5
Compare
39c4329
to
8a35760
Compare
cbe9970
to
b3c6758
Compare
b3c6758
to
4ec757e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. Left few minor comments
a614a20
to
a093314
Compare
self.check_database_and_schema() | ||
return self._execute_query(query) | ||
return self._execute_query(query, **kwargs) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allows you to pass cursor_class with _execute_schema_query
results = result_set.fetchall() | ||
|
||
colored_repo_name = click.style(f"'{repo_name}'", fg="green") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this color needed? It only cause problems with equals check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it has marginal improvement for UI but testability is probably more important. Good point.
…nd along with unit and integration tests
…full flow of create repo, show repos, get repo url
…t_repository_url_cli
… escape_like_pattern
…pository name for getting image repository url
…s as image repositories do not support quoted identifiers
7dd3b88
to
9658712
Compare
…and (#708) * SNOW-1011766: Added 'snow spcs image-repository url <repo_name' command along with unit and integration tests * SNOW-1011766: Update release notes * SNOW-1011766: Updating integration tests for repository url to cover full flow of create repo, show repos, get repo url * SNOW-1011766: Removing unnecessary connection parameters from test_get_repository_url_cli * SNOW-1011766: Fixed typo in escape_like_pattern, wrote unit tests for escape_like_pattern * SNOW-1011766: Code refactor and dealing with possibility of quoted repository name for getting image repository url * SNOW-1011766: Code clean * SNOW-1011766: Adding more unit tests for get_repository_url * SNOW-1011766: Removing parts of code that deal with quoted identifiers as image repositories do not support quoted identifiers * SNOW-1011766: Removing unnecessary URL processing * fixup * SNOW-1011766: Adding comment explaining usage of escape_like_pattern * SNOW-1011766: Making error message for no image repository found more informative * SNOW-1011766: Removing error coloring that interfered with equality checks in testing
Pre-review checklist
Changes description
Added a new convenience command of
snow spcs image-repository url
that returns the full URL given a repository name. Note that image repositories do not allow for quoted identifiers, so I have added checks that repository name inputs must be unquoted identifiers.Example Usage