Skip to content

Commit

Permalink
Renames config property exclude_filters to exclude (#290)
Browse files Browse the repository at this point in the history
Fixes #289
  • Loading branch information
safaci2000 authored Sep 9, 2024
1 parent b02a854 commit 9b56e13
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tasks:
cmds:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- go install github.com/client9/misspell/cmd/misspell@latest
- go install github.com/securego/gosec/v2/cmd/gosec@master
- go install github.com/securego/gosec/v2/cmd/gosec@latest
- go install golang.org/x/vuln/cmd/govulncheck@latest
- go install github.com/vektra/mockery/v2@{{ .MOCKERY_VERSION}}
- go install github.com/goreleaser/goreleaser@{{ .RELEASER_VERSION }}
Expand Down
13 changes: 6 additions & 7 deletions config/importer-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ contexts:
min_length: 8
max_length: 20
connections:
exclude_filters:
- matches:
- field: "name"
regex: "DEV-*|-Dev-*"
- field: "type"
regex: "elasticsearch"
inclusive: true
filters:
- field: "name"
regex: "DEV-*|-Dev-*"
- field: "type"
regex: "elasticsearch"
inclusive: true
credential_rules:
- rules:
- field: "name"
Expand Down
2 changes: 1 addition & 1 deletion internal/api/orgs.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (extended *ExtendedApi) GetConfiguredOrgId(orgName string) (int64, error) {
var count uint = 5
//Giving user configured value preference over defaults
if config.Config().GetGDGConfig().GetAppGlobals().RetryCount != 0 {
count = uint(config.Config().GetGDGConfig().GetAppGlobals().RetryCount)
count = uint(config.Config().GetGDGConfig().GetAppGlobals().RetryCount) // #nosec G115
}
if config.Config().GetGDGConfig().GetAppGlobals().GetRetryTimeout() != time.Millisecond*100 {
delay = config.Config().GetGDGConfig().GetAppGlobals().GetRetryTimeout()
Expand Down
2 changes: 1 addition & 1 deletion internal/config/grafana_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type MonitoredOrgFolders struct {

// ConnectionSettings contains Filters and Matching Rules for Grafana
type ConnectionSettings struct {
FilterRules []MatchingRule `mapstructure:"exclude_filters" yaml:"exclude_filters,omitempty"`
FilterRules []MatchingRule `mapstructure:"filters" yaml:"filters,omitempty"`
MatchingRules []RegexMatchesList `mapstructure:"credential_rules" yaml:"credential_rules,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/gdg/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ contexts:
testing:
output_path: test/data
connections:
exclude_filters:
filters:
- field: "name"
regex: "Google Sheets"
- field: "type"
Expand Down
6 changes: 5 additions & 1 deletion website/content/docs/releases/gdg_0.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ toc: true

Release Date: TBD


### Breaking Changes
- [#289](https://github.com/esnet/gdg/issues/289)Config: Connection settings renamed `exclude_filters' to `filters`

### Changes
- Enterprise config flag removed, future versions will programmatically determining version of grafana.
- Enterprise config flag removed, future versions will programmatically determine version of grafana.
- [#283](https://github.com/esnet/gdg/issues/283) Fixing small bug with library connections
- [#288](https://github.com/esnet/gdg/pull/288) Enterprise: Connection permission will require min. v10.2.3

Expand Down

0 comments on commit 9b56e13

Please sign in to comment.