Skip to content
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

Scan for all rules when running pint ci #803

Merged
merged 5 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/spellcheck/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ APIs
automaxprocs
BitBucket
bool
ci
changelog
Changelog
CLI
Expand All @@ -17,6 +18,7 @@ github
GOGC
golang
GOMAXPROCS
hcl
HCL
hoc
hostname
Expand Down Expand Up @@ -50,5 +52,6 @@ uptime
URI
URIs
validator
VCS
yaml
YAML
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ jobs:
run: make build

- name: Run pint ci
run: ./pint -c .github/pint/pint.hcl ci
run: ./pint -l debug -c .github/pint/pint.hcl ci
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 10 additions & 2 deletions cmd/pint/ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,17 @@ func actionCI(c *cli.Context) error {
return nil
}

slog.Info("Finding all rules to check on current git branch", slog.String("base", baseBranch))

var entries []discovery.Entry
finder := discovery.NewGitBranchFinder(git.RunGit, includeRe, excludeRe, baseBranch, meta.cfg.CI.MaxCommits, meta.cfg.Parser.CompileRelaxed())
entries, err = finder.Find()
filter := git.NewPathFilter(includeRe, excludeRe, meta.cfg.Parser.CompileRelaxed())

entries, err = discovery.NewGlobFinder([]string{"*"}, filter).Find()
if err != nil {
return err
}

entries, err = discovery.NewGitBranchFinder(git.RunGit, filter, baseBranch, meta.cfg.CI.MaxCommits).Find(entries)
if err != nil {
return err
}
Expand Down
4 changes: 3 additions & 1 deletion cmd/pint/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/cloudflare/pint/internal/checks"
"github.com/cloudflare/pint/internal/config"
"github.com/cloudflare/pint/internal/discovery"
"github.com/cloudflare/pint/internal/git"
"github.com/cloudflare/pint/internal/reporter"

"github.com/urfave/cli/v2"
Expand Down Expand Up @@ -60,7 +61,8 @@ func actionLint(c *cli.Context) error {
return fmt.Errorf("at least one file or directory required")
}

