Skip to content

feat: warn when the BigFrames version is more than a year old #1455

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 11 commits into from
Mar 12, 2025

Conversation

sycai
Copy link
Contributor

@sycai sycai commented Mar 5, 2025

No description provided.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Mar 5, 2025
@sycai sycai marked this pull request as ready for review March 6, 2025 01:45
@sycai sycai requested review from a team as code owners March 6, 2025 01:45
@sycai sycai requested a review from tswast March 6, 2025 01:45
@tswast
Copy link
Collaborator

tswast commented Mar 6, 2025

Doctest failures are

FAILED third_party/bigframes_vendored/pandas/core/frame.py::frame.DataFrame.apply
FAILED third_party/bigframes_vendored/pandas/core/series.py::series.Series.apply
2 failed, 630 passed, 261 warnings in 5732.11s (1:35:32)

These appear to be the usual remote functions flakiness.

__release_date__, "%Y-%m-%d"
) > datetime.timedelta(days=365):
msg = f"Your BigFrames version {__version__} is beyond the support period. Please update to the lastest version."
warnings.warn(msg)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use a custom category in bigframes.exceptions, so that folks can filter these out if they really want to.

Also, doing this at import time isn't the best, as sometimes the import might be done before the user actually sees it (e.g. on notebook startup if colab adds some bigframes-specific hooks, for example). Can we move this to session creation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. Moved the check to session.init

if datetime.datetime.today() - datetime.datetime.strptime(
__release_date__, "%Y-%m-%d"
) > datetime.timedelta(days=365):
msg = f"Your BigFrames version {__version__} is beyond the support period. Please update to the lastest version."
Copy link
Collaborator

Choose a reason for hiding this comment

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

This feels a bit too precise. Support policies can change. Let's just say it's greater than 1 year old.

@GarrettWu GarrettWu removed their assignment Mar 6, 2025
@sycai sycai requested a review from tswast March 7, 2025 21:07
@sycai sycai changed the title feat: warn when the BigFrames version is beyond support period feat: warn when the BigFrames version is more than a year old Mar 10, 2025
@tswast tswast merged commit 00e0750 into main Mar 12, 2025
22 of 23 checks passed
@tswast tswast deleted the sycai_version_release_date branch March 12, 2025 20:38
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: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants