Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into blooms/compute-chun…
Browse files Browse the repository at this point in the history
…ks-once

Signed-off-by: Owen Diehl <ow.diehl@gmail.com>
  • Loading branch information
owen-d committed Apr 23, 2024
2 parents 56eabcc + 282e385 commit 33c8e82
Show file tree
Hide file tree
Showing 531 changed files with 52,260 additions and 1,196 deletions.
2 changes: 1 addition & 1 deletion .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ local manifest_ecr(apps, archs) = pipeline('manifest-ecr') {
],
};

local build_image_tag = '0.33.1';
local build_image_tag = '0.33.2';
[
pipeline('loki-build-image-' + arch) {
workspace: {
Expand Down
12 changes: 6 additions & 6 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.1-amd64
- 0.33.2-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.1-arm64
- 0.33.2-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.1
target: loki-build-image:0.33.2
username:
from_secret: docker_username
when:
Expand Down Expand Up @@ -139,7 +139,7 @@ steps:
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.1
image: grafana/loki-build-image:0.33.2
name: documentation-helm-reference-check
trigger:
ref:
Expand Down Expand Up @@ -1085,7 +1085,7 @@ steps:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
image: grafana/loki-build-image:0.33.1
image: grafana/loki-build-image:0.33.2
name: build and push
privileged: true
volumes:
Expand Down Expand Up @@ -1308,6 +1308,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: e0940674c7a2b5ae47c6509b0bc97dc594a054e5b881fd1962b81837d6b1dee6
hmac: 87480bff973003712122d81a1575e2a62cff6fd4a42b163487cae6c6a67d8e7c

...
2 changes: 1 addition & 1 deletion .github/jsonnetfile.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"subdir": "workflows"
}
},
"version": "main"
"version": "124c4d996f9625478a79f1884465e29ea082d224"
}
],
"legacyImports": true
Expand Down
4 changes: 2 additions & 2 deletions .github/jsonnetfile.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"subdir": "workflows"
}
},
"version": "634945b73e8eed4f5161ec08810178ddeca7505b",
"sum": "BOnwSjzyOjWwv9ikwJSAgPBNnYHTU2PEDJ0PWY6nr7I="
"version": "124c4d996f9625478a79f1884465e29ea082d224",
"sum": "8wrJURq48ZBAtZcReO1W7AiXmvUyLqb932Q9sXyfFVo="
}
],
"legacyImports": false
Expand Down
5 changes: 1 addition & 4 deletions .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
local lokiRelease = import 'workflows/main.jsonnet';
local build = lokiRelease.build;

local releaseLibRef = std.filter(
function(dep) dep.source.git.remote == 'https://github.com/grafana/loki-release.git',
(import 'jsonnetfile.json').dependencies
)[0].version;
local releaseLibRef = 'main';

local checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef;

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"pull_request": {}
"push":
"branches":
- "main"
- "main"
1 change: 1 addition & 0 deletions .github/workflows/metrics-collector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
main:
if: github.owner == "grafana"
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/minor-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -753,7 +753,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -826,4 +826,4 @@ name: "Prepare Minor Release PR from Weekly"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
6 changes: 3 additions & 3 deletions .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -753,7 +753,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -826,4 +826,4 @@ name: "Prepare Patch Release PR"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
6 changes: 4 additions & 2 deletions .github/workflows/promtail-windows-test.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Promtail Windows Test
on:
pull_request:
tags: ['v[0-9].[0-9]+.[0-9]+']
branches: [main, k*]
branches: ["main", "k*", "release-[0-9]+.[0-9]+.x"]
push:
tags: ['v[0-9].[0-9]+.[0-9]+']
branches: ["main", "k*", "release-[0-9]+.[0-9]+.x"]
jobs:
build:
runs-on: windows-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -158,7 +158,7 @@ jobs:
- id: "get_github_app_token"
if: "${{ fromJSON(env.USE_GITHUB_APP_TOKEN) }}"
name: "get github app token"
uses: "actions/github-app-token@v1"
uses: "actions/create-github-app-token@v1"
with:
app-id: "${{ secrets.APP_ID }}"
owner: "${{ github.repository_owner }}"
Expand Down Expand Up @@ -219,4 +219,4 @@ name: "create release"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
18 changes: 18 additions & 0 deletions .github/workflows/verify-release-workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Verify release workflow updates
on: [pull_request]
jobs:
check-release-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup go
uses: actions/setup-go@v5
with:
go-version: '1.22.2'
- name: setup jsonnet
run: |
go install github.com/google/go-jsonnet/cmd/jsonnet@v0.20.0
go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/jb@v0.5.1
- name: Check that the release workflows have been updated properly
run: |
make BUILD_IN_CONTAINER=false release-workflows-check
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cmd/loki/loki
cmd/logcli/logcli
clients/cmd/promtail/promtail
cmd/loki/loki-debug
cmd/lokitool/lokitool
clients/cmd/promtail/promtail-debug
clients/cmd/docker-driver/docker-driver
cmd/loki-canary/loki-canary
Expand Down
1 change: 1 addition & 0 deletions ADOPTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* [Heureka Group](https://heureka.group)
* [Norwegian Refugee Council](https://www.nrc.no/)
* [Dropbox](https://www.dropbox.com/)
* [ASML](https://www.asml.com/)
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ Starting with the 3.0 release we began using [conventional commits](https://www.

##### Fixes

* [10708](https://github.com/grafana/loki/pull/10708) **joshuapare**: Fix UDP receiver on syslog transport
* [10631](https://github.com/grafana/loki/pull/10631) **thampiotr**: Fix race condition in cleaning up metrics when stopping to tail files.
* [10798](https://github.com/grafana/loki/pull/10798) **hainenber**: Fix agent panicking after reloaded due to duplicate metric collector registration.
* [10848](https://github.com/grafana/loki/pull/10848) **rgroothuijsen**: Correctly parse list of drop stage sources from YAML.
Expand Down
17 changes: 16 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.1
BUILD_IMAGE_VERSION ?= 0.33.2

# Docker image info
IMAGE_PREFIX ?= grafana
Expand Down Expand Up @@ -204,6 +204,15 @@ loki-querytee: cmd/querytee/querytee ## build loki-querytee executable
cmd/querytee/querytee:
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./$(@D)

############
# lokitool #
############
.PHONY: cmd/lokitool/lokitool
lokitool: cmd/lokitool/lokitool ## build lokitool executable

cmd/lokitool/lokitool:
CGO_ENABLED=0 go build $(GO_FLAGS) -o $@ ./cmd/lokitool

############
# Promtail #
############
Expand Down Expand Up @@ -891,3 +900,9 @@ scan-vulnerabilities: trivy snyk
release-workflows:
pushd $(CURDIR)/.github && jb update && popd
jsonnet -SJ .github/vendor -m .github/workflows .github/release-workflows.jsonnet

.PHONY: release-workflows-check
release-workflows-check:
@$(MAKE) release-workflows
@echo "Checking diff"
@git diff --exit-code -- ".github/workflows/*release*" || (echo "Please build release workflows by running 'make release-workflows'" && false)
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.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.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 Down
14 changes: 4 additions & 10 deletions clients/cmd/promtail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
FROM golang:1.21.9-bullseye as build
FROM golang:1.22.2-bookworm as build

COPY . /src/loki
WORKDIR /src/loki
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
RUN apt-get update && apt-get install -qy libsystemd-dev
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:bullseye-slim
FROM debian:12.5-slim
# tzdata required for the timestamp stage to work
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates
RUN apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates wget libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
COPY clients/cmd/promtail/promtail-docker-config.yaml /etc/promtail/config.yml
Expand Down
14 changes: 4 additions & 10 deletions clients/cmd/promtail/Dockerfile.arm32
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
FROM golang:1.21.9-bullseye as build
FROM golang:1.22.2-bookworm as build

COPY . /src/loki
WORKDIR /src/loki
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -t bullseye-backports -qy libsystemd-dev
RUN apt-get update && apt-get install -qy libsystemd-dev
RUN make clean && make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:bullseye-slim
FROM debian:12.5-slim
# tzdata required for the timestamp stage to work
# Backports repo required to get a libsystemd version 246 or newer which is required to handle journal +ZSTD compression
RUN echo "deb http://deb.debian.org/debian bullseye-backports main" >> /etc/apt/sources.list
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates
RUN apt-get install -t bullseye-backports -qy libsystemd-dev && \
apt-get install -qy tzdata ca-certificates wget libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
COPY clients/cmd/promtail/promtail-local-config.yaml /etc/promtail/local-config.yaml
Expand Down
9 changes: 4 additions & 5 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.1
ARG BUILD_IMAGE=grafana/loki-build-image:0.33.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/promtail -f clients/cmd/promtail/Dockerfile .
FROM golang:1.21.9-alpine as goenv
FROM 1.22.2-alpine as goenv
RUN go env GOARCH > /goarch && \
go env GOARM > /goarm

Expand All @@ -13,11 +13,10 @@ WORKDIR /src/loki
RUN make clean && GOARCH=$(cat /goarch) GOARM=$(cat /goarm) make BUILD_IN_CONTAINER=false PROMTAIL_JOURNAL_ENABLED=true promtail

# Promtail requires debian as the base image to support systemd journal reading
FROM debian:stretch-slim
FROM debian:12.5-slim
# tzdata required for the timestamp stage to work
RUN apt-get update && \
apt-get install -qy \
tzdata ca-certificates libsystemd-dev && \
apt-get install -qy tzdata ca-certificates wget libsystemd-dev && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY --from=build /src/loki/clients/cmd/promtail/promtail /usr/bin/promtail
COPY clients/cmd/promtail/promtail-local-config.yaml /etc/promtail/local-config.yaml
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.1 as build
FROM grafana/loki-build-image:0.33.2 as build
ARG GOARCH="amd64"
COPY . /src/loki
WORKDIR /src/loki
Expand Down
Loading

0 comments on commit 33c8e82

Please sign in to comment.