-
Notifications
You must be signed in to change notification settings - Fork 48
style: improve cancellation string #111
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
Conversation
bigframes/formatting_helpers.py
Outdated
@@ -155,7 +155,9 @@ def wait_for_query_job( | |||
raise | |||
except KeyboardInterrupt: | |||
query_job.cancel() | |||
print(f"Requested cancelation for {query_job.job_type} {query_job.job_id}...") | |||
print( | |||
f"Requested cancellation for {query_job.job_type.capitalize()} job {query_job.job_id}..." |
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.
Nit: we should also include the job location. It's common for folks to give support this job ID but without the location it's not easy to look up where this job's logs are.
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.
It looks like https://cloud.google.com/python/docs/reference/bigquery/latest/google.cloud.bigquery.job.QueryJob#google_cloud_bigquery_job_QueryJob_location is not very specific (for example: "US"). Do you think that's sufficient? Thanks.
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.
Yes, that's correct. "US" means our US-multi-region. For other regions in the US, it'll be a string specific to that region, such as "us-central1"
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.
Nice, I hoped that was the case but the documentation was very minimal
"
location
str: Location where the job runs.
"
Ha.
Thanks.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