8000 feat: job creation mode GA by shollyman · Pull Request #2190 · googleapis/python-bigquery · GitHub
[go: up one dir, main page]

Skip to content

feat: job creation mode GA #2190

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

Merged
merged 15 commits into from
May 27, 2025
Merged

feat: job creation mode GA #2190

merged 15 commits into from
May 27, 2025

Conversation

shollyman
Copy link
Contributor
@shollyman shollyman commented May 19, 2025

This PR makes the underlying functionality related to how queries can optionally avoid job creation a GA feature. It does the following:

  • no longer uses the preview QUERY_PREVIEW_ENABLED environment variable to control job creation
  • adds a new argument to Client instantiation to control job creation mode
  • adds a property/setter to Client to control job creation mode

This PR also updates/renames the sample demonstrating how to leverage job creation mode with Client.query_and_wait.

internal: b/396766171

This PR makes the underlying functionality related to how queries can
optionally avoid job creation a GA feature.  It does the following:

* no longer uses the preview QUERY_PREVIEW_ENABLED environment variable
  to control job creation
* adds a new argument to Client instantiation to control job creation
  mode
* adds a property/setter to Client to control job creation mode

This PR also updates/renames the sample demonstrating how to leverage
job creation mode with Client.query_and_wait.
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery API. labels May 19, 2025
@shollyman shollyman added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 19, 2025
@shollyman shollyman marked this pull request as ready for review May 19, 2025 19:57
@shollyman shollyman requested review from a team as code owners May 19, 2025 19:57
@shollyman shollyman requested a review from leahecole May 19, 2025 19:57
Copy link
snippet-bot bot commented May 19, 2025
You are about to delete the following frozen region tag.

Here is the summary of changes.

You are about to add 1 region tag.
You are about to delete 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@shollyman
Copy link
Contributor Author

re: sample tag change, will do the freeze and rename dance on the docs side when we're ready.

@shollyman shollyman assigned shollyman and unassigned whuffman36 May 19, 2025
@property
def default_job_creation_mode(self):
"""Default job creation mode used for query execution."""
return self._default_job_creation_mode
Copy link
Contributor

Choose a reason for hiding this comment

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

Any chance we could check for the environment variable for a bit here? Maybe with a warning to set it as a client option instead in the future?

Copy link
Contributor

Choose a reason for hiding this comment

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

Chatted offline. I'll aim to get bigframes 1.x and 2.x releases out to support this change before the client library release to minimize disruption.

Co-authored-by: Lingqing Gan <lingqing.gan@gmail.com>
@shollyman shollyman removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 27, 2025
* fix(deps): update all dependencies

* Update pyproject.toml

* Update .github/workflows/docs.yml

* Update .github/workflows/docs.yml

---------

Co-authored-by: Chalmer Lowe <chalmerlowe@google.com>
chalmerlowe and others added 8 commits May 27, 2025 16:47
…s#2195)

* The message is a commit message, not a message to a user from an AI agent. Therefore, it should be output as is.

Output:
Remove Kokoro presubmit for unit, docs, and coverage.

This commit removes the Kokoro presubmit configuration that runs
`unit_noextras`, `unit`, `cover`, `docs`, and `docfx` nox sessions.
These checks are already performed by GitHub Actions, making the
Kokoro configuration redundant.

The change involves removing the `NOX_SESSION` environment variable
definition from `.kokoro/presubmit/presubmit.cfg`.

* Update presubmit.cfg

* Delete .kokoro/presubmit/presubmit.cfg

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…leapis#2199)

* Configure Renovate to keep Python at 3.10 for docs workflow

This change adds a packageRule to `renovate.json` to prevent Renovate
from updating the Python version used in the `.github/workflows/docs.yml`
GitHub Actions workflow.

The rule specifically targets the `python-version` input of the
`actions/setup-python` step and restricts allowed versions to `<3.11`,
effectively pinning it to `3.10` for now.

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Update renovate.json

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* adds files to excludes lists

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* Update owlbot.py

* adds packageRule about pyproject.toml

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
* updates renovate to ignore docs.yml

* Update renovate.json
@shollyman shollyman requested a review from Linchin May 27, 2025 17:13

if typing.TYPE_CHECKING:
import pytest


def test_client_query_shortmode(capsys: "pytest.CaptureFixture[str]") -> None:
client_query_shortmode.client_query_shortmode()
client_query_job_optional.client_query_job_optional()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we add some verification that the query was indeed run in jobless mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Control over execution is still the responsible of the service, and it can choose to fallback to using jobs regardless of the requested mode.

@Linchin
Copy link
Contributor
Linchin commented May 27, 2025

On a second thought, I wonder if we should let people set jobless mode in job config as well, in addition to a default value in client. But for the purpose of this PR, I think having a client-level setting is enough. We can add the job-level setting in the future if we think it's necessary.

@Linchin Linchin self-requested a review May 27, 2025 17:35
@shollyman shollyman merged commit 64cd39f into googleapis:main May 27, 2025
23 checks passed
@shollyman shollyman deleted the jco-ga branch May 27, 2025 17:54
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 API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0