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

Fix feedback logging #23

Merged
merged 1 commit into from
Jan 11, 2024
Merged

Fix feedback logging #23

merged 1 commit into from
Jan 11, 2024

Conversation

wongjingping
Copy link
Collaborator

@wongjingping wongjingping commented Jan 11, 2024

Fixes for feedback logging DEF-102:

  • query.py: we exclude connection errors from logging
  • cli.py: refactor feedback solicitation after query generation to use a separate function util.get_feedback
  • remove an unused function
  • update requirements.txt
  • add tests
  • streamline workflows

- query.py: we exclude connection errors from logging
- cli.py: refactor feedback solicitation after query generation to use a separate function `util.get_feedback`
- remove an unused function
- update requirements.txt
- add tests
- streamline workflows
@@ -196,3 +202,10 @@ def execute_query(
write_logs(str(e))
retries -= 1
raise Exception(err_msg)


def is_connection_error(err_msg: str) -> bool:
Copy link
Member

Choose a reason for hiding this comment

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

Thank you! This works very well for Postgres, though may not work as well for Snowflake and other flavors

250001 (08001): Failed to connect to DB. Verify the account name is correct: [`REDACTED`/). HTTP 403: Forbidden

MySQL

1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

etc. Can fix later, though!

@rishsriv rishsriv merged commit e25b908 into main Jan 11, 2024
2 checks passed
@rishsriv rishsriv deleted the jp/feedback branch January 11, 2024 09:42
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.

2 participants