Skip to content
This repository was archived by the owner on Apr 7, 2024. It is now read-only.

Update alertmanager #21

Merged
merged 137 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
007c93e
chore: Let git ignore temporary files for ui/app
nekketsuuu Oct 24, 2021
78545d8
Document that matchers are ANDed together
mac-chaffee Nov 7, 2021
5e88a91
Remove extra parentheticals
mac-chaffee Nov 9, 2021
5414963
fix lint error
clyang82 Dec 9, 2021
5fa473c
Merge pull request #2785 from clyang82/fix_lint
simonpasquier Dec 17, 2021
ec83f71
Merge pull request #2758 from mac-chaffee/main
simonpasquier Dec 17, 2021
f8c06b4
config: root route should have empty matchers
philipgough Dec 2, 2021
4017d1a
Merge pull request #2780 from PhilipGough/conf-validation
simonpasquier Dec 17, 2021
8f54fac
Merge pull request #2747 from nekketsuuu/nekketsuuu-gitignore
simonpasquier Dec 17, 2021
a79a4ba
adding max_alerts parameter to slack webhook config
Nov 26, 2021
dcaa3a0
Merge pull request #2774 from prashbnair/issue-slack
simonpasquier Dec 21, 2021
48a9976
*: bump to Go 1.17 (#2792)
simonpasquier Dec 22, 2021
4520cef
Update common Prometheus files
prombot Dec 23, 2021
c0a7b75
Automate CSS-inlining for default HTML email template (#2798)
bison Jan 3, 2022
2bce868
go.{mod,sum}: update Go dependencies
simonpasquier Dec 17, 2021
c91717b
Merge pull request #2799 from simonpasquier/update-deps
simonpasquier Jan 11, 2022
ef25f81
amtool to support http_config to access alertmanager (#2764)
clyang82 Jan 19, 2022
ce01a67
notify/sns: detect FIFO topic based on the rendered value
simonpasquier Jan 21, 2022
cd57dee
config: delegate Sigv4 validation to the inner type
simonpasquier Jan 5, 2022
78a2d27
Merge pull request #2819 from simonpasquier/detect-fifo-topic
simonpasquier Jan 24, 2022
4dcc0d9
Merge pull request #2820 from simonpasquier/remove-unneeded-sigv4-val…
simonpasquier Jan 24, 2022
6618217
Correcting the condition for updating a silence. Earlier was checking…
Jan 12, 2022
77bdc89
Fix markdown list describing Alertmanager matchers
juliusv Feb 1, 2022
4030e36
Merge pull request #2823 from prometheus/fix-matcher-docs-markdown
juliusv Feb 1, 2022
a2d18c9
Return no error when deleting expired silence (#2817)
soonping-amzn Feb 22, 2022
d4573e2
Merge pull request #2800 from prometheus/repo_sync
simonpasquier Feb 22, 2022
1138a08
Adding telegram support (#2827)
timmilesdw Feb 22, 2022
cf9b763
Update common Prometheus files
prombot Mar 3, 2022
9f3a25d
Merge pull request #2838 from prometheus/repo_sync
simonpasquier Mar 4, 2022
3f42c5e
Merge pull request #2816 from prashbnair/update_check
simonpasquier Mar 4, 2022
d155153
Adds: Active time interval (#2779)
dubyte Mar 4, 2022
4e07f74
go.{mod,sum}: update dependencies (#2824)
simonpasquier Mar 8, 2022
a22abf0
Release 0.24.0-rc.0
simonpasquier Mar 10, 2022
cc51886
Update common Prometheus files
prombot Mar 14, 2022
e84b1b9
Merge pull request #2847 from prometheus/repo_sync
simonpasquier Mar 15, 2022
ec2f5f5
Merge pull request #2843 from simonpasquier/cut-0.24.0-rc.0
simonpasquier Mar 15, 2022
dd63d04
Add CLI args for snapshot intervals (#2849)
sed-i Mar 18, 2022
9519d1b
Release 0.24.0
simonpasquier Mar 24, 2022
b95215b
Merge pull request #2862 from simonpasquier/cut-v0.24.0
simonpasquier Mar 25, 2022
7612aa0
Revert "Release 0.24.0"
simonpasquier Mar 25, 2022
985c45a
Merge pull request #2863 from prometheus/revert-2862-cut-v0.24.0
simonpasquier Mar 25, 2022
f484b17
Merge pull request #2864 from simonpasquier/cut-v0.24.0
simonpasquier Mar 25, 2022
a6d10bd
Update golangci-lint and fix complaints (#2853)
metalmatze Mar 25, 2022
459acd3
Update common Prometheus files
prombot Mar 31, 2022
032e0cf
Merge pull request #2872 from prometheus/repo_sync
metalmatze Apr 5, 2022
71d61c9
fix comment (#2869)
mikechengwei Apr 8, 2022
74ebd3d
Package and ship frontend independenlty (#2893)
Apr 22, 2022
40426fc
Sort receiver stage constructions by pipeline order
juliusv Apr 29, 2022
f30aef2
Merge pull request #2901 from prometheus/sort-receiver-stages
juliusv May 2, 2022
35bf59f
Mixin: Rename exclusion rule from `panel-job-instance-rule` to `targe…
gotjosh May 2, 2022
34b4eba
Merge pull request #2904 from grafana/gotjosh/fix-mixtool-linter-errors
juliusv May 2, 2022
684484e
Remove unused Marker from Dispatcher struct (#2898)
juliusv May 2, 2022
710588f
Remove unneeded nil check before ranging over slice (#2900)
juliusv May 2, 2022
a38c5b8
Fix stopping of nil Dispatcher (#2897)
juliusv May 3, 2022
dcc92ed
Update common Prometheus files (#2907)
prombot May 4, 2022
8424947
docs: fix installation for go1.18 (#2859)
Dentrax May 4, 2022
23f961e
.circleci/config.yml: use supported machine image (#2909)
simonpasquier May 4, 2022
89de86f
config: fix validation of OpsGenie configuration
simonpasquier May 4, 2022
661d5c6
Mixin: Rename exclusion rule from `panel-job-instance-rule` to `targe…
gotjosh May 2, 2022
14b01e6
Merge pull request #2910 from simonpasquier/fix-opsgenie-configuratio…
simonpasquier May 5, 2022
423fa6e
Fix Markdown formatting bugs / typos in the config docs
juliusv May 13, 2022
73a3fb8
Fixup
juliusv May 14, 2022
f958b8b
Merge pull request #2922 from prometheus/fix-config-formatting
juliusv May 16, 2022
51a10f9
Update common Prometheus files (#2915)
prombot Jun 13, 2022
4d09995
Mixin: `template-job-rule` now only validates job and not both instan…
gotjosh Jun 15, 2022
805e505
Alert metric reports different results to what the user sees via API …
gotjosh Jun 16, 2022
ef786ea
Force close mock servers as part of v2 acceptance tests
gotjosh Jun 17, 2022
cfb909f
Marker: Rename `SetSilenced` to `SetActiveOrSilenced`
gotjosh Jun 14, 2022
f66bbab
Fix tests after rebase
gotjosh Jun 17, 2022
d2a1fd6
Merge pull request #2949 from gotjosh/misc-fixes-acceptance-tests
gotjosh Jun 27, 2022
3f3e2ce
Merge pull request #2950 from gotjosh/change-set-silenced-func-name
gotjosh Jun 27, 2022
c494009
Mixin: Fix mixin linting
gotjosh Jun 29, 2022
528b958
Merge pull request #2972 from prometheus/add-description-to-am-mixin
gotjosh Jun 30, 2022
a1dbacb
Create dependabot.yml
Jul 4, 2022
4abf1bf
fixed oauth2 doc to reflect tls_config (#2979)
majolo Jul 4, 2022
cad7bda
Update common Prometheus files
prombot Jul 4, 2022
cb00d92
Issue #2850: Add benbjohnson/clock to the silences package.
joeblubaugh Mar 28, 2022
bedd3c4
Clean up linter warnings about unused code and atomic package
joeblubaugh Mar 29, 2022
c9249a0
Remove a stray line that was breaking the linter.
joeblubaugh Mar 29, 2022
0c3bf4b
Loosen up the timing on an Eventually to avoid CI timeout
joeblubaugh Mar 29, 2022
505f944
Apply suggestions from code review.
joeblubaugh May 5, 2022
a68fcc0
Merge pull request #2867 from joeblubaugh/joeblubaugh/2850/clock-clock
gotjosh Jul 5, 2022
34e60d2
notify/telegram: Set API and ParseMode defaults
metalmatze Apr 5, 2022
3ccff53
notify/telegram: Update to use default telegram config
metalmatze Jun 3, 2022
2785325
notify/telegram: Fix test
metalmatze Jun 3, 2022
d4c2048
Merge pull request #2981 from metalmatze/telegram-defaults
gotjosh Jul 5, 2022
01d1e49
Simplify Silence test to remove unnecessary wait.
joeblubaugh Jul 5, 2022
b9149c6
Merge pull request #2983 from joeblubaugh/joeblubaugh/simpler-silence…
gotjosh Jul 6, 2022
3f6b65c
Merge pull request #2914 from 3clypse/patch-1
gotjosh Jul 6, 2022
390fc43
Bump github.com/go-openapi/spec from 0.20.4 to 0.20.6
dependabot[bot] Jul 6, 2022
512138d
Refactor POST /api/v1/silences
gotjosh Jul 6, 2022
17af1d6
Merge pull request #2989 from prometheus/dependabot/go_modules/github…
gotjosh Jul 7, 2022
0d7c9db
Bump github.com/go-openapi/validate from 0.21.0 to 0.22.0
dependabot[bot] Jul 7, 2022
4b8b6c1
Merge pull request #2987 from prometheus/dependabot/go_modules/github…
gotjosh Jul 7, 2022
cbc94fa
Acceptance Tests: Better error messages
gotjosh Jul 7, 2022
f9c1c90
Merge pull request #2994 from prometheus/better-failure-acceptance
gotjosh Jul 8, 2022
da6de1f
docs: correct the accepted value for X-XSS-Protection header (#3004)
heylongdacoder Jul 13, 2022
0fbc2a7
Merge pull request #2992 from prometheus/update-silence-api-tests
gotjosh Jul 18, 2022
7c22040
Merge pull request #3007 from prometheus/release-0.24
Jul 18, 2022
af5f6b7
Release 0.24.0
simonpasquier Mar 24, 2022
b1438cc
Merge pull request #3008 from roidelapluie/releaseagain
Jul 18, 2022
791e542
Remove ioutil
inosato Jul 18, 2022
d8adde5
Move api error logs to debug
sinkingpoint Jul 20, 2022
b0c2f27
Update build
SuperQ Jul 23, 2022
155a47f
Merge pull request #3017 from prometheus/superq/build
SuperQ Jul 25, 2022
f54b4cc
Bump github.com/aws/aws-sdk-go from 1.43.11 to 1.44.61
dependabot[bot] Jul 25, 2022
b55097f
Merge pull request #3009 from inosato/remove-ioutil
SuperQ Jul 25, 2022
6af14b0
Merge pull request #3019 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
d2f561a
Bump github.com/go-kit/log from 0.2.0 to 0.2.1
dependabot[bot] Jul 25, 2022
8255bd4
Merge pull request #3001 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
c5c8f70
Bump golang.org/x/tools from 0.1.9 to 0.1.11
dependabot[bot] Jul 25, 2022
d335e07
Merge pull request #3021 from prometheus/dependabot/go_modules/golang…
SuperQ Jul 25, 2022
7a9ae88
Bump github.com/go-openapi/runtime from 0.23.1 to 0.24.1
dependabot[bot] Jul 25, 2022
96ba67d
Speedup CI builds
SuperQ Jul 25, 2022
16b4c3d
Merge pull request #3023 from prometheus/superq/speedup_build
SuperQ Jul 25, 2022
184693e
Merge pull request #3022 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
566b695
Bump github.com/stretchr/testify from 1.7.0 to 1.8.0
dependabot[bot] Jul 25, 2022
50a0f0c
Bump github.com/go-openapi/strfmt from 0.21.2 to 0.21.3
dependabot[bot] Jul 25, 2022
d847198
Merge pull request #2991 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
1a9f55b
Merge pull request #3020 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
135807d
Bump github.com/cenkalti/backoff/v4 from 4.1.2 to 4.1.3
dependabot[bot] Jul 25, 2022
b5eb84a
Merge pull request #3000 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
d990526
Bump github.com/prometheus/common from 0.32.1 to 0.37.0
dependabot[bot] Jul 25, 2022
7b8a514
Update config test to match new prometheus common.
SuperQ Jul 25, 2022
6c6bed4
Merge pull request #3010 from prometheus/dependabot/go_modules/github…
SuperQ Jul 25, 2022
ece7184
Bump github.com/aws/aws-sdk-go from 1.44.61 to 1.44.66
dependabot[bot] Aug 1, 2022
798d24a
Bump golang.org/x/tools from 0.1.11 to 0.1.12
dependabot[bot] Aug 1, 2022
ddc37ba
Bump github.com/hashicorp/memberlist from 0.3.1 to 0.3.2
dependabot[bot] Aug 1, 2022
69b05ec
Bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2
dependabot[bot] Aug 1, 2022
6bd94f2
Merge pull request #3031 from prometheus/dependabot/go_modules/github…
Aug 2, 2022
5409511
Merge pull request #3029 from prometheus/dependabot/go_modules/golang…
Aug 2, 2022
348efda
Merge pull request #3028 from prometheus/dependabot/go_modules/github…
simonpasquier Aug 5, 2022
41231d7
Merge pull request #3030 from prometheus/dependabot/go_modules/github…
simonpasquier Aug 5, 2022
5b30f89
Merge pull request #2980 from prometheus/repo_sync
simonpasquier Aug 5, 2022
c732372
Merge pull request #3013 from sinkingpoint/sinkingpoint/log_change
simonpasquier Aug 5, 2022
124e9f9
merge
cl-bvl Aug 17, 2022
8074ac3
Fix merge
cl-bvl Aug 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
277 changes: 144 additions & 133 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,155 +1,166 @@
---
version: 2.1

orbs:
prometheus: prometheus/prometheus@0.11.0
go: circleci/go@0.2.0

prometheus: prometheus/prometheus@0.16.0
go: circleci/go@1.7.0
jobs:
test_frontend:
# We need to use a machine executor because the front-end validation runs
# containers with mounted volumes which isn't supported with the docker
# executor (even with setup_remote_docker).
machine: true
machine:
image: ubuntu-2204:current
steps:
- checkout
- run: sudo service docker restart
- run:
name: Remove existing Go installation
command: sudo rm -rf /usr/local/go
# Whenever the Go version is updated here, .promu.yml should also be updated.
- go/install:
version: "1.16"
- run:
name: Remove generated code
command: make clean
- run:
name: Generate front-end code
command: make all
working_directory: ~/project/ui/app
environment:
JUNIT_DIR: ~/test-results
- run:
name: Generate assets
command: make assets
- run:
name: Generate API v2 code
command: make apiv2
- run: git diff --exit-code
- store_test_results:
path: ~/test-results

- checkout
- run: sudo service docker restart
- run:
name: Remove existing Go installation
command: sudo rm -rf /usr/local/go
# Whenever the Go version is updated here, .promu.yml should also be updated.
- go/install:
version: "1.18"
- run:
name: Remove generated code
command: make clean
- run:
name: Generate front-end code
command: make all
working_directory: ~/project/ui/app
environment:
JUNIT_DIR: ~/test-results
- run:
name: Generate assets
command: make assets
- run:
name: Generate API v2 code
command: make apiv2
- run: git diff --exit-code
- store_test_results:
path: ~/test-results
- run:
name: Save assets
command: make assets-tarball
- persist_to_workspace:
root: .
paths:
- .tarballs
test:
docker:
# Whenever the Go version is updated here, .promu.yml should also be updated.
- image: circleci/golang:1.16
# maildev containers are for running the email tests against a "real" SMTP server.
# See notify/email_test.go for details.
- image: djfarrelly/maildev:1.1.0
name: maildev-noauth
entrypoint: bin/maildev
command:
- -v
- image: djfarrelly/maildev:1.1.0
name: maildev-auth
entrypoint: bin/maildev
command:
- -v
- --incoming-user
- user
- --incoming-pass
- pass

# Whenever the Go version is updated here, .promu.yml should also be updated.
- image: quay.io/prometheus/golang-builder:1.18-base
# maildev containers are for running the email tests against a "real" SMTP server.
# See notify/email_test.go for details.
- image: maildev/maildev:1.1.0
name: maildev-noauth
entrypoint: bin/maildev
command:
- -v
- image: maildev/maildev:1.1.0
name: maildev-auth
entrypoint: bin/maildev
command:
- -v
- --incoming-user
- user
- --incoming-pass
- pass
environment:
EMAIL_NO_AUTH_CONFIG: /tmp/smtp_no_auth.yml
EMAIL_AUTH_CONFIG: /tmp/smtp_auth.yml

steps:
- prometheus/setup_environment
- go/load-cache:
key: v1-go-mod
- run:
command: |
cat \<<EOF > $EMAIL_NO_AUTH_CONFIG
smarthost: maildev-noauth:1025
server: http://maildev-noauth:1080/
EOF
cat \<<EOF > $EMAIL_AUTH_CONFIG
smarthost: maildev-auth:1025
server: http://maildev-auth:1080/
username: user
password: pass
EOF
- run:
command: make
environment:
# By default Go uses GOMAXPROCS but a Circle CI executor has many
# cores (> 30) while the CPU and RAM resources are throttled. If we
# don't limit this to the number of allocated cores, the job is
# likely to get OOMed and killed.
GOOPTS: "-p 2"
- prometheus/check_proto:
version: "3.15.8"
- prometheus/store_artifact:
file: alertmanager
- prometheus/store_artifact:
file: amtool
- go/save-cache:
key: v1-go-mod
- store_test_results:
path: test-results

- prometheus/setup_environment
- go/load-cache:
key: v1-go-mod
- run:
command: |
cat \<<EOF > $EMAIL_NO_AUTH_CONFIG
smarthost: maildev-noauth:1025
server: http://maildev-noauth:1080/
EOF
cat \<<EOF > $EMAIL_AUTH_CONFIG
smarthost: maildev-auth:1025
server: http://maildev-auth:1080/
username: user
password: pass
EOF
- run:
command: make
environment:
# By default Go uses GOMAXPROCS but a Circle CI executor has many
# cores (> 30) while the CPU and RAM resources are throttled. If we
# don't limit this to the number of allocated cores, the job is
# likely to get OOMed and killed.
GOOPTS: "-p 2"
- prometheus/check_proto:
version: "3.15.8"
- prometheus/store_artifact:
file: alertmanager
- prometheus/store_artifact:
file: amtool
- go/save-cache:
key: v1-go-mod
- store_test_results:
path: test-results
mixin:
docker:
# Whenever the Go version is updated here, .promu.yml should also be updated.
- image: circleci/golang:1.16

# Whenever the Go version is updated here, .promu.yml should also be updated.
- image: quay.io/prometheus/golang-builder:1.18-base
steps:
- checkout
- run: cd doc/alertmanager-mixin; go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
- run: cd doc/alertmanager-mixin; go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
- run: cd doc/alertmanager-mixin; go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- run: cd doc/alertmanager-mixin; make lint

- checkout
- run: go install github.com/monitoring-mixins/mixtool/cmd/mixtool@latest
- run: go install github.com/google/go-jsonnet/cmd/jsonnetfmt@latest
- run: go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@latest
- run: make -C doc/alertmanager-mixin lint
workflows:
version: 2
alertmanager:
jobs:
- test_frontend:
filters:
tags:
only: /.*/
- test:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
parallelism: 8
filters:
tags:
only: /.*/
- mixin:
filters:
tags:
only: /.*/
- prometheus/publish_main:
context: org-context
requires:
- test_frontend
- test
- build
filters:
branches:
only: main
- prometheus/publish_release:
context: org-context
requires:
- test_frontend
- test
- build
filters:
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
- test_frontend:
filters:
tags:
only: /.*/
- test:
filters:
tags:
only: /.*/
- prometheus/build:
name: build
parallelism: 3
promu_opts: "-p linux/amd64 -p windows/amd64 -p linux/arm64 -p darwin/amd64 -p darwin/arm64 -p linux/386"
filters:
tags:
ignore: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /^(main|release-.*|.*build-all.*)$/
- prometheus/build:
name: build_all
parallelism: 12
filters:
branches:
only: /^(main|release-.*|.*build-all.*)$/
tags:
only: /^v2(\.[0-9]+){2}(-.+|[^-.]*)$/
- mixin:
filters:
tags:
only: /.*/
- prometheus/publish_main:
context: org-context
requires:
- test_frontend
- test
- build_all
filters:
branches:
only: main
- prometheus/publish_release:
context: org-context
requires:
- test_frontend
- test
- build_all
filters:
tags:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "monthly"
53 changes: 49 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,58 @@
---
run:
deadline: 5m
skip-files:
# Skip autogenerated files.
- ^.*\.(pb|y)\.go$

output:
sort-results: true

linters:
enable:
- depguard
- gofumpt
- goimports
- revive
- misspell

issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
- path: _test.go
linters:
- errcheck

linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
- github.com/stretchr/testify/assert: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert"
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
errcheck:
exclude: scripts/errcheck_excludes.txt
goimports:
local-prefixes: github.com/prometheus/alertmanager
gofumpt:
extra-rules: true
revive:
rules:
- name: exported
arguments: ["disableStutteringCheck"]
- name: blank-imports
- name: context-as-argument
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: if-return
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: unexported-return
- name: indent-error-flow
- name: errorf
2 changes: 1 addition & 1 deletion .promu.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go:
# Whenever the Go version is updated here, .travis.yml and
# .circle/config.yml should also be updated.
version: 1.16
version: 1.18
repository:
path: github.com/prometheus/alertmanager
build:
Expand Down
Loading