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

feat: add client_endpoints_override to bq options #1167

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

GarrettWu
Copy link
Contributor

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

b/370077669

@GarrettWu GarrettWu self-assigned this Nov 22, 2024
@GarrettWu GarrettWu requested review from a team as code owners November 22, 2024 00:18
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Nov 22, 2024
@client_endpoints_override.setter
def client_endpoints_override(self, value: dict):
warnings.warn(
"This is an advanced option that sets the endpoints directly. Don't use if you don't know about it."
Copy link
Collaborator

Choose a reason for hiding this comment

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

A example from GPT, "if you don't know about it.“ sounds too casual:
This is an advanced configuration option for directly setting endpoints. Incorrect use may lead to unexpected behavior or system instability. Proceed only if you fully understand its implications.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool.

@@ -91,6 +91,7 @@ def __init__(
skip_bq_connection_check: bool = False,
*,
ordering_mode: Literal["strict", "partial"] = "strict",
client_endpoints_override: dict = {},
Copy link
Collaborator

Choose a reason for hiding this comment

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

quick question, why not just endpoints_override.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Those are bq_xxx_client endpoints.

@GarrettWu GarrettWu added the automerge Merge the pull request once unit tests and other checks pass. label Nov 25, 2024
@GarrettWu
Copy link
Contributor Author

failed samples are caused by #909, unrelated to this PR.

@GarrettWu GarrettWu merged commit be74b99 into main Nov 25, 2024
19 of 23 checks passed
@GarrettWu GarrettWu deleted the garrettwu-testflag branch November 25, 2024 21:15
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants