Skip to content

Commit

Permalink
Merge branch 'main' into close_res_body
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelHollands authored Apr 4, 2024
2 parents 810ece3 + e4d82ed commit adeca0b
Show file tree
Hide file tree
Showing 95 changed files with 1,390 additions and 541 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "grafana/loki-build-image:0.33.0",
"image": "grafana/loki-build-image:0.33.1",
"containerEnv": {
"BUILD_IN_CONTAINER": "false"
},
Expand Down
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
],
};

local build_image_tag = '0.33.0';
local build_image_tag = '0.33.1';
[
pipeline('loki-build-image-' + arch) {
workspace: {
Expand Down
14 changes: 7 additions & 7 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.33.0-amd64
- 0.33.1-amd64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -54,7 +54,7 @@ steps:
from_secret: docker_password
repo: grafana/loki-build-image
tags:
- 0.33.0-arm64
- 0.33.1-arm64
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -86,7 +86,7 @@ steps:
password:
from_secret: docker_password
spec: .drone/docker-manifest-build-image.tmpl
target: loki-build-image:0.33.0
target: loki-build-image:0.33.1
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -146,7 +146,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
image: grafana/loki-build-image:0.33.1
name: loki-mixin-check
when:
event:
Expand All @@ -171,7 +171,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
image: grafana/loki-build-image:0.33.1
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1139,7 +1139,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.33.0
image: grafana/loki-build-image:0.33.1
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -1362,6 +1362,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 32b44aecaad0258ed9494225595e1016a56bea960bcd0b15b2db3449bed957e0
hmac: 452ccacf982174ae96c64fc2d0868859d26dbf6944e49d9170d780ff40a81eb8

...
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"check":
"uses": "grafana/loki-release/.github/workflows/check.yml@main"
"with":
"build_image": "grafana/loki-build-image:0.33.0"
"build_image": "grafana/loki-build-image:0.33.1"
"golang_ci_lint_version": "v1.55.1"
"release_lib_ref": "main"
"skip_validation": false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/minor-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
check:
uses: "grafana/loki-release/.github/workflows/check.yml@main"
with:
build_image: "grafana/loki-build-image:0.33.0"
build_image: "grafana/loki-build-image:0.33.1"
golang_ci_lint_version: "v1.55.1"
release_lib_ref: "main"
skip_validation: false
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
--env SKIP_ARM \
--volume .:/src/loki \
--workdir /src/loki \
--entrypoint /bin/sh "grafana/loki-build-image:0.33.0"
--entrypoint /bin/sh "grafana/loki-build-image:0.33.1"
git config --global --add safe.directory /src/loki
echo "${NFPM_SIGNING_KEY}" > $NFPM_SIGNING_KEY_FILE
make dist packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
check:
uses: "grafana/loki-release/.github/workflows/check.yml@main"
with:
build_image: "grafana/loki-build-image:0.33.0"
build_image: "grafana/loki-build-image:0.33.1"
golang_ci_lint_version: "v1.55.1"
release_lib_ref: "main"
skip_validation: false
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
--env SKIP_ARM \
--volume .:/src/loki \
--workdir /src/loki \
--entrypoint /bin/sh "grafana/loki-build-image:0.33.0"
--entrypoint /bin/sh "grafana/loki-build-image:0.33.1"
git config --global --add safe.directory /src/loki
echo "${NFPM_SIGNING_KEY}" > $NFPM_SIGNING_KEY_FILE
make dist packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/three-0-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
check:
uses: "grafana/loki-release/.github/workflows/check.yml@main"
with:
build_image: "grafana/loki-build-image:0.33.0"
build_image: "grafana/loki-build-image:0.33.1"
golang_ci_lint_version: "v1.55.1"
release_lib_ref: "main"
skip_validation: false
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
--env SKIP_ARM \
--volume .:/src/loki \
--workdir /src/loki \
--entrypoint /bin/sh "grafana/loki-build-image:0.33.0"
--entrypoint /bin/sh "grafana/loki-build-image:0.33.1"
git config --global --add safe.directory /src/loki
echo "${NFPM_SIGNING_KEY}" > $NFPM_SIGNING_KEY_FILE
make dist packages
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/three-zero-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
check:
uses: "grafana/loki-release/.github/workflows/check.yml@main"
with:
build_image: "grafana/loki-build-image:0.33.0"
build_image: "grafana/loki-build-image:0.33.1"
golang_ci_lint_version: "v1.55.1"
release_lib_ref: "main"
skip_validation: false
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
--env SKIP_ARM \
--volume .:/src/loki \
--workdir /src/loki \
--entrypoint /bin/sh "grafana/loki-build-image:0.33.0"
--entrypoint /bin/sh "grafana/loki-build-image:0.33.1"
git config --global --add safe.directory /src/loki
echo "${NFPM_SIGNING_KEY}" > $NFPM_SIGNING_KEY_FILE
make dist packages
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
* [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
* [11665](https://github.com/grafana/loki/pull/11665) **salvacorts** Deprecate and flip `-legacy-read-mode` flag to `false` by default.
* [12448](https://github.com/grafana/loki/pull/12448/files) **slim-bean** BREAKING CHANGE: refactor how we do defaults for runtime overrides

#### Promtail

Expand Down
4 changes: 3 additions & 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.33.0
BUILD_IMAGE_VERSION ?= 0.33.1

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down Expand Up @@ -803,6 +803,8 @@ check-format: format
doc: ## Generates the config file documentation
go run ./tools/doc-generator $(DOC_FLAGS_TEMPLATE) > $(DOC_FLAGS)

docs: doc

check-doc: ## Check the documentation files are up to date
check-doc: doc
@find . -name "*.md" | xargs git diff --exit-code -- \
Expand Down
2 changes: 1 addition & 1 deletion 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.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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 Down
2 changes: 1 addition & 1 deletion clients/cmd/fluent-bit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.0-bullseye AS builder
FROM golang:1.22.2-bullseye AS builder

COPY . /src

Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3-bullseye as build
FROM golang:1.21.9-bullseye as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/promtail/Dockerfile.arm32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.2-bullseye as build
FROM golang:1.21.9-bullseye as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/promtail/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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/promtail -f clients/cmd/promtail/Dockerfile .
FROM golang:1.21.2-alpine as goenv
FROM golang:1.21.9-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

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 @@ -2,7 +2,7 @@
# This file is intended to be called from the root like so:
# docker build -t grafana/promtail -f clients/cmd/promtail/Dockerfile.debug .

FROM grafana/loki-build-image:0.33.0 as build
FROM grafana/loki-build-image:0.33.1 as build
ARG GOARCH="amd64"
COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/logcli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/logql-analyzer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary-boringcrypto/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
2 changes: 1 addition & 1 deletion cmd/loki-canary/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki-canary/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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/promtail -f cmd/promtail/Dockerfile .
FROM golang:1.21.2-alpine as goenv
FROM golang:1.21.9-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
2 changes: 1 addition & 1 deletion cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/loki/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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 .
FROM golang:1.21.2-alpine as goenv
FROM golang:1.21.9-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
4 changes: 2 additions & 2 deletions cmd/loki/Dockerfile.debug
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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.debug .

FROM golang:1.21.2-alpine as goenv
FROM golang:1.21.9-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm && \
go install github.com/go-delve/delve/cmd/dlv@latest
Expand Down
2 changes: 2 additions & 0 deletions cmd/loki/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/prometheus/common/version"

"github.com/grafana/loki/v3/pkg/loki"
loki_runtime "github.com/grafana/loki/v3/pkg/runtime"
"github.com/grafana/loki/v3/pkg/util"
_ "github.com/grafana/loki/v3/pkg/util/build"
"github.com/grafana/loki/v3/pkg/util/cfg"
Expand Down Expand Up @@ -49,6 +50,7 @@ func main() {
// call it atleast once, the defaults are set to an empty struct.
// We call it with the flag values so that the config file unmarshalling only overrides the values set in the config.
validation.SetDefaultLimitsForYAMLUnmarshalling(config.LimitsConfig)
loki_runtime.SetDefaultLimitsForYAMLUnmarshalling(config.OperationalConfig)

// Init the logger which will honor the log level set in config.Server
if reflect.DeepEqual(&config.Server.LogLevel, &log.Level{}) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/migrate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build
COPY . /src/loki
WORKDIR /src/loki
RUN make clean && make BUILD_IN_CONTAINER=false migrate
Expand Down
2 changes: 1 addition & 1 deletion cmd/querytee/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 as build
FROM golang:1.21.9 as build

COPY . /src/loki
WORKDIR /src/loki
Expand Down
4 changes: 2 additions & 2 deletions cmd/querytee/Dockerfile.cross
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.0
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.1
# 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/promtail -f cmd/promtail/Dockerfile .
FROM golang:1.21.2-alpine as goenv
FROM golang:1.21.9-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand Down
37 changes: 35 additions & 2 deletions docs/sources/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ Pass the `-config.expand-env` flag at the command line to enable this way of set
# shards for performance.
[compactor: <compactor>]

# The limits_config block configures global and per-tenant limits in Loki.
# The limits_config block configures global and per-tenant limits in Loki. The
# values here can be overridden in the `overrides` section of the runtime_config
# file
[limits_config: <limits_config>]

# The frontend_worker configures the worker - running within the Loki querier -
Expand All @@ -208,6 +210,11 @@ Pass the `-config.expand-env` flag at the command line to enable this way of set
# configuration file.
[runtime_config: <runtime_config>]

# These are values which allow you to control aspects of Loki's operation, most
# commonly used for controlling types of higher verbosity logging, the values
# here can be overridden in the `configs` section of the `runtime_config` file.
[operational_config: <operational_config>]

# Configuration for tracing.
[tracing: <tracing>]

Expand Down Expand Up @@ -2747,7 +2754,7 @@ retention:
### limits_config
The `limits_config` block configures global and per-tenant limits in Loki.
The `limits_config` block configures global and per-tenant limits in Loki. The values here can be overridden in the `overrides` section of the runtime_config file

```yaml
# Whether the ingestion rate limit should be applied individually to each
Expand Down Expand Up @@ -3675,6 +3682,32 @@ Configuration for 'runtime config' module, responsible for reloading runtime con
[file: <string> | default = ""]
```

### operational_config

These are values which allow you to control aspects of Loki's operation, most commonly used for controlling types of higher verbosity logging, the values here can be overridden in the `configs` section of the `runtime_config` file.

```yaml
# Log every new stream created by a push request (very verbose, recommend to
# enable via runtime config only).
# CLI flag: -operation-config.log-stream-creation
[log_stream_creation: <boolean> | default = false]
# Log every push request (very verbose, recommend to enable via runtime config
# only).
# CLI flag: -operation-config.log-push-request
[log_push_request: <boolean> | default = false]
# Log every stream in a push request (very verbose, recommend to enable via
# runtime config only).
# CLI flag: -operation-config.log-push-request-streams
[log_push_request_streams: <boolean> | default = false]
# Log push errors with a rate limited logger, will show client push errors
# without overly spamming logs.
# CLI flag: -operation-config.limited-log-push-errors
[limited_log_push_errors: <boolean> | default = true]
```

### tracing

Configuration for `tracing`.
Expand Down
Loading

0 comments on commit adeca0b

Please sign in to comment.