Repository navigation
Alert channel takes alerts only: every team message routed by kind - #838
Merged
Merged
Conversation
Every team-wide message is an alert, action or update, and picks its channels through notify::route by that kind. An alert channel saved before kinds existed takes alerts only; action and updates go to a new updates channel. The merge gate never posts waits on people's reviews to a channel and posts a conflict that needs a person once per PR and reason.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A team's alert channel got routine auto-merge status cards (merge conflicts, waits on an approving review). Every sender that wanted "the team's channel" opened the alert channel's settings item itself: the merge gate, security and infrastructure cards, plugin reviews, turned-off webhook endpoints, knowledge sign-ins, and log findings whose own setting was never saved. The merge gate also posted once per commit and wording, and posted waits on people's reviews, which are a pull request's normal state.
Every team-wide message now has a kind (alert, action or update), and its channels come from one router by kind. The alert channel takes alerts only unless the team ticks more; action and updates go to a new updates channel, or nowhere when there is none.
Changes
common::notify::route:Kind(alert, action, update), the kind of every message label, and per-destinationkinds. The alert channel (ALERT_NOTIFY) saved before kinds existed reads as alerts only, the new updates channel (UPDATES_NOTIFY) as action and update. Reading old items this way is the migration: no write is needed and existing alert channels stop getting non-alerts at once. A test fails if any other file reads the alert channel's item.await_merge): a wait on people's reviews never posts to a channel; the PR's status comment says it once. A conflict a person must resolve posts only where action messages go, once per PR and reason (told_sk), not once per commit or wording.GET/PUT /api/updates-notify;/api/alert-notifyreturns and acceptskinds(left out, the saved kinds stay); test messages for theupdatesdestination.nt_alerts_channel_alerts_onlyand its page.Verification
cargo fmt --all --check,rustfmt --check --edition 2021 worker/src/passes/incidents/*.rscargo clippy -p common -p gateway -p worker --all-targets -- -D warningscargo test -p common -p gateway -p workerpython3 -m pytest lambda/tests/test_log_analyzer.py