Skip to content

Commit

Permalink
Merge branch 'main' into log-4550-aws
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoBraveCoding committed Apr 19, 2024
2 parents 7b0eee5 + e39677f commit 4c2859b
Show file tree
Hide file tree
Showing 4,162 changed files with 504,415 additions and 238,309 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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
44 changes: 1 addition & 43 deletions .drone/drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -151,30 +151,6 @@ local arch_image(arch, tags='') = {
}],
};

local promtail_win() = pipeline('promtail-windows') {
platform: {
os: 'windows',
arch: 'amd64',
version: '1809',
},
steps: [
{
name: 'identify-runner',
image: 'golang:1.21.3-windowsservercore-1809',
commands: [
'Write-Output $env:DRONE_RUNNER_NAME',
],
},
{
name: 'test',
image: 'golang:1.21.3-windowsservercore-1809',
commands: [
'go test .\\clients\\pkg\\promtail\\targets\\windows\\... -v',
],
},
],
};

local querytee() = pipeline('querytee-amd64') + arch_image('amd64', 'main') {
steps+: [
// publish for tag or main
Expand Down Expand Up @@ -400,7 +376,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 Expand Up @@ -474,23 +450,6 @@ local build_image_tag = '0.33.0';
},
],
},
pipeline('mixins') {
workspace: {
base: '/src',
path: 'loki',
},
steps: [
make('lint-jsonnet', container=false) {
// Docker image defined at https://github.com/grafana/jsonnet-libs/tree/master/build
image: 'grafana/jsonnet-build:c8b75df',
depends_on: ['clone'],
},
make('loki-mixin-check', container=false) {
depends_on: ['clone'],
when: onPRs + onPath('production/loki-mixin/**'),
},
],
},
pipeline('documentation-checks') {
workspace: {
base: '/src',
Expand Down Expand Up @@ -654,7 +613,6 @@ local build_image_tag = '0.33.0';
},
],
},
promtail_win(),
logql_analyzer(),
pipeline('docker-driver') {
trigger+: onTagOrMain,
Expand Down
66 changes: 6 additions & 60 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 @@ -132,46 +132,14 @@ workspace:
path: loki
---
kind: pipeline
name: mixins
steps:
- commands:
- make BUILD_IN_CONTAINER=false lint-jsonnet
depends_on:
- clone
environment: {}
image: grafana/jsonnet-build:c8b75df
name: lint-jsonnet
- commands:
- make BUILD_IN_CONTAINER=false loki-mixin-check
depends_on:
- clone
environment: {}
image: grafana/loki-build-image:0.33.0
name: loki-mixin-check
when:
event:
- pull_request
paths:
- production/loki-mixin/**
trigger:
ref:
- refs/heads/main
- refs/heads/k???
- refs/tags/v*
- refs/pull/*/head
workspace:
base: /src
path: loki
---
kind: pipeline
name: documentation-checks
steps:
- commands:
- make BUILD_IN_CONTAINER=false documentation-helm-reference-check
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 @@ -1070,28 +1038,6 @@ trigger:
- refs/tags/v*
---
kind: pipeline
name: promtail-windows
platform:
arch: amd64
os: windows
version: "1809"
steps:
- commands:
- Write-Output $env:DRONE_RUNNER_NAME
image: golang:1.21.3-windowsservercore-1809
name: identify-runner
- commands:
- go test .\clients\pkg\promtail\targets\windows\... -v
image: golang:1.21.3-windowsservercore-1809
name: test
trigger:
ref:
- refs/heads/main
- refs/heads/k???
- refs/tags/v*
- refs/pull/*/head
---
kind: pipeline
name: logql-analyzer
platform:
arch: amd64
Expand Down Expand Up @@ -1139,7 +1085,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 +1308,6 @@ kind: secret
name: gpg_private_key
---
kind: signature
hmac: 32b44aecaad0258ed9494225595e1016a56bea960bcd0b15b2db3449bed957e0
hmac: e0940674c7a2b5ae47c6509b0bc97dc594a054e5b881fd1962b81837d6b1dee6

...
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": "release-1.10.x"
"version": "main"
}
],
"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": "c005223f58b83f288b655dde5bcfeff7490c7aa5",
"sum": "5K+r6Bsb8JMR1ytQjSObjvHFpH7SJBi5D4ysSwvC4/g="
"version": "634945b73e8eed4f5161ec08810178ddeca7505b",
"sum": "BOnwSjzyOjWwv9ikwJSAgPBNnYHTU2PEDJ0PWY6nr7I="
}
],
"legacyImports": false
Expand Down
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Fixes #<issue number>
- [ ] Reviewed the [`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md) guide (**required**)
- [ ] Documentation added
- [ ] Tests updated
- [ ] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add `add-to-release-notes` label
- [ ] Title matches the required conventional commits format, see [here](https://www.conventionalcommits.org/en/v1.0.0/)
- [ ] Changes that require user attention or interaction to upgrade are documented in `docs/sources/setup/upgrade/_index.md`
- [ ] For Helm chart changes bump the Helm chart version in `production/helm/loki/Chart.yaml` and update `production/helm/loki/CHANGELOG.md` and `production/helm/loki/README.md`. [Example PR](https://github.com/grafana/loki/commit/d10549e3ece02120974929894ee333d07755d213)
- [ ] If the change is deprecating or removing a configuration option, update the `deprecated-config.yaml` and `deleted-config.yaml` files respectively in the `tools/deprecated-config-checker` directory. [Example PR](https://github.com/grafana/loki/pull/10840/commits/0d4416a4b03739583349934b96f272fb4f685d15)
103 changes: 72 additions & 31 deletions .github/release-workflows.jsonnet
Original file line number Diff line number Diff line change
@@ -1,58 +1,99 @@
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 checkTemplate = 'grafana/loki-release/.github/workflows/check.yml@%s' % releaseLibRef;

local imageJobs = {
loki: build.image('loki', 'cmd/loki'),
fluentd: build.image('fluent-plugin-loki', 'clients/cmd/fluentd', platform=['linux/amd64']),
'fluent-bit': build.image('fluent-bit-plugin-loki', 'clients/cmd/fluent-bit', platform=['linux/amd64']),
logstash: build.image('logstash-output-loki', 'clients/cmd/logstash', platform=['linux/amd64']),
logcli: build.image('logcli', 'cmd/logcli'),
'loki-canary': build.image('loki-canary', 'cmd/loki-canary'),
'loki-canary-boringcrypto': build.image('loki-canary-boringcrypto', 'cmd/loki-canary-boringcrypto'),
promtail: build.image('promtail', 'clients/cmd/promtail'),
querytee: build.image('loki-query-tee', 'cmd/querytee', platform=['linux/amd64']),
};

local buildImage = 'grafana/loki-build-image:0.33.1';
local golangCiLintVersion = 'v1.55.1';

local imageBuildTimeoutMin = 40;
local imagePrefix = 'grafana';

{
'patch-release-pr.yml': std.manifestYamlDoc(
lokiRelease.releasePRWorkflow(
imageJobs={
loki: build.image('loki', 'cmd/loki'),
fluentd: build.image('fluentd', 'clients/cmd/fluentd', platform=['linux/amd64']),
'fluent-bit': build.image('fluent-bit', 'clients/cmd/fluent-bit', platform=['linux/amd64']),
logstash: build.image('logstash', 'clients/cmd/logstash', platform=['linux/amd64']),
logcli: build.image('logcli', 'cmd/logcli'),
'loki-canary': build.image('loki-canary', 'cmd/loki-canary'),
'loki-canary-boringcrypto': build.image('loki-canary-boringcrypto', 'cmd/loki-canary-boringcrypto'),
'loki-operator': build.image('loki-operator', 'operator', context='release/operator', platform=['linux/amd64']),
promtail: build.image('promtail', 'clients/cmd/promtail'),
querytee: build.image('querytee', 'cmd/querytee', platform=['linux/amd64']),
},
branches=['release-[0-9]+.[0-9]+.x'],
checkTemplate='grafana/loki-release/.github/workflows/check.yml@release-1.10.x',
imagePrefix='grafana',
buildImage=buildImage,
checkTemplate=checkTemplate,
golangCiLintVersion=golangCiLintVersion,
imageBuildTimeoutMin=imageBuildTimeoutMin,
imageJobs=imageJobs,
imagePrefix=imagePrefix,
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
skipArm=false,
skipValidation=false,
useGitHubAppToken=true,
versioningStrategy='always-bump-patch',
), false, false
) + {
name: 'Prepare Patch Release PR',
}, false, false
),
'minor-release-pr.yml': std.manifestYamlDoc(
lokiRelease.releasePRWorkflow(
imageJobs={
loki: build.image('loki', 'cmd/loki'),
fluentd: build.image('fluentd', 'clients/cmd/fluentd', platform=['linux/amd64']),
'fluent-bit': build.image('fluent-bit', 'clients/cmd/fluent-bit', platform=['linux/amd64']),
logstash: build.image('logstash', 'clients/cmd/logstash', platform=['linux/amd64']),
logcli: build.image('logcli', 'cmd/logcli'),
'loki-canary': build.image('loki-canary', 'cmd/loki-canary'),
'loki-canary-boringcrypto': build.image('loki-canary-boringcrypto', 'cmd/loki-canary-boringcrypto'),
'loki-operator': build.image('loki-operator', 'operator', context='release/operator', platform=['linux/amd64']),
promtail: build.image('promtail', 'clients/cmd/promtail'),
querytee: build.image('querytee', 'cmd/querytee', platform=['linux/amd64']),
},
branches=['k[0-9]+'],
checkTemplate='grafana/loki-release/.github/workflows/check.yml@release-1.10.x',
imagePrefix='grafana',
buildImage=buildImage,
checkTemplate=checkTemplate,
golangCiLintVersion=golangCiLintVersion,
imageBuildTimeoutMin=imageBuildTimeoutMin,
imageJobs=imageJobs,
imagePrefix=imagePrefix,
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
skipArm=false,
skipValidation=false,
useGitHubAppToken=true,
versioningStrategy='always-bump-minor',
), false, false
) + {
name: 'Prepare Minor Release PR from Weekly',
}, false, false
),
'release.yml': std.manifestYamlDoc(
lokiRelease.releaseWorkflow(
branches=['release-[0-9]+.[0-9]+.x', 'k[0-9]+'],
branches=['release-[0-9]+.[0-9]+.x', 'k[0-9]+', 'main'],
getDockerCredsFromVault=true,
imagePrefix='grafana',
releaseLibRef=releaseLibRef,
releaseRepo='grafana/loki',
useGitHubAppToken=false,
), false, false
),
'check.yml': std.manifestYamlDoc({
name: 'check',
on: {
pull_request: {},
push: {
branches: ['main'],
},
},
jobs: {
check: {
uses: checkTemplate,
with: {
build_image: buildImage,
golang_ci_lint_version: golangCiLintVersion,
release_lib_ref: releaseLibRef,
skip_validation: false,
use_github_app_token: true,
},
},
},
}),
}
Loading

0 comments on commit 4c2859b

Please sign in to comment.