Skip to content

Commit

Permalink
feat: Upgrade Go, dependencies and support source_tenants (#32)
Browse files Browse the repository at this point in the history
* feat: Upgrade Go, dependencies and support source_tenants
Signed-off-by: Martin Chodur <[email protected]>

* fix: remove redundand workflow

Signed-off-by: Martin Chodur <[email protected]>

---------

Signed-off-by: Martin Chodur <[email protected]>
  • Loading branch information
FUSAKLA authored Apr 28, 2023
1 parent e572bf1 commit d0bdb0e
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 116 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ name: Go

on:
push:
branches: [ master ]
tags:
- v*
branches:
- master
- main
pull_request:
branches: [ master ]

jobs:

Expand All @@ -16,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.19

- name: Golangci-lint
uses: golangci/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.19

- name: Login to Docker Hub
uses: docker/login-action@v1
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v2.5.0] - 2023-04-29

- Upgrade all dependencies
- Upgrade to Go 1.19
- Support `keep_firing_for` in alert rule
- Support `source_tenants` in rule group used by Cortex/Mimir
- Add linting to CI

## [v2.4.1] - 2023-01-10

- Fixed installation instructions in README.
Expand All @@ -28,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [v2.3.0] - 2022-06-07

- [#25](https://github.com/FUSAKLA/promruval/pull/25)
- [#25](https://github.com/FUSAKLA/promruval/pull/25)
- Delete forgotten debug print :ashamed:
- Redirect logging to stderr
- Log progress
Expand Down
3 changes: 3 additions & 0 deletions examples/rules/rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ groups:
foo: bar

- name: testGroup
partial_response_strategy: "warn"
source_tenants: ["tenant1", "tenant2"]
rules:
# Comment before.
# Comment on the same line. ignore_validations: expressionSelectorsMatchesAnything, expressionDoesNotUseOlderDataThan
# Comment after.
- alert: test
expr: avg_over_time(max_over_time(up{job="prometheus"}[10h] offset 10d)[10m:10m])
for: 4w
keep_firing_for: 5m
labels:
severity: critical
team: [email protected]
Expand Down
44 changes: 22 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/fusakla/promruval/v2
go 1.19

require (
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/bmatcuk/doublestar/v4 v4.0.2
github.com/creasty/defaults v1.6.0
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/common v0.39.0
github.com/prometheus/prometheus v0.41.0
github.com/sirupsen/logrus v1.8.1
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/bmatcuk/doublestar/v4 v4.6.0
github.com/creasty/defaults v1.7.0
github.com/prometheus/client_golang v1.15.0
github.com/prometheus/common v0.42.0
github.com/prometheus/prometheus v0.43.0
github.com/sirupsen/logrus v1.9.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v3 v3.0.1
gotest.tools v2.2.0+incompatible
Expand All @@ -18,18 +18,18 @@ require (
require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/aws/aws-sdk-go v1.44.159 // indirect
github.com/aws/aws-sdk-go v1.44.253 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/edsrzf/mmap-go v1.1.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
Expand All @@ -45,19 +45,19 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common/sigv4 v0.1.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
github.com/stretchr/testify v1.8.1 // indirect
go.opentelemetry.io/otel v1.11.2 // indirect
go.opentelemetry.io/otel/trace v1.11.2 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/stretchr/testify v1.8.2 // indirect
go.opentelemetry.io/otel v1.15.0 // indirect
go.opentelemetry.io/otel/trace v1.15.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/exp v0.0.0-20221212164502-fae10dda9338 // indirect
golang.org/x/net v0.4.0 // indirect
golang.org/x/oauth2 v0.3.0 // indirect
go.uber.org/goleak v1.2.1 // indirect
golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 // indirect
golang.org/x/net v0.9.0 // indirect
golang.org/x/oauth2 v0.7.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.3.0 // indirect
golang.org/x/text v0.5.0 // indirect
golang.org/x/sys v0.7.0 // indirect
golang.org/x/text v0.9.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Loading

0 comments on commit d0bdb0e

Please sign in to comment.