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

Merge main branch #2

Merged
merged 126 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
126 commits
Select commit Hold shift + click to select a range
15d98fa
iterable tokenizer w/ comparison benching (#11255)
owen-d Nov 17, 2023
6db9d77
inverts the logic when testing a block against a list of chunks (#11248)
owen-d Nov 17, 2023
58eaad9
boundscheck & partitioning fingerprints between blocks (#11237)
owen-d Nov 17, 2023
c716e49
compactor: do not block compation when retention is taking too long (…
sandeepsukhani Nov 20, 2023
30d0030
inflight-logging: Add extra metadata to inflight requests logging (#1…
kavirajk Nov 20, 2023
0c10f28
operator: Adds new value v13 to schema (#10932)
JoaoBraveCoding Nov 20, 2023
5535267
operator: Remove outdated BoltDB dashboards (#11022)
JoaoBraveCoding Nov 20, 2023
6a62b8c
compaction: Separate metrics for tracking retention and compaction (#…
sandeepsukhani Nov 20, 2023
8d34f85
Propagate trace ID with HTTP gRPC request. (#11251)
jeschkies Nov 20, 2023
5f4a719
tokenizer v1 cleanup (#11272)
paul1r Nov 20, 2023
49d5761
Fixed the grammatical mistake in an _index.md file (#11226)
ibilalkayy Nov 20, 2023
658f4f1
Fix Typo in the _index.md (#11242)
Pavaningithub Nov 20, 2023
5290849
use nanosecond precision for timestamp in compacted boltdb-shipper in…
sandeepsukhani Nov 21, 2023
4455cd9
[helm] Fix tracing configuration (#11186)
QuentinBisson Nov 21, 2023
6e93d15
utilities for reducing ngram allocations in token iterator constructi…
owen-d Nov 21, 2023
162bbb1
do not run retention loop when retention is not enabled (#11280)
sandeepsukhani Nov 22, 2023
5b97fcf
Send query plan to querier. (#11246)
jeschkies Nov 22, 2023
e28f7f3
update dskit to latest version (#11287)
sandeepsukhani Nov 22, 2023
e694069
Set query plan when copying LokiRequest (#11291)
jeschkies Nov 22, 2023
af17703
Compression of bloom blocks (#11267)
paul1r Nov 22, 2023
02b074d
Added a new paragraph in the contribution guide about an error becaus…
ibilalkayy Nov 22, 2023
b56f36f
Fix bloom compactor startup when using unsupported index type (#11285)
chaudum Nov 22, 2023
146b1bb
Helm: Update MinIO Helm Chart version to 4.0.15 (#11188)
vbob Nov 22, 2023
13b58af
made some typo changes in the caching.md file (#11214)
ibilalkayy Nov 22, 2023
f3b3202
Update _index.md (#11265)
Shashwat-05 Nov 22, 2023
1d90a8b
Fix bloom compactor startup duplicate metric registration (#11300)
poyzannur Nov 23, 2023
10a21cf
[Docs] Update Helm installation to include backend (#11191)
JStickler Nov 23, 2023
a971dcb
Document caveats for 2.x to 3.x loki helm chart upgrades (#11199)
wozniakjan Nov 23, 2023
21a0777
operator: Add automatic stream sharding support (#11091)
periklis Nov 23, 2023
7200c4b
Per-tenant n-gram length and skip factor, and bloom false-positive ra…
salvacorts Nov 23, 2023
6b944f7
operator: Fix custom CA for object-store in ruler component (#11288)
periklis Nov 23, 2023
c8093e1
Revert "Compression of bloom blocks (#11267)" (#11307)
vlad-diachenko Nov 24, 2023
10fe48b
chore(deps): update alpine docker tag to v3.18.4 (main) (#11167)
renovate[bot] Nov 24, 2023
75cfe59
bloom blocks downloading queue (#11201)
vlad-diachenko Nov 24, 2023
e523809
bug(volume): return 400 error for invalid volume request (#11313)
Nov 24, 2023
09cb9ae
fix(deps): update github.com/grafana/loki/pkg/push digest to e523809 …
renovate[bot] Nov 24, 2023
d62d4e3
Bloom Gateway: Implement chunk filtering using workers that multiplex…
chaudum Nov 24, 2023
b29b456
operator: Add tools to test on GCP (#11303)
JoaoBraveCoding Nov 27, 2023
2a83cf0
chore(jsonnet): Fix the storage config on shipper.libsonnet (#11323)
kavirajk Nov 27, 2023
67ecf50
Make Blooms-Gateway queue settings configurable (#11321)
salvacorts Nov 27, 2023
bd505f8
mixins: Adds structured metadata panels (#11087)
JoaoBraveCoding Nov 27, 2023
10210b8
Categorized Labels: Return empty JSON object if no parsed nor structu…
salvacorts Nov 28, 2023
21a7f96
operator: Add support for blocking queries per tenant (#11094)
periklis Nov 28, 2023
df1a3ce
Initial pass at metrics for bloom tokenizer (#11329)
paul1r Nov 28, 2023
1d232b8
Helm: Add swift credentials and container name to common config (#11256)
heytrav Nov 29, 2023
5270d10
Fix minimum Go version for module (#11145)
xperimental Nov 29, 2023
1496eb4
Fix `or` filter not being stringified correctly (#11337)
svennergr Nov 29, 2023
b05544a
Remove obsolete empty test in middleware. (#11304)
jeschkies Dec 1, 2023
6d011be
config: fix index periodic config unmarshal (#11344)
ashwanthgoli Dec 1, 2023
71ddec7
Bloom-Gateway: Use pools to reduce allocations (#11324)
salvacorts Dec 1, 2023
2411c57
Wait for all workers to stop when stopping blockdownloader (#11353)
chaudum Dec 1, 2023
cd3a04d
operator: Run unit tests of API module as well (#11328)
xperimental Dec 1, 2023
fe4d9be
Remove worker callback function that is only used in tests (#11356)
chaudum Dec 1, 2023
cf84b2e
fluent-bit: Redact basic auth credentials from fluent-bit logging (#1…
rgroothuijsen Dec 1, 2023
a106b06
jsonnet: add memberlist_ring_enabled check condition for consul_confi…
sentoz Dec 1, 2023
0b9e573
Helm: Add extraContainers to write pods (#11319)
someStrangerFromTheAbyss Dec 1, 2023
11ef833
Compact multiple series into a bloom block (#11295)
poyzannur Dec 1, 2023
ceda046
Bloom tokenization performance tweaks (#11338)
paul1r Dec 1, 2023
d9f3bf3
config: adds `frontend.max-query-capacity` to tune per-tenant query c…
ashwanthgoli Dec 1, 2023
9538499
Add error return to PopulateSeriesWithBloom (#11359)
paul1r Dec 1, 2023
0e433f3
Bloom Gateway: process blocks immediately when they are available (#1…
chaudum Dec 1, 2023
489ac8d
Extract results cache into new pkg (#11343)
salvacorts Dec 2, 2023
19b0160
Bloom gateway client: Use binary search to determin membership of fin…
chaudum Dec 4, 2023
856b573
Pass `--build-arg` to docker-driver build command (#11379)
chaudum Dec 4, 2023
18778cd
De-duplicate common prefixes as returned for individual buckets (#11317)
akevdmeer Dec 4, 2023
7f79db9
Update log configuration (#11211)
doanbutar Dec 4, 2023
abb63b2
Update template_functions.md (#9683)
zeitlinger Dec 4, 2023
79693d7
Fix `getFromThrough()` function for ShortRefs (#11386)
chaudum Dec 5, 2023
a0b462d
Bloom-Gateway cache (#11380)
salvacorts Dec 5, 2023
d683aed
operator: Add tools to test on Azure (#11340)
periklis Dec 6, 2023
e590963
operator: Add infra annotations for OpenShift based deployments (#11393)
periklis Dec 6, 2023
0945b18
lambda-promtail: cloudwatch: add '__aws_log_type' label (#11335)
elliotdobson Dec 6, 2023
5b8d0e6
Remove querier wait time metric. (#11233)
jeschkies Dec 6, 2023
e14b347
tests: Disable some `clients/cmd/fluent-bit` tests when `CGO_ENABLED=…
na-- Dec 7, 2023
bc9a006
Update structured metadata note (#11399)
JStickler Dec 7, 2023
f6b5cde
Add alt text to images (#11400)
JStickler Dec 7, 2023
51567ad
Wrap VolumeResponse. (#11402)
jeschkies Dec 8, 2023
62a2217
compactor: fix metric name for a compactor (#11412)
sandeepsukhani Dec 8, 2023
ee008cf
Helm: remove ruler.enabled condition in networkpolicies which lead to…
QuantumEnigmaa Dec 8, 2023
5e34967
Update notes to use shortcode (#11408)
JStickler Dec 8, 2023
f67fff3
Approximate `quantile_over_time` (#10417)
jeschkies Dec 11, 2023
8dde7b9
Support tail requests with protobuf encoding. (#11426)
jeschkies Dec 11, 2023
c573def
operator: Fix storing authentication credentials in the Loki ConfigMa…
periklis Dec 11, 2023
c4f5a57
Bloom Compactor: Optimize check for fingerprint ownership (#11389)
chaudum Dec 12, 2023
cdf1f77
Fix typo (#11445)
JStickler Dec 12, 2023
c7447e2
Shortcut callback execution if there are 1 or fewer elements (#11446)
Dec 12, 2023
48b6050
[CI/CD] Update yaml file `./production/helm/loki/Chart.yaml` (+1 othe…
grafanabot Dec 12, 2023
3555001
bugfix(memcached): Make `memcached` batch fetch truely context aware …
kavirajk Dec 12, 2023
5f42859
Avoid reading block files into memory (#11447)
chaudum Dec 12, 2023
7c4882a
Add note about use of object storage (#11443)
JStickler Dec 12, 2023
49a160c
alphabetize headings and add mini-TOC (#11444)
JStickler Dec 12, 2023
f406f52
Helm: Added topologySpreadConstraints to read deployment component (#…
sossickd Dec 12, 2023
4614950
Update Getting Started topic and graphics (#11350)
JStickler Dec 12, 2023
bfc2312
operator: Update Loki operand to v2.9.3 (#11448)
periklis Dec 12, 2023
f0ec743
Helm: add cilium networkpolicies (#11425)
QuantumEnigmaa Dec 13, 2023
9a3bcba
operator: Adds structured metadata dashboards (#11473)
JoaoBraveCoding Dec 13, 2023
b180788
Map rpc Status back to user error (#11449)
jeschkies Dec 13, 2023
9b69190
BloomShipper: add cache for downloaded blocks (#11394)
vlad-diachenko Dec 13, 2023
ed1fccf
Revert "bugfix(memcached): Make `memcached` batch fetch truely contex…
kavirajk Dec 13, 2023
23780f0
Compress bloom data before uploading it to object storage (#11460)
paul1r Dec 13, 2023
6b4d27c
fix image links in getting started (#11478)
JStickler Dec 13, 2023
3da8a29
Chore: Spelling fix for linter (#11482)
paul1r Dec 13, 2023
6034063
Add trivy filesystem scanning (#11462)
trevorwhitney Dec 13, 2023
8822ae6
Use correct error write function (#11487)
jeschkies Dec 14, 2023
37a0ed6
Support GET for /ingester/shutdown (#11477)
MichelHollands Dec 14, 2023
cd74ddf
Implement default DFS traversal visitor for LogQL expressions (#11489)
chaudum Dec 14, 2023
a91f3f1
frontend: Use `net.JoinHostPort` to support IPv6 addresses (#10650)
matthewpi Dec 14, 2023
71e9fca
Refactor Distributor.Push() to be able to Tee log streams (#11488)
na-- Dec 15, 2023
797720d
Add jsonnet lib for deploying Bloom Compactor and Bloom Gateway (#11397)
chaudum Dec 15, 2023
d048e93
Always set matcher in label filter deserialization. (#11497)
jeschkies Dec 15, 2023
a192fc2
Helm: add support for setting an s3 backoff_config via the loki helm …
rl0nergan Dec 15, 2023
b51b7d7
Helm: Use `/ingester/shutdown` endpoint in write pod for `preStop` ho…
andresperezl Dec 15, 2023
be71a80
Implement hooks to instrument query pipelines (#11493)
MasslessParticle Dec 15, 2023
e93243f
reduce cost of pipeline stages by pooling maps we create for labels (…
cstyan Dec 16, 2023
724a841
Add log duplication (tee-ing) in the Distributor (#11496)
na-- Dec 18, 2023
8931f4a
operator: Add warning for old schema configuration (#11158)
btaani Dec 18, 2023
27d2106
Clone filterer of label filter (#11514)
jeschkies Dec 18, 2023
4c50653
operator: Apply linter on all test files (#11501)
periklis Dec 18, 2023
9aae250
Optimize series response format by using repeated fileds. (#11498)
jeschkies Dec 19, 2023
e56e4c9
Run compaction over existing bloom blocks (#11486)
poyzannur Dec 19, 2023
48c59ba
remove mistakenly committed files from 11484 (#11527)
cstyan Dec 19, 2023
9e7c256
Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /operator (#11519)
dependabot[bot] Dec 19, 2023
31f8c91
Jsonnet: Fix and update loki-mixin panels (#11529)
DylanGuedes Dec 19, 2023
f668a1b
Add context and tenant to pipeline/extractor wrappers (#11528)
MasslessParticle Dec 19, 2023
dabd444
Fix configuration for bloom filter deployment (#11530)
chaudum Dec 20, 2023
aa0d706
Fix the structured-metadata docs page (#11518)
adnull Dec 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ local promtail_win() = pipeline('promtail-windows') {
steps: [
{
name: 'identify-runner',
image: 'golang:1.19-windowsservercore-1809',
image: 'golang:1.21.3-windowsservercore-1809',
commands: [
'Write-Output $env:DRONE_RUNNER_NAME',
],
},
{
name: 'test',
image: 'golang:1.19-windowsservercore-1809',
image: 'golang:1.21.3-windowsservercore-1809',
commands: [
'go test .\\clients\\pkg\\promtail\\targets\\windows\\... -v',
],
Expand Down
6 changes: 3 additions & 3 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1666,11 +1666,11 @@ platform:
steps:
- commands:
- Write-Output $env:DRONE_RUNNER_NAME
image: golang:1.19-windowsservercore-1809
image: golang:1.21.3-windowsservercore-1809
name: identify-runner
- commands:
- go test .\clients\pkg\promtail\targets\windows\... -v
image: golang:1.19-windowsservercore-1809
image: golang:1.21.3-windowsservercore-1809
name: test
trigger:
ref:
Expand Down Expand Up @@ -2106,6 +2106,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: caf375427f92f78711f801f56341357b67737330e906346ee908a796c61dd314
hmac: 8ae9cff1a379503d0b568f727d9c12bcb486a5e8d1fc3271deea32f07939baf1

...
6 changes: 5 additions & 1 deletion .github/workflows/snyk-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ jobs:
continue-on-error: true
id: should-comment
run: |
if [[ $(wc -l < snyk.txt) -gt 1 ]]; then exit 0; fi
if [[ $(wc -l < snyk.txt) -gt 1 ]]; then
echo "\nTo see more details on these vulnerabilities, and how/where to fix them, please run `make scan-vulnerabilities` on your branch. If these were not introduced by your PR, please considering fixing them in `main` via a subsequent PR. Thanks!" >> snyk.txt
exit 0;
fi

exit 1

- name: Comment on PR with Snyk scan results
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/trivy-pr-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@ jobs:
make loki-image
echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV

- name: Run Trivy vulnerability scanner
- name: Run Trivy image scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "docker.io/grafana/loki:${{ env.IMAGE_TAG }}"
format: "json"
output: "trivy.json"
output: "trivy-image.json"
severity: "CRITICAL,HIGH"

- name: Run Trivy fs scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scan-ref: "go.mod"
format: "json"
output: "trivy-fs.json"
severity: "CRITICAL,HIGH"

- name: Prepare Trivy Message
Expand All @@ -35,13 +44,19 @@ jobs:
uses: sergeysova/jq-action@v2
continue-on-error: true
with:
cmd: jq -r '.Results[] | select(.Vulnerabilities != null) | .Vulnerabilities[] | "* **\(.Severity)** [\(.Title)](\(.PrimaryURL)) in `\(.PkgName)` v\(.InstalledVersion). Fixed in v\(.FixedVersion)"' trivy.json >> trivy.txt
cmd: |
jq -r '.Results[] | select(.Vulnerabilities != null) | .Target as $target | .Type as $type | .Vulnerabilities[] | "* **\(.Severity)**, Target: \($target), Type: \($type) [\(.Title)](\(.PrimaryURL)) in `\(.PkgName)` v\(.InstalledVersion). Fixed in v\(.FixedVersion)"' trivy-image.json >> trivy.txt
jq -r '.Results[] | select(.Vulnerabilities != null) | .Target as $target | .Type as $type | .Vulnerabilities[] | "* **\(.Severity)**, Target: \($target), Type: \($type) [\(.Title)](\(.PrimaryURL)) in `\(.PkgName)` v\(.InstalledVersion). Fixed in v\(.FixedVersion)"' trivy-fs.json >> trivy.text

- name: Determine whether to comment
continue-on-error: true
id: should-comment
run: |
if [[ $(wc -l < trivy.txt) -gt 1 ]]; then exit 0; fi
if [[ $(wc -l < trivy.txt) -gt 1 ]]; then
echo "\nTo see more details on these vulnerabilities, and how/where to fix them, please run `make scan-vulnerabilities` on your branch. If these were not introduced by your PR, please considering fixing them in `main` via a subsequent PR. Thanks!" >> trivy.txt
exit 0;
fi

exit 1

- name: Comment on PR with Trivy scan results
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

##### Enhancements

* [11363](https://github.com/grafana/loki/pull/11477) **MichelHollands**: support GET for /ingester/shutdown
* [11363](https://github.com/grafana/loki/pull/11363) **kavirajk**: bugfix(memcached): Make memcached batch fetch truely context aware.
* [11319](https://github.com/grafana/loki/pull/11319) **someStrangerFromTheAbyss**: Helm: Add extraContainers to the write pods.
* [11243](https://github.com/grafana/loki/pull/11243) **kavirajk**: Inflight-logging: Add extra metadata to inflight requests logging.
* [11110](https://github.com/grafana/loki/pull/11003) **MichelHollands**: Change the default of the `metrics-namespace` flag to 'loki'.
* [11086](https://github.com/grafana/loki/pull/11086) **kandrew5**: Helm: Allow topologySpreadConstraints
* [11003](https://github.com/grafana/loki/pull/11003) **MichelHollands**: Add the `metrics-namespace` flag to change the namespace of metrics currently using cortex as namespace.
Expand Down Expand Up @@ -36,18 +40,22 @@
* [10727](https://github.com/grafana/loki/pull/10727) **sandeepsukhani** Native otlp ingestion support
* [11051](https://github.com/grafana/loki/pull/11051) Refactor to not use global logger in modules
* [10956](https://github.com/grafana/loki/pull/10956) **jeschkies** do not wrap requests but send pure Protobuf from frontend v2 via scheduler to querier when `-frontend.encoding=protobuf`.
* [10417](https://github.com/grafana/loki/pull/10417) **jeschkies** shard `quantile_over_time` range queries using probabilistic data structures.
* [11284](https://github.com/grafana/loki/pull/11284) **ashwanthgoli** Config: Adds `frontend.max-query-capacity` to tune per-tenant query capacity.

##### Fixes
* [11074](https://github.com/grafana/loki/pull/11074) **hainenber** Fix panic in lambda-promtail due to mishandling of empty DROP_LABELS env var.
* [11195](https://github.com/grafana/loki/pull/11195) **canuteson** Generate tsdb_shipper storage_config even if using_boltdb_shipper is false

##### Changes

* [11490](https://github.com/grafana/loki/pull/11490) **andresperezl**: Helm: Use `/ingester/shutdown` for `preStop` hook in write pods.
* [10366](https://github.com/grafana/loki/pull/10366) **shantanualsi** Upgrade thanos objstore, dskit and other modules
* [10451](https://github.com/grafana/loki/pull/10451) **shantanualsi** Upgrade thanos `objstore`
* [10814](https://github.com/grafana/loki/pull/10814) **shantanualsi,kaviraj** Upgrade prometheus to v0.47.1 and dskit
* [10959](https://github.com/grafana/loki/pull/10959) **slim-bean** introduce a backoff wait on subquery retries.
* [11121](https://github.com/grafana/loki/pull/11121) **periklis** Ensure all lifecycler cfgs ref a valid IPv6 addr and port combination
* [10650](https://github.com/grafana/loki/pull/10650) **matthewpi** Ensure the frontend uses a valid IPv6 addr and port combination

#### Promtail

Expand All @@ -74,12 +82,16 @@

#### Mixins

* [11087](https://github.com/grafana/loki/pull/11087) **JoaoBraveCoding**: Adds structured metadata panels for ingested data

#### Fixes

#### FluentD

#### Jsonnet

* [11312](https://github.com/grafana/loki/pull/11312) **sentoz**: Loki ksonnet: Do not generate configMap for consul if you are using memberlist

* [11020](https://github.com/grafana/loki/pull/11020) **ashwanthgoli**: Loki ksonnet: Do not generate table-manager manifests if shipper store is in-use.

* [10784](https://github.com/grafana/loki/pull/10894) **slim-bean** Update index gateway client to use a headless service.
Expand Down
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,11 @@ To get a local preview of the documentation:
3. Run the command `make docs`. This uses the `grafana/docs` image which internally uses Hugo to generate the static site.
4. Open http://localhost:3002/docs/loki/latest/ to review your changes.

**Remember:** If running `make docs` command gave you the following error.

- `path /tmp/make-docs.Dcq is not shared from the host and is not known to Docker.`
- `You can configure shared paths from Docker -> Preferences... -> Resources -> File Sharing.`

Then you can go to Docker Desktop settings and open the resources, add the temporary directory path `/tmp`.

> Note that `make docs` uses a lot of memory. If it crashes, increase the memory allocated to Docker and try again.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ BUILD_IMAGE_VERSION ?= 0.31.2
# Docker image info
IMAGE_PREFIX ?= grafana

BUILD_IMAGE_PREFIX ?= grafana

IMAGE_TAG ?= $(shell ./tools/image-tag)

# Version info for binaries
Expand Down Expand Up @@ -102,7 +104,7 @@ RM := --rm
TTY := --tty

DOCKER_BUILDKIT ?= 1
BUILD_IMAGE = BUILD_IMAGE=$(IMAGE_PREFIX)/loki-build-image:$(BUILD_IMAGE_VERSION)
BUILD_IMAGE = BUILD_IMAGE=$(BUILD_IMAGE_PREFIX)/loki-build-image:$(BUILD_IMAGE_VERSION)
PUSH_OCI=docker push
TAG_OCI=docker tag
ifeq ($(CI), true)
Expand Down Expand Up @@ -425,7 +427,7 @@ PLUGIN_ARCH ?=
define build-rootfs
rm -rf clients/cmd/docker-driver/rootfs || true
mkdir clients/cmd/docker-driver/rootfs
docker build -t rootfsimage -f clients/cmd/docker-driver/Dockerfile .
docker build --build-arg $(BUILD_IMAGE) -t rootfsimage -f clients/cmd/docker-driver/Dockerfile .

ID=$$(docker create rootfsimage true) && \
(docker export $$ID | tar -x -C clients/cmd/docker-driver/rootfs) && \
Expand Down Expand Up @@ -836,6 +838,7 @@ dev-k3d-down:
.PHONY: trivy
trivy: loki-image
trivy i $(IMAGE_PREFIX)/loki:$(IMAGE_TAG)
trivy fs go.mod

# Synk is also used to scan for vulnerabilities, and detects things that trivy might miss
.PHONY: snyk
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/docker-driver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.29.3
ARG BUILD_IMAGE=grafana/loki-build-image:0.31.2
# Directories in this file are referenced from the root of the project not this folder
# This file is intended to be called from the root like so:
# docker build -t grafana/loki -f cmd/loki/Dockerfile .
Expand All @@ -9,7 +9,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false clients/cmd/docker-driver/docker-driver

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates tzdata
COPY --from=build /src/loki/clients/cmd/docker-driver/docker-driver /bin/docker-driver
WORKDIR /bin/
Expand Down
2 changes: 2 additions & 0 deletions clients/cmd/fluent-bit/loki_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build cgo

package main

import (
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluent-bit/out_grafana_loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func FLBPluginInit(ctx unsafe.Pointer) int {

level.Info(logger).Log("[flb-go]", "Starting fluent-bit-go-loki", "version", version.Info())
paramLogger := log.With(logger, "[flb-go]", "provided parameter")
level.Info(paramLogger).Log("URL", conf.clientConfig.URL)
level.Info(paramLogger).Log("URL", conf.clientConfig.URL.Redacted())
level.Info(paramLogger).Log("TenantID", conf.clientConfig.TenantID)
level.Info(paramLogger).Log("BatchWait", fmt.Sprintf("%.3fs", conf.clientConfig.BatchWait.Seconds()))
level.Info(paramLogger).Log("BatchSize", conf.clientConfig.BatchSize)
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail-debug


FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates tzdata
COPY --from=build /src/loki/clients/cmd/promtail/promtail-debug /usr/bin/promtail-debug
COPY --from=build /usr/bin/dlv /usr/bin/dlv
Expand Down
5 changes: 3 additions & 2 deletions clients/pkg/logentry/logql/parser.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package logql

import (
"errors"
"fmt"
"strconv"
"strings"
"text/scanner"

"github.com/prometheus/prometheus/model/labels"

"github.com/grafana/loki/pkg/logqlmodel"
)

func init() {
Expand Down Expand Up @@ -44,7 +45,7 @@ func ParseMatchers(input string) ([]*labels.Matcher, error) {
}
matcherExpr, ok := expr.(*matchersExpr)
if !ok {
return nil, errors.New("only label matchers is supported")
return nil, logqlmodel.ErrParseMatchers
}
return matcherExpr.matchers, nil
}
Expand Down
7 changes: 3 additions & 4 deletions clients/pkg/promtail/discovery/consulagent/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package consulagent
import (
"context"
"encoding/json"
"fmt"
"net"
"net/http"
"strconv"
Expand Down Expand Up @@ -527,9 +526,9 @@ func (srv *consulService) watch(ctx context.Context, ch chan<- []*targetgroup.Gr
// since the service may be registered remotely through a different node.
var addr string
if srvCheck.Service.Address != "" {
addr = net.JoinHostPort(srvCheck.Service.Address, fmt.Sprintf("%d", srvCheck.Service.Port))
addr = net.JoinHostPort(srvCheck.Service.Address, strconv.Itoa(srvCheck.Service.Port))
} else {
addr = net.JoinHostPort(member.Addr, fmt.Sprintf("%d", srvCheck.Service.Port))
addr = net.JoinHostPort(member.Addr, strconv.Itoa(srvCheck.Service.Port))
}

labels := model.LabelSet{
Expand Down Expand Up @@ -560,7 +559,7 @@ func (srv *consulService) watch(ctx context.Context, ch chan<- []*targetgroup.Gr
// Add all key/value pairs from the service's tagged addresses as their own labels.
for k, v := range srvCheck.Service.TaggedAddresses {
name := strutil.SanitizeLabelName(k)
address := fmt.Sprintf("%s:%d", v.Address, v.Port)
address := net.JoinHostPort(v.Address, strconv.Itoa(v.Port))
labels[taggedAddressesLabel+model.LabelName(name)] = model.LabelValue(address)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/logcli/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false logcli

FROM alpine:3.18.3
FROM alpine:3.18.4

RUN apk add --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion cmd/logql-analyzer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && CGO_ENABLED=0 go build ./cmd/logql-analyzer/

FROM alpine:3.18.3
FROM alpine:3.18.4

RUN apk add --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary-boringcrypto/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /src/loki
RUN go env GOARCH > /goarch
RUN make clean && make GOARCH=$(cat /goarch) BUILD_IN_CONTAINER=true GOEXPERIMENT=boringcrypto loki-canary-boringcrypto

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
RUN apk add --no-cache libc6-compat
COPY --from=build /src/loki/cmd/loki-canary-boringcrypto/loki-canary-boringcrypto /usr/bin/loki-canary
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki-canary

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary
ENTRYPOINT [ "/usr/bin/loki-canary" ]
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-canary

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/loki-canary/loki-canary /usr/bin/loki-canary
ENTRYPOINT [ "/usr/bin/loki-canary" ]
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki

FROM alpine:3.18.3
FROM alpine:3.18.4

RUN apk add --no-cache ca-certificates libcap

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki

FROM alpine:3.18.3
FROM alpine:3.18.4

RUN apk add --no-cache ca-certificates

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ WORKDIR /src/loki
RUN make clean && \
GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-debug

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/loki/loki-debug /usr/bin/loki-debug
COPY --from=goenv /go/bin/dlv /usr/bin/dlv
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false migrate

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/migrate/migrate /usr/bin/migrate
#ENTRYPOINT [ "/usr/bin/migrate" ]
Expand Down
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false loki-querytee

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee
ENTRYPOINT [ "/usr/bin/querytee" ]
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile.cross
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY . /src/loki
WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false loki-querytee

FROM alpine:3.18.3
FROM alpine:3.18.4
RUN apk add --update --no-cache ca-certificates
COPY --from=build /src/loki/cmd/querytee/querytee /usr/bin/querytee
ENTRYPOINT [ "/usr/bin/querytee" ]
Loading
Loading