Skip to content

fix(taskworker) Pass project_id to find_channel_id_for_rule #91810

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 2 commits into from
May 16, 2025

Conversation

markstory
Copy link
Member

We can't pass project to this task as projects cannot be json encoded.

We can't pass project to this task as projects cannot be json encoded.
@markstory markstory requested a review from a team May 16, 2025 17:53
@markstory markstory requested review from a team as code owners May 16, 2025 17:53
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label May 16, 2025
@@ -800,6 +800,7 @@ def post(self, request: Request, project) -> Response:
"name": data["name"],
"environment": data.get("environment"),
"project": project,
"project_id": project.id,
Copy link
Member Author

Choose a reason for hiding this comment

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

Because find_channel_id_for_rule accepts kwargs adding this parameter will be safe. I'll still need a second change to remove the project parameter.

Copy link

codecov bot commented May 16, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes missing coverage. Please review.

Error parsing JUnit XML in /home/runner/work/sentry/sentry/.artifacts/pytest.junit.xml at 1:159171

Caused by:
RuntimeError: Error validating attribute

Caused by:
    string is too long
Files with missing lines Patch % Lines
...tegrations/slack/tasks/find_channel_id_for_rule.py 57.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #91810       +/-   ##
===========================================
+ Coverage   32.73%   80.29%   +47.56%     
===========================================
  Files        8741    10348     +1607     
  Lines      487207   586396    +99189     
  Branches    22554    22554               
===========================================
+ Hits       159477   470836   +311359     
+ Misses     327284   115114   -212170     
  Partials      446      446               

@markstory markstory merged commit cf3fd9c into master May 16, 2025
60 checks passed
@markstory markstory deleted the fix-slack-task-param branch May 16, 2025 21:18
markstory added a commit that referenced this pull request May 16, 2025
Continues #91810 by changing the call sites to not pass `project`
anymore.
markstory added a commit that referenced this pull request May 20, 2025
Continues #91810 by changing the call sites to not pass `project`
anymore.
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
We can't pass project to this task as projects cannot be json encoded.
andrewshie-sentry pushed a commit that referenced this pull request May 20, 2025
Continues #91810 by changing the call sites to not pass `project`
anymore.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants