-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
Alerting: Fix notification channel migration #38983
Merged
Merged
Conversation
This file contains 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
papagian
requested review from
sdboyer and
ying-jeanne
and removed request for
a team
September 8, 2021 12:28
kylebrandt
approved these changes
Sep 8, 2021
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-38983-to-v8.1.x origin/v8.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x b56bf83c19fc8f2dafdc745f02283f7ff27a387e
# Push it to GitHub
git push --set-upstream origin backport-38983-to-v8.1.x
git switch main
# Remove the local backport branch
git branch -D backport-38983-to-v8.1.x Then, create a pull request where the |
papagian
added a commit
that referenced
this pull request
Sep 9, 2021
(cherry picked from commit b56bf83)
papagian
added a commit
that referenced
this pull request
Sep 9, 2021
stevepostill
pushed a commit
to Reveal-International/grafana
that referenced
this pull request
Nov 3, 2021
…-github to revdev * commit '56aebaac32bd7a82f84a571969b51c62ba54fd6d': (23 commits) "Release: Updated versions in package to 8.1.4" (grafana#39273) Docs: Update azuread docs to mention about env variables (grafana#39203) (grafana#39265) Docs: plugin migration guide 7.0.0 to 8.0.0 (grafana#38911) (grafana#39246) Docs: Added "manageAlerts" provisioning option. (grafana#38836) (grafana#39253) BarChart: Fix legend and tooltip colors off by 1 after data refresh (grafana#39234) (grafana#39252) Update silences.md (grafana#38834) (grafana#39243) Explore: Ensure logs volume bar colors match legend colors (grafana#39072) (grafana#39120) Graph: make old graph panel thresholds work even if ngalert is enabled (grafana#38918) (grafana#39233) Fix regex to identify / as separator (grafana#39220) [v8.1.x] BarChart: fix stale bar values and x axis labels Add link to default template (grafana#39106) (grafana#39138) Doc: Created a separate topic for AWS authentication (grafana#39012) (grafana#39160) LDAP: Search all DNs for users (grafana#38891) (grafana#39167) Docs: Fix broken link to signed GCS URLs docs (grafana#39144) (grafana#39149) [v8.1.x] Variables: Fix not updating inside a Panel when the preceding Row uses "Repeat For" (grafana#39141) Docs: Improve v8 upgrade notes for SQL data sources (grafana#38792) (grafana#39124) Explore: Trace view now shows trace start time in selected timezone (grafana#39054) (grafana#39093) Alerting: Fix notification channel migration (grafana#38983) (grafana#39053) Annotations: Fixes blank panels for queries with unknown data sources (grafana#39017) (grafana#39034) Copy cue.mod and packages/grafana-schema to container workdir (grafana#38998) (grafana#39018) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
add to changelog
area/backend/db/migration
area/backend
old backport v8.1.x
Mark PR for automatic backport to v8.1.x
type/bug
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.
What this PR does / why we need it:
Starting from grafana 7.2 notification channel secure settings are stored encrypted in the database. But for the existing alert notification channels, there was no automatic migration of storing sensitive settings encrypted. Therefore there can still exist such unencrypted secure settings (if the channel is not saved since upgrading to >= 7.2)
The dashboard alert migration when enabling the new alerting system takes cares of it and encrypts those settings so that all the secure settings are stored encrypted in the Alertmanager configuration stored in the database.
However, there was a bug in case such a migrated receiver was used in multiple contact points because we used to delete this setting. As a result, the secure setting was stored only the 1st time and was missing from all the rest.
Example of such problematic configuration
The
slack receiver
inautogen-contact-point-default
hasurl
property while not inautogen-contact-point-1
Special notes for your reviewer:
For reproducing the error one has to create an entry in the
alert_notification
table containing such an un-encrypted property (egurl
property under thesettings
column for a slack notifier), use this channel in more than one alerts and enablingngalert
.