finder := discovery.NewGlobFinder(paths, meta.cfg.Parser.CompileRelaxed())
slog.Info("Finding all rules to check", slog.Any("paths", paths))
finder := discovery.NewGlobFinder(paths, git.NewPathFilter(nil, nil, meta.cfg.Parser.CompileRelaxed()))
entries, err := finder.Find()
if err != nil {
return err
Expand Down
6 changes: 4 additions & 2 deletions cmd/pint/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func checkRules(ctx context.Context, workers int, gen *config.PrometheusGenerato
wg.Wait()
}()

var onlineChecksCount, offlineChecksCount atomic.Int64
var onlineChecksCount, offlineChecksCount, checkedEntriesCount atomic.Int64
go func() {
for _, entry := range entries {
switch {
Expand Down Expand Up @@ -126,6 +126,7 @@ func checkRules(ctx context.Context, workers int, gen *config.PrometheusGenerato
)
}

checkedEntriesCount.Inc()
checkList := cfg.GetChecksForRule(ctx, gen, entry, entry.DisabledChecks)
for _, check := range checkList {
checkIterationChecks.Inc()
Expand Down Expand Up @@ -156,7 +157,8 @@ func checkRules(ctx context.Context, workers int, gen *config.PrometheusGenerato
}
summary.SortReports()
summary.Duration = time.Since(start)
summary.Entries = len(entries)
summary.TotalEntries = len(entries)
summary.CheckedEntries = checkedEntriesCount.Load()
summary.OnlineChecks = onlineChecksCount.Load()
summary.OfflineChecks = offlineChecksCount.Load()

Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0018_match_alerting.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=colo:recording lines=1-2
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/0001.yml rule=colo:recording
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0019_match_recording.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=colo:recording lines=1-2
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/aggregate(job:true)"] path=rules/0001.yml rule=colo:recording
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0020_ignore_kind.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=colo:recording lines=4-5
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/aggregate(job:true)"] path=rules/0001.yml rule=colo:recording
Expand Down
4 changes: 4 additions & 0 deletions cmd/pint/tests/0028_ci_git_error.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ level=INFO msg="Loading configuration file" path=.pint.hcl
level=DEBUG msg="Running git command" args=["rev-parse","--abbrev-ref","HEAD"]
level=DEBUG msg="Got branch information" base=notmain current=v2
level=INFO msg="Finding all rules to check on current git branch" base=notmain
level=DEBUG msg="Excluding git directory from glob results" path=.git glob=*
level=DEBUG msg="File parsed" path=.pint.hcl rules=0
level=DEBUG msg="File parsed" path=rules.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Running git command" args=["log","--format=%H","--no-abbrev-commit","--reverse","notmain..HEAD"]
level=ERROR msg="Fatal error" err="failed to get the list of commits to scan: fatal: ambiguous argument 'notmain..HEAD': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"
-- src/v1.yml --
Expand Down
2 changes: 1 addition & 1 deletion cmd/pint/tests/0032_ci_github.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ parser {
repository {
github {
baseuri = "http://127.0.0.1:6032"
uploaduri = "http://127.0.0.1:6032"
uploaduri = "http://127.0.0.1:6032"
owner = "cloudflare"
repo = "pint"
}
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0037_disable_checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=3
level=DEBUG msg="Glob finder completed" count=3
level=INFO msg="Configured new Prometheus server" name=prom uris=1 uptime=up tags=[] include=[] exclude=[]
level=DEBUG msg="Starting query workers" name=prom uri=http://127.0.0.1 workers=16
level=DEBUG msg="Generated all Prometheus servers" count=1
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0039_prom_selected_path.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=3
level=DEBUG msg="Glob finder completed" count=3
level=INFO msg="Configured new Prometheus server" name=disabled uris=1 uptime=up tags=[] include=["^invalid/.+$"] exclude=["^invalid/rules/.+$"]
level=DEBUG msg="Starting query workers" name=disabled uri=http://127.0.0.1:123 workers=16
level=DEBUG msg="Generated all Prometheus servers" count=1
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0040_rule_match_label.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/rules.yml rules=4
level=DEBUG msg="Glob finder completed" count=4
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/rules.yml record=ignore lines=1-2
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/rules.yml rule=ignore
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0052_match_multiple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=colo:recording lines=4-5
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/aggregate(job:true)"] path=rules/0001.yml rule=colo:recording
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0053_ignore_multiple.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=colo:recording lines=4-5
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/0001.yml rule=colo:recording
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0092_dir_symlink.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cmp stderr stderr.txt
-- stderr.txt --
level=INFO msg="Finding all rules to check" paths=["rules","linked","rules/src/rule.yaml"]
level=DEBUG msg="File parsed" path=rules/src/rule.yaml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/src/rule.yaml record=down lines=4-5
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/src/rule.yaml rule=down
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0095_rulefmt_symlink.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/relaxed/1.yml rules=1
level=DEBUG msg="File parsed" path=rules/strict/symlink.yml rules=1
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/relaxed/1.yml record=foo lines=1-2
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/relaxed/1.yml rule=foo
Expand Down
2 changes: 1 addition & 1 deletion cmd/pint/tests/0096_bad_symlink.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ cmp stderr stderr.txt

-- stderr.txt --
level=INFO msg="Finding all rules to check" paths=["rules"]
level=ERROR msg="Fatal error" err="lstat rules/../bad.yml: no such file or directory"
level=ERROR msg="Fatal error" err="rules/symlink.yml is a symlink but target file cannot be evaluated: lstat rules/../bad.yml: no such file or directory"
1 change: 1 addition & 0 deletions cmd/pint/tests/0099_symlink_outside_glob.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules/relaxed"]
level=DEBUG msg="File parsed" path=rules/relaxed/1.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/relaxed/1.yml record=foo lines=1-2
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/relaxed/1.yml rule=foo
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0103_file_disable.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=INFO msg="Configured new Prometheus server" name=prom uris=1 uptime=up tags=[] include=[] exclude=[]
level=DEBUG msg="Starting query workers" name=prom uri=http://127.0.0.1:7103 workers=16
level=DEBUG msg="Generated all Prometheus servers" count=1
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0111_snooze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=sum-job lines=2-3
level=DEBUG msg="Check snoozed by comment" check=promql/aggregate(job:true) match=promql/aggregate until="2099-11-28T10:24:18Z"
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0112_expired_snooze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=sum-job lines=2-3
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/for","alerts/comparison","alerts/template","promql/fragile","promql/regexp","promql/aggregate(job:true)"] path=rules/0001.yml rule=sum-job
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0115_file_disable_tag.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=INFO msg="Configured new Prometheus server" name=prom uris=1 uptime=up tags=["foo","bar"] include=[] exclude=[]
level=DEBUG msg="Starting query workers" name=prom uri=http://127.0.0.1:7103 workers=16
level=DEBUG msg="Generated all Prometheus servers" count=1
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0116_file_snooze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="Check snoozed by comment" check=promql/aggregate(job:true) match=promql/aggregate(job:true) until="2099-11-28T10:24:18Z"
level=DEBUG msg="Check snoozed by comment" check=alerts/for match=alerts/for until="2099-11-28T10:24:18Z"
level=DEBUG msg="File parsed" path=rules/0001.yml rules=2
level=DEBUG msg="Glob finder completed" count=2
level=DEBUG msg="Generated all Prometheus servers" count=0
level=DEBUG msg="Found recording rule" path=rules/0001.yml record=sum-job lines=4-5
level=DEBUG msg="Configured checks for rule" enabled=["promql/syntax","alerts/comparison","alerts/template","promql/fragile","promql/regexp"] path=rules/0001.yml rule=sum-job
Expand Down
4 changes: 4 additions & 0 deletions cmd/pint/tests/0134_ci_base_branch_flag_path.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ level=INFO msg="Loading configuration file" path=.pint.hcl
level=DEBUG msg="Running git command" args=["rev-parse","--abbrev-ref","HEAD"]
level=DEBUG msg="Got branch information" base=origin/main current=v2
level=INFO msg="Finding all rules to check on current git branch" base=origin/main
level=DEBUG msg="Excluding git directory from glob results" path=.git glob=*
level=DEBUG msg="File parsed" path=.pint.hcl rules=0
level=DEBUG msg="File parsed" path=rules.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Running git command" args=["log","--format=%H","--no-abbrev-commit","--reverse","origin/main..HEAD"]
level=ERROR msg="Fatal error" err="failed to get the list of commits to scan: fatal: ambiguous argument 'origin/main..HEAD': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"
-- src/v1.yml --
Expand Down
4 changes: 4 additions & 0 deletions cmd/pint/tests/0135_ci_base_branch_config_path.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ level=INFO msg="Loading configuration file" path=.pint.hcl
level=DEBUG msg="Running git command" args=["rev-parse","--abbrev-ref","HEAD"]
level=DEBUG msg="Got branch information" base=origin/main current=v2
level=INFO msg="Finding all rules to check on current git branch" base=origin/main
level=DEBUG msg="Excluding git directory from glob results" path=.git glob=*
level=DEBUG msg="File parsed" path=.pint.hcl rules=0
level=DEBUG msg="File parsed" path=rules.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Running git command" args=["log","--format=%H","--no-abbrev-commit","--reverse","origin/main..HEAD"]
level=ERROR msg="Fatal error" err="failed to get the list of commits to scan: fatal: ambiguous argument 'origin/main..HEAD': unknown revision or path not in the working tree.\nUse '--' to separate paths from revisions, like this:\n'git <command> [<revision>...] -- [<file>...]'\n"
-- src/v1.yml --
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0144_discovery_filepath.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=INFO msg="Finding Prometheus servers using file paths" dir=servers match=^(?P<name>\w+).ya?ml$
level=DEBUG msg="Path discovery match" match=^(?P<name>\w+).ya?ml$ path=prom1.yaml
level=DEBUG msg="Extracted regexp variables" regexp=^(?P<name>\w+).ya?ml$ vars={"name":"prom1"}
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0145_discovery_filepath_dup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=INFO msg="Configured new Prometheus server" name=prom2 uris=1 uptime=up tags=[] include=[] exclude=[]
level=DEBUG msg="Starting query workers" name=prom2 uri=https://unique.example.com workers=16
level=INFO msg="Finding Prometheus servers using file paths" dir=servers match=^(?P<name>\w+).ya?ml$
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0147_discovery_filepath_error.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=INFO msg="Finding Prometheus servers using file paths" dir=notfound match=^(?P<name>\w+).ya?ml$
level=ERROR msg="Fatal error" err="filepath discovery error: lstat notfound: no such file or directory"
-- rules/0001.yml --
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0148_discovery_prom_zero.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Starting query workers" name=discovery uri=http://127.0.0.1:7148 workers=1
level=INFO msg="Finding Prometheus servers using Prometheus API query" uri=http://127.0.0.1:7148 query=prometheus_ready
level=DEBUG msg="Scheduling prometheus query" uri=http://127.0.0.1:7148 query=prometheus_ready
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0149_discovery_prom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Starting query workers" name=discovery uri=http://127.0.0.1:7149 workers=1
level=INFO msg="Finding Prometheus servers using Prometheus API query" uri=http://127.0.0.1:7149 query=prometheus_ready
level=DEBUG msg="Scheduling prometheus query" uri=http://127.0.0.1:7149 query=prometheus_ready
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0150_discovery_prom_dup_tags.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Starting query workers" name=discovery uri=http://127.0.0.1:7150 workers=1
level=INFO msg="Finding Prometheus servers using Prometheus API query" uri=http://127.0.0.1:7150 query=prometheus_ready
level=DEBUG msg="Scheduling prometheus query" uri=http://127.0.0.1:7150 query=prometheus_ready
Expand Down
1 change: 1 addition & 0 deletions cmd/pint/tests/0151_discovery_prom_error.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmp stderr stderr.txt
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=DEBUG msg="File parsed" path=rules/0001.yml rules=1
level=DEBUG msg="Glob finder completed" count=1
level=DEBUG msg="Starting query workers" name=discovery uri=http://127.0.0.1:7151 workers=1
level=INFO msg="Finding Prometheus servers using Prometheus API query" uri=http://127.0.0.1:7151 query=prometheus_ready
level=DEBUG msg="Scheduling prometheus query" uri=http://127.0.0.1:7151 query=prometheus_ready
Expand Down
Loading
Loading