Skip to content

Sync #4407

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 20 commits into from
May 20, 2025
Merged

Sync #4407

merged 20 commits into from
May 20, 2025

Conversation

sentrivana
Copy link
Contributor


Thank you for contributing to sentry-python! Please add tests to validate your changes, and lint your code using tox -e linters.

Running the test suite on your PR might require maintainer approval.

AbhiPrasad and others added 20 commits May 9, 2025 14:35
As per https://develop.sentry.dev/sdk/telemetry/logs/#default-attributes
we should be using `sentry.message.parameter` (singular) instead of
`sentry.message.parameters`. This matches how we approach the other
attributes in our conventions.
- pyspark was failing to bind to an address
- aws_lambda fixed itself 🪄
When using the RedBeatScheduler, we're sending an extra in-progress
check-in at scheduler start. Since this is never followed by an ok or
error check-in, the check-in is marked as timed out in Sentry.

We're patching the scheduler's `maybe_due`, which (as the name implies)
[might not end up executing the
task](https://github.com/sibson/redbeat/blob/bdefad23b47f75e2e85d45f46f9f16dd00a93d40/redbeat/schedulers.py#L506-L508).
This is indeed what seems to be happening -- `maybe_due` is run when the
scheduler starts, but without scheduling the task. We don't check
whether `maybe_due` actually ended up scheduling anything and always
fire an in-progress check-in.

Patching the [scheduler's
`apply_async`](https://github.com/sibson/redbeat/blob/bdefad23b47f75e2e85d45f46f9f16dd00a93d40/redbeat/schedulers.py#L511)
instead.

Closes #4392
This commit enables the `keep_alive` option to be set via the
`SENTRY_KEEP_ALIVE` environment variable. When both the environment
variable and the argument are provided, the argument takes precedence.

Closes #4354
…4399)

We shouldn't have setup code in an integration's `__init__`. This can be
called an arbitrary amount of times. `setup_once` exists so that the
code is only guaranteed to run once.

Having integration setup in `__init__` also means that the integration
currently can't be disabled via `disabled_integrations`.

Fixes #4398
We need to send `warn` as the `severity_text` for warning level logs,
not `warning`.
If we send `warning` it will not be recognized by the backend and the
severity will show up as `UNKNOWN` in the frontend.
See screenshot for comparison of after and before.

![Screenshot 2025-05-16 at 18 24
50](https://github.com/user-attachments/assets/240e3c6d-0f68-49e8-b79b-a67ac0e8a5d4)
…4388)

When (at least) one of integrations is enabled (because some
dependencies
are installed in the environment), `sentry.sdk.name` is changed from
`sentry.python` to `sentry.python.[FIRST_ENABLED_INTEGRATION]` which
makes `test_logs_attributes` fail. Prevent failure by relaxing the
check.

This change is beneficial not only for packaging (this patch was
required
for packaging for Fedora), but also for running tests with `pytest`
directly.

See also: #4316

<!-- Describe your PR here -->

---

Thank you for contributing to `sentry-python`! Please add tests to
validate your changes, and lint your code using `tox -e linters`.

Running the test suite on your PR might require maintainer approval.
Fixes GH-3515

Increase test coverage for `attachments.py` and `utils.py`.

---------

Co-authored-by: Anton Pirker <[email protected]>
Bumps
[codecov/codecov-action](https://github.com/codecov/codecov-action) from
5.4.2 to 5.4.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/releases">codecov/codecov-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.3</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: OIDC on forks by <a
href="https://github.com/joseph-sentry"><code>@​joseph-sentry</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1823">codecov/codecov-action#1823</a></li>
<li>build(deps): bump github/codeql-action from 3.28.13 to 3.28.17 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1822">codecov/codecov-action#1822</a></li>
<li>chore(release): 5.4.3 by <a
href="https://github.com/thomasrockhu-codecov"><code>@​thomasrockhu-codecov</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1827">codecov/codecov-action#1827</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.2...v5.4.3">https://github.com/codecov/codecov-action/compare/v5.4.2...v5.4.3</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md">codecov/codecov-action's
changelog</a>.</em></p>
<blockquote>
<h2>v5.4.3</h2>
<h3>What's Changed</h3>
<ul>
<li>build(deps): bump github/codeql-action from 3.28.13 to 3.28.17 by
<code>@​app/dependabot</code> in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1822">codecov/codecov-action#1822</a></li>
<li>fix: OIDC on forks by <a
href="https://github.com/joseph-sentry"><code>@​joseph-sentry</code></a>
in <a
href="https://redirect.github.com/codecov/codecov-action/pull/1823">codecov/codecov-action#1823</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/codecov/codecov-action/compare/v5.4.2..v5.4.3">https://github.com/codecov/codecov-action/compare/v5.4.2..v5.4.3</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codecov/codecov-action/commit/18283e04ce6e62d37312384ff67231eb8fd56d24"><code>18283e0</code></a>
chore(release): 5.4.3 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1827">#1827</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/525fcbf8a05e5933b1ef3c7885da8fd1d7231920"><code>525fcbf</code></a>
build(deps): bump github/codeql-action from 3.28.13 to 3.28.17 (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1822">#1822</a>)</li>
<li><a
href="https://github.com/codecov/codecov-action/commit/b203f00e21e8678aa5d26b967170503dbb855a18"><code>b203f00</code></a>
fix: OIDC on forks (<a
href="https://redirect.github.com/codecov/codecov-action/issues/1823">#1823</a>)</li>
<li>See full diff in <a
href="https://github.com/codecov/codecov-action/compare/v5.4.2...v5.4.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codecov/codecov-action&package-manager=github_actions&previous-version=5.4.2&new-version=5.4.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anton Pirker <[email protected]>
Co-authored-by: Ivana Kellyer <[email protected]>
@sentrivana sentrivana changed the base branch from master to potel-base May 20, 2025 10:36
Copy link

codecov bot commented May 20, 2025

⚠️ Parser warning

The parser emitted a warning. Please review your JUnit XML file:

Warning while parsing testcase attributes: Limit of string is 1000 chars, for name, we got 2301 at 1:2560 in /home/runner/work/sentry-python/sentry-python/.junitxml

@sentrivana sentrivana merged commit 04add55 into potel-base May 20, 2025
125 checks passed
@sentrivana sentrivana deleted the ivana/potel/sync-6 branch May 20, 2025 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants