Skip to content

Commit

Permalink
chore: bump version v3 (#84)
Browse files Browse the repository at this point in the history
* chore: bump version v3

Signed-off-by: Martin Chodur <m.chodur@seznam.cz>

* fix: changelog

Signed-off-by: Martin Chodur <m.chodur@seznam.cz>

---------

Signed-off-by: Martin Chodur <m.chodur@seznam.cz>
  • Loading branch information
FUSAKLA authored Jul 23, 2024
1 parent 3c4dcbc commit 928ce9d
Show file tree
Hide file tree
Showing 20 changed files with 45 additions and 42 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.0] - 2024-07-23

- Changed: Updated README.md installation instructions, to install latest version use `go install github.com/fusakla/promruval/v3`.
- Fixed: :warning: **Unmarshalling of the rule files is strict again**, this behavior was unintentionally brought when adding support for yaml comments.
- Changed: :warning: **Renamed `hasValidPartialStrategy` to `hasValidPartialResponseStrategy`** as it was documented so it is actually a fix
- Changed: :warning: **Disallow special rule file fields of Thanos, Mimir or Loki by default**
Expand Down Expand Up @@ -152,7 +155,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#30](https://github.com/FUSAKLA/promruval/pull/30)
- Upgrade Go to 1.19.
- :warning: CHANGE - go.mod version bumped to match the project major version, if you use promruval as a library,
make sure to change the package to `github.com/fusakla/promruval/v2`.
make sure to change the package to `github.com/fusakla/promruval/v3`.
- :warning: CHANGE - Updated README.md installation instructions, to install latest version use `go install github.com/fusakla/promruval/v2`.


Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Using [prebuilt binaries](https://github.com/FUSAKLA/promruval/releases/latest),
[Docker image](https://hub.docker.com/r/fusakla/promruval) of build it yourself.

```bash
go install github.com/fusakla/promruval/v2@latest
go install github.com/fusakla/promruval/v3@latest
```

or
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/fusakla/promruval/v2
module github.com/fusakla/promruval/v3

go 1.22.0

Expand Down
14 changes: 7 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (

"github.com/alecthomas/kingpin/v2"
doublestar "github.com/bmatcuk/doublestar/v4"
"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/report"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v2/pkg/validate"
"github.com/fusakla/promruval/v2/pkg/validationrule"
"github.com/fusakla/promruval/v2/pkg/validator"
"github.com/fusakla/promruval/v3/pkg/config"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/report"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/validate"
"github.com/fusakla/promruval/v3/pkg/validationrule"
"github.com/fusakla/promruval/v3/pkg/validator"
log "github.com/sirupsen/logrus"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/prometheus/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"time"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v3/pkg/config"
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sync"
"time"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v3/pkg/config"
"github.com/grafana/dskit/user"
"github.com/prometheus/client_golang/api"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
Expand Down
2 changes: 1 addition & 1 deletion pkg/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v3/pkg/config"
"gopkg.in/yaml.v3"
)

Expand Down
12 changes: 6 additions & 6 deletions pkg/validate/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"strings"
"time"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/report"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v2/pkg/validationrule"
"github.com/fusakla/promruval/v2/pkg/validator"
"github.com/fusakla/promruval/v3/pkg/config"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/report"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/validationrule"
"github.com/fusakla/promruval/v3/pkg/validator"
"github.com/google/go-jsonnet"
"github.com/prometheus/prometheus/model/rulefmt"
log "github.com/sirupsen/logrus"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validationrule/validation_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package validationrule
import (
"reflect"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v2/pkg/validator"
"github.com/fusakla/promruval/v3/pkg/config"
"github.com/fusakla/promruval/v3/pkg/validator"
)

type ValidatorWithDetails interface {
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/promql"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/annotations.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

"github.com/asaskevich/govalidator"
"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/promql"

Expand Down
2 changes: 1 addition & 1 deletion pkg/validator/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"maps"

"github.com/fusakla/promruval/v2/pkg/config"
"github.com/fusakla/promruval/v3/pkg/config"
"gopkg.in/yaml.v3"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"strings"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/rulefmt"
"golang.org/x/exp/slices"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"gopkg.in/yaml.v3"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/prometheus/model/rulefmt"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/logql_expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package validator
import (
"fmt"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/grafana/loki/v3/pkg/logql/syntax"
"github.com/prometheus/prometheus/model/rulefmt"
"gopkg.in/yaml.v3"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/others.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"regexp"
"strings"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/prometheus/model/rulefmt"
"golang.org/x/exp/slices"
"gopkg.in/yaml.v3"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/promql_expression.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"time"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/rulefmt"
"github.com/prometheus/prometheus/promql/parser"
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/recording_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"regexp"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/prometheus/model/rulefmt"
"gopkg.in/yaml.v3"
)
Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package validator
import (
"fmt"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/prometheus/model/rulefmt"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/validator/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/fusakla/promruval/v2/pkg/prometheus"
"github.com/fusakla/promruval/v2/pkg/unmarshaler"
"github.com/fusakla/promruval/v3/pkg/prometheus"
"github.com/fusakla/promruval/v3/pkg/unmarshaler"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/rulefmt"
"gotest.tools/assert"
Expand Down

0 comments on commit 928ce9d

Please sign in to comment.