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 tests to respond to Python 3.12 handling of utcnow in sentry-sdk #34946

Merged
merged 1 commit into from
Oct 14, 2023

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Oct 14, 2023

The sentry-sdk 1.32.0 released on 11th of October fixed handling of utcnow to make it future-compatible with Python 3.12. The breadcrumb timestamp returned was naive and now it is timezone aware with utc specified explicitly as timezone. This broke our tests.

The change in sentry that impacted it is
getsentry/sentry-python#2415

We use the opportunity also to bump sentry sdk minimum version to be 1.32.0 from very old 0.8.0 (from 2019). Sentry is a service, so they generally always want you to use the latest version, and sentry has very little requirements on its own to cause conflicts (for Python 3.8+ it only requires "certifi" without any specific limitations)


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

The sentry-sdk 1.32.0 released on 11th of October fixed handling of
utcnow to make it future-compatible with Python 3.12. The breadcrumb
timestamp returned was naive and now it is timezone aware with
utc specified explicitly as timezone. This broke our tests.

The change in sentry that impacted it is
getsentry/sentry-python#2415

We use the opportunity also to bump sentry sdk minimum version
to be 1.32.0 from very old 0.8.0 (from 2019). Sentry is a service, so
they generally always want you to use the latest version, and sentry has
very little requirements on its own to cause conflicts (for Python
3.8+ it only requires "certifi" without any specific limitations)
Copy link
Member

@hussein-awala hussein-awala left a comment

Choose a reason for hiding this comment

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

Great!

@potiuk potiuk merged commit 91581c4 into apache:main Oct 14, 2023
14 checks passed
@potiuk potiuk deleted the fix-failing-sentry-test branch October 14, 2023 17:38
@eladkal eladkal added this to the Airflow 2.7.3 milestone Oct 14, 2023
@eladkal eladkal added the type:misc/internal Changelog: Misc changes that should appear in change log label Oct 14, 2023
@potiuk potiuk mentioned this pull request Oct 14, 2023
potiuk added a commit that referenced this pull request Oct 29, 2023
…34946)

The sentry-sdk 1.32.0 released on 11th of October fixed handling of
utcnow to make it future-compatible with Python 3.12. The breadcrumb
timestamp returned was naive and now it is timezone aware with
utc specified explicitly as timezone. This broke our tests.

The change in sentry that impacted it is
getsentry/sentry-python#2415

We use the opportunity also to bump sentry sdk minimum version
to be 1.32.0 from very old 0.8.0 (from 2019). Sentry is a service, so
they generally always want you to use the latest version, and sentry has
very little requirements on its own to cause conflicts (for Python
3.8+ it only requires "certifi" without any specific limitations)

(cherry picked from commit 91581c4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:misc/internal Changelog: Misc changes that should appear in change log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants