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

hw(notifications): In-app notifications #76499

Closed
wants to merge 28 commits into from
Closed

Conversation

leeandher
Copy link
Member

todo

  • fill this in

@github-actions github-actions bot added Scope: Frontend Automatically applied to PRs that change frontend components Scope: Backend Automatically applied to PRs that change backend components labels Aug 23, 2024
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

Copy link
Contributor

This PR has a migration; here is the generated SQL for src/sentry/migrations/0752_add_notification_history_table.py ()

--
-- Create model NotificationHistory
--
CREATE TABLE "sentry_notificationhistory" ("id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "date_updated" timestamp with time zone NOT NULL, "date_added" timestamp with time zone NULL, "user_id" bigint NULL, "title" varchar NOT NULL, "description" varchar NOT NULL, "status" varchar NOT NULL, "source" varchar NOT NULL, "content" text NOT NULL, "team_id" bigint NULL);
ALTER TABLE "sentry_notificationhistory" ADD CONSTRAINT "sentry_notificationhistory_team_id_7d5d21c6_fk_sentry_team_id" FOREIGN KEY ("team_id") REFERENCES "sentry_team" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_notificationhistory" VALIDATE CONSTRAINT "sentry_notificationhistory_team_id_7d5d21c6_fk_sentry_team_id";
CREATE INDEX CONCURRENTLY "sentry_notificationhistory_user_id_299fa975" ON "sentry_notificationhistory" ("user_id");
CREATE INDEX CONCURRENTLY "sentry_notificationhistory_team_id_7d5d21c6" ON "sentry_notificationhistory" ("team_id");
--
-- Create constraint user_xor_team_required on model notificationhistory
--
ALTER TABLE "sentry_notificationhistory" ADD CONSTRAINT "user_xor_team_required" CHECK ((("user_id" IS NULL AND "team_id" IS NOT NULL) OR ("user_id" IS NOT NULL AND "team_id" IS NULL))) NOT VALID;
ALTER TABLE "sentry_notificationhistory" VALIDATE CONSTRAINT "user_xor_team_required";

Copy link

codecov bot commented Aug 23, 2024

❌ 67 Tests Failed:

Tests completed Failed Passed Skipped
25893 67 25826 202
View the top 3 failed tests by shortest run time
tests.sentry.backup.test_dependencies test_sorted
Stack Traces | 0.073s run time
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:72: in test_sorted
    assert_model_dependencies(expect, actual)
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:42: in assert_model_dependencies
    raise AssertionError(
#x1B[1m#x1B[31mE   AssertionError: Model dependency graph does not match fixture. This means that you have changed the model dependency graph in some load bearing way. If you are seeing this in CI, and the dependency changes are intentional, please run `bin/generate-model-dependency-fixtures` and re-upload:#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   --- #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   +++ #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   @@ -60,6 +60,7 @@#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE      "sentry.organizationaccessrequest",#x1B[0m
#x1B[1m#x1B[31mE      "sentry.notificationsettingprovider",#x1B[0m
#x1B[1m#x1B[31mE      "sentry.notificationsettingoption",#x1B[0m
#x1B[1m#x1B[31mE   +  "sentry.notificationhistory",#x1B[0m
#x1B[1m#x1B[31mE      "sentry.monitor",#x1B[0m
#x1B[1m#x1B[31mE      "sentry.lostpasswordhash",#x1B[0m
#x1B[1m#x1B[31mE      "sentry.integrationexternalproject",#x1B[0m
tests.sentry.backup.test_dependencies test_truncate
Stack Traces | 0.073s run time
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:81: in test_truncate
    assert_model_dependencies(expect, actual)
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:42: in assert_model_dependencies
    raise AssertionError(
#x1B[1m#x1B[31mE   AssertionError: Model dependency graph does not match fixture. This means that you have changed the model dependency graph in some load bearing way. If you are seeing this in CI, and the dependency changes are intentional, please run `bin/generate-model-dependency-fixtures` and re-upload:#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   --- #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   +++ #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   @@ -60,6 +60,7 @@#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE      "sentry_organizationaccessrequest",#x1B[0m
#x1B[1m#x1B[31mE      "sentry_notificationsettingprovider",#x1B[0m
#x1B[1m#x1B[31mE      "sentry_notificationsettingoption",#x1B[0m
#x1B[1m#x1B[31mE   +  "sentry_notificationhistory",#x1B[0m
#x1B[1m#x1B[31mE      "sentry_monitor",#x1B[0m
#x1B[1m#x1B[31mE      "sentry_lostpasswordhash",#x1B[0m
#x1B[1m#x1B[31mE      "sentry_integrationexternalproject",#x1B[0m
tests.sentry.backup.test_dependencies test_flat
Stack Traces | 0.123s run time
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:63: in test_flat
    assert_model_dependencies(expect, actual)
#x1B[1m#x1B[.../sentry/backup/test_dependencies.py#x1B[0m:42: in assert_model_dependencies
    raise AssertionError(
#x1B[1m#x1B[31mE   AssertionError: Model dependency graph does not match fixture. This means that you have changed the model dependency graph in some load bearing way. If you are seeing this in CI, and the dependency changes are intentional, please run `bin/generate-model-dependency-fixtures` and re-upload:#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   --- #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   +++ #x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE   @@ -478,6 +478,10 @@#x1B[0m
#x1B[1m#x1B[31mE   #x1B[0m
#x1B[1m#x1B[31mE        "sentry.notificationaction",#x1B[0m
#x1B[1m#x1B[31mE        "sentry.project"#x1B[0m
#x1B[1m#x1B[31mE      ],#x1B[0m
#x1B[1m#x1B[31mE   +  "sentry.notificationhistory": [#x1B[0m
#x1B[1m#x1B[31mE   +    "sentry.team",#x1B[0m
#x1B[1m#x1B[31mE   +    "sentry.user"#x1B[0m
#x1B[1m#x1B[31mE   +  ],#x1B[0m
#x1B[1m#x1B[31mE      "sentry.notificationmessage": [#x1B[0m
#x1B[1m#x1B[31mE        "sentry.alertruletriggeraction",#x1B[0m
#x1B[1m#x1B[31mE        "sentry.incident",#x1B[0m

To view individual test run time comparison to the main branch, go to the Test Analytics Dashboard

@getsantry
Copy link
Contributor

getsantry bot commented Sep 17, 2024

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Sep 17, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Oct 10, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Oct 10, 2024
@getsantry
Copy link
Contributor

getsantry bot commented Nov 2, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added Stale and removed Stale labels Nov 2, 2024
@leeandher leeandher closed this Nov 4, 2024
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 Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant