-
Notifications
You must be signed in to change notification settings - Fork 59
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
introduce subclasses and add more telemetry for ProgrammingErrors #1651
Conversation
tests/test_data/projects/napp_project_with_incorrect_pkg_warehouse/snowflake.yml
Outdated
Show resolved
Hide resolved
tests/test_data/projects/napp_project_with_incorrect_pkg_warehouse/snowflake.yml
Outdated
Show resolved
Hide resolved
src/snowflake/cli/api/exceptions.py
Outdated
class ShowSpecificObjectMultipleRowsError(ClickException): | ||
def __init__(self, show_obj_query: str): | ||
super().__init__( | ||
f"Received multiple rows from result of SQL statement: {show_obj_query}. Usage of 'show_specific_object' may not be properly scoped." | ||
) |
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 user facing error? How should they act if they see "Usage of 'show_specific_object' may not be properly scoped." message?
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.
Just looking through the code, it seems like this is an error that is meant for us who is using the function, not the end users, and as the message says we need to make sure that our usage of this function is properly scoped (e.g. passing the right parameters)
Should we use |
@sfc-gh-turbaszek We are currently in the process of refactoring our error handling and one of our goals is actually to phase out the usage of |
…li exceptions, add catch for post deploy scripts
Updates tests in `test_manager.py` to use a v2 test project and call out to the v2 entities directly instead of going through the `NativeAppManager`. I've kept the diff as simple as possible and avoided introducing too many helpers or reorganizing the code, that can be done separately if necessary (the top priority is to just work towards removing `NativeAppManager` and all these static methods first).
Convert package post-deploy tests and one skipped integration tests to remove use of `NativeAppManager`.
This reverts commit 1b7072f. Since the PR that once depended on this one is now branching off main, we are re-adding the telemetry additions.
Pre-review checklist
Changes description