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

Use newest build image 0.31.2 with golangci-lint update. #11118

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 4 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
42 changes: 21 additions & 21 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-drone-drift
- commands:
- make BUILD_IN_CONTAINER=false check-generated-files
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-generated-files
- commands:
- cd ..
Expand All @@ -110,7 +110,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: clone-target-branch
when:
event:
Expand All @@ -121,14 +121,14 @@ steps:
- clone-target-branch
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: test
- commands:
- cd ../loki-target-branch && BUILD_IN_CONTAINER=false make test
depends_on:
- clone-target-branch
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: test-target-branch
when:
event:
Expand All @@ -141,7 +141,7 @@ steps:
- test
- test-target-branch
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: compare-coverage
when:
event:
Expand All @@ -159,7 +159,7 @@ steps:
TOKEN:
from_secret: github_token
USER: grafanabot
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: report-coverage
when:
event:
Expand All @@ -169,15 +169,15 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: lint
- commands:
- make BUILD_IN_CONTAINER=false check-mod
depends_on:
- test
- lint
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-mod
- commands:
- apk add make bash && make lint-scripts
Expand All @@ -188,21 +188,21 @@ steps:
depends_on:
- check-generated-files
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: loki
- commands:
- make BUILD_IN_CONTAINER=false check-doc
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-doc
- commands:
- make BUILD_IN_CONTAINER=false check-format GIT_TARGET_BRANCH="$DRONE_TARGET_BRANCH"
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-format
when:
event:
Expand All @@ -212,14 +212,14 @@ steps:
depends_on:
- loki
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: validate-example-configs
- commands:
- make BUILD_IN_CONTAINER=false check-example-config-doc
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: check-example-config-doc
- commands:
- mkdir -p /hugo/content/docs/loki/latest
Expand Down Expand Up @@ -252,7 +252,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: loki-mixin-check
when:
event:
Expand All @@ -277,7 +277,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1683,15 +1683,15 @@ steps:
NFPM_SIGNING_KEY:
from_secret: gpg_private_key
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: write-key
- commands:
- make BUILD_IN_CONTAINER=false packages
environment:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: test packaging
- commands:
- ./tools/packaging/verify-deb-install.sh
Expand All @@ -1717,7 +1717,7 @@ steps:
NFPM_PASSPHRASE:
from_secret: gpg_passphrase
NFPM_SIGNING_KEY_FILE: /drone/src/private-key.key
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: publish
when:
event:
Expand Down Expand Up @@ -1752,7 +1752,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.30.1
image: grafana/loki-build-image:0.31.2
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -2017,6 +2017,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 27257b795645c64fe82deb850f6efdf73fec2e0e2217e86ac52ae6bf434a92b5
hmac: a68ce0151ff769aa0731f120437450f0d9685c843cb3c5b046d4991f910aadd7

...
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ DOCKER_IMAGE_DIRS := $(patsubst %/Dockerfile,%,$(DOCKERFILES))
BUILD_IN_CONTAINER ?= true

# ensure you run `make drone` after changing this
BUILD_IMAGE_VERSION := 0.30.1
BUILD_IMAGE_VERSION ?= 0.31.2

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down
1 change: 1 addition & 0 deletions clients/pkg/logentry/stages/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ func (m *metricStage) Name() string {
}

// recordCounter will update a counter metric
// nolint:goconst
func (m *metricStage) recordCounter(name string, counter *metric.Counters, labels model.LabelSet, v interface{}) {
// If value matching is defined, make sure value matches.
if counter.Cfg.Value != nil {
Expand Down
1 change: 1 addition & 0 deletions clients/pkg/logentry/stages/pack_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// nolint:goconst
package stages

import (
Expand Down
1 change: 1 addition & 0 deletions clients/pkg/promtail/targets/journal/journaltarget_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//go:build linux && cgo && promtail_journal_enabled
// +build linux,cgo,promtail_journal_enabled

// nolint:goconst
package journal

import (
Expand Down
4 changes: 2 additions & 2 deletions pkg/logql/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (q *query) Eval(ctx context.Context) (promql_parser.Value, error) {
}

defer util.LogErrorWithContext(ctx, "closing iterator", itr.Close)
streams, err := readStreams(itr, q.params.Limit(), q.params.Direction(), q.params.Interval(), true)
streams, err := readStreams(itr, q.params.Limit(), q.params.Direction(), q.params.Interval())
return streams, err
default:
return nil, fmt.Errorf("unexpected type (%T): cannot evaluate", e)
Expand Down Expand Up @@ -508,7 +508,7 @@ func PopulateMatrixFromScalar(data promql.Scalar, params Params) promql.Matrix {
// If categorizeLabels is true, the stream labels contains just the stream labels and entries inside each stream have their
// structuredMetadata and parsed fields populated with structured metadata labels plus the parsed labels respectively.
// Otherwise, the stream labels are the whole series labels including the stream labels, structured metadata labels and parsed labels.
func readStreams(i iter.EntryIterator, size uint32, dir logproto.Direction, interval time.Duration, categorizeLabels bool) (logqlmodel.Streams, error) {
func readStreams(i iter.EntryIterator, size uint32, dir logproto.Direction, interval time.Duration) (logqlmodel.Streams, error) {
streams := map[string]*logproto.Stream{}
respSize := uint32(0)
// lastEntry should be a really old time so that the first comparison is always true, we use a negative
Expand Down
4 changes: 2 additions & 2 deletions pkg/logql/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,9 @@ func matchingSignature(sample promql.Sample, opts *syntax.BinOpOptions) uint64 {
return sample.Metric.Hash()
} else if opts.VectorMatching.On {
return labels.NewBuilder(sample.Metric).Keep(opts.VectorMatching.MatchingLabels...).Labels().Hash()
} else {
return labels.NewBuilder(sample.Metric).Del(opts.VectorMatching.MatchingLabels...).Labels().Hash()
}

return labels.NewBuilder(sample.Metric).Del(opts.VectorMatching.MatchingLabels...).Labels().Hash()
}

func vectorBinop(op string, opts *syntax.BinOpOptions, lhs, rhs promql.Vector, lsigs, rsigs []uint64) (promql.Vector, error) {
Expand Down