Skip to content
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-1011769: Convenience command 'spcs image-registry url' to get registry url based on current account. #715

Merged
merged 7 commits into from
Feb 7, 2024

Conversation

sfc-gh-davwang
Copy link
Contributor

@sfc-gh-davwang sfc-gh-davwang commented Feb 1, 2024

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually.
  • I've confirmed that my changes are up-to-date with the target branch.
  • I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

Added a new command under spcs image-registry called url that prints the image registry url as long as the current role can view at least one image repository. This matches the normal workflow where users will create an image repository, then get the image registry url.

Usage (error message has been updated but gist is same):
registry_url_both

sfc-gh-yiwang
sfc-gh-yiwang previously approved these changes Feb 1, 2024
Copy link
Collaborator

@sfc-gh-yiwang sfc-gh-yiwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except nit comments about error message

src/snowflake/cli/plugins/spcs/image_registry/commands.py Outdated Show resolved Hide resolved
src/snowflake/cli/plugins/spcs/image_registry/manager.py Outdated Show resolved Hide resolved
@sfc-gh-davwang sfc-gh-davwang force-pushed the SNOW-1011769-get-registry-url branch from 57261f9 to 7954202 Compare February 7, 2024 15:38
sfc-gh-astus
sfc-gh-astus previously approved these changes Feb 7, 2024
@sfc-gh-davwang sfc-gh-davwang enabled auto-merge (squash) February 7, 2024 16:55
@sfc-gh-davwang sfc-gh-davwang merged commit 4a35868 into main Feb 7, 2024
17 checks passed
@sfc-gh-davwang sfc-gh-davwang deleted the SNOW-1011769-get-registry-url branch February 7, 2024 17:02
sfc-gh-sichen pushed a commit that referenced this pull request Oct 17, 2024
…gistry url based on current account. (#715)

* SNOW-1011769: Adding 'spcs image-registry url' command.

* SNOW-1011769: Fixing integration tests (seems like snapshot does not deal with colored output well)

* SNOW-1011769: Updating error message for no repositories found when getting registry URL

* SNOW-1011769: Updating test output

* SNOW-1011769: Use urlparse to get registry url from repo url. Improving error name

* SNOW-1011769: Updating tests to use row_from_snowflake_session
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants