Skip to content

Commit

Permalink
Merge branch 'main' into log-4550-gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwanthgoli committed Oct 15, 2024
2 parents f473928 + 3e451c7 commit 3da88e5
Show file tree
Hide file tree
Showing 350 changed files with 4,034 additions and 14,008 deletions.
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": "d900569c04b53e02de6ef208fa77cba41ec5f709"
"version": "20aac53fcb06d378b1c1101c7e4dc989466eb4ff"
}
],
"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": "d900569c04b53e02de6ef208fa77cba41ec5f709",
"sum": "+uAzU+b+aJtp3k+JX5mDxuh8LNY23+cHvUOwzCQ8CS8="
"version": "20aac53fcb06d378b1c1101c7e4dc989466eb4ff",
"sum": "bo355Fm9Gm1TU13MjlXGXgrCXo4CPr7aEeTvgNFYAl8="
}
],
"legacyImports": false
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"
10 changes: 8 additions & 2 deletions .github/workflows/helm-loki-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
fi
helm dependency build
for file in scenarios/*.yaml; do
cat "$file"
echo "rendering scenario $(file)"
schenario_folder=${{ github.workspace }}/output/base/$(basename $file .yaml)
mkdir $schenario_folder
helm template loki-test-chart-name . -f $file --output-dir $schenario_folder
Expand All @@ -62,9 +62,15 @@ jobs:
- name: Render Helm chart for each scenario in the PR branch
run: |
cd ${{ github.workspace }}/pr/production/helm/loki
# Check if the scenarios folder exists
if [ ! -d "scenarios" ]; then
echo "PR looks outdated because PRs branch does not have the scenarios, copying them from the base branch."
cp -r ${{ github.workspace }}/base/production/helm/loki/scenarios ./scenarios
fi
helm dependency build
for file in scenarios/*.yaml; do
cat "$file"
echo "rendering scenario $(file)"
schenario_folder=${{ github.workspace }}/output/pr/$(basename $file .yaml)
mkdir $schenario_folder
helm template loki-test-chart-name . -f $file --output-dir $schenario_folder
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -430,4 +430,4 @@
"permissions":
"contents": "write"
"id-token": "write"
"pull-requests": "write"
"pull-requests": "write"
2 changes: 1 addition & 1 deletion .github/workflows/minor-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -828,4 +828,4 @@ name: "Prepare Minor Release PR from Weekly"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
7 changes: 4 additions & 3 deletions .github/workflows/nix-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,30 @@ on:
pull_request:
paths:
- "flake.nix"
- "go.mod"
- "nix/**"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix run --print-build-logs .#lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix run --print-build-logs .#test
packages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v22
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix build --print-build-logs .#promtail
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/operator-scorecard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v4
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Install make
run: sudo apt-get install make
Expand All @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Install make
run: sudo apt-get install make
Expand All @@ -51,8 +51,8 @@ jobs:
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54.2
args: --timeout=4m
version: v1.61.0
args: --timeout=5m
working-directory: ./operator
- name: Check prometheus rules
working-directory: ./operator
Expand All @@ -64,7 +64,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Install make
run: sudo apt-get install make
Expand All @@ -85,7 +85,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Install make
run: sudo apt-get install make
Expand All @@ -106,7 +106,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go: ['1.21']
go: ['1.22']
steps:
- name: Install make
run: sudo apt-get install make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/patch-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -828,4 +828,4 @@ name: "Prepare Patch Release PR"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,4 @@ name: "create release"
permissions:
contents: "write"
id-token: "write"
pull-requests: "write"
pull-requests: "write"
6 changes: 2 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ run:

# list of build tags, all linters use it. Default is empty list.
build-tags:
- linux
- cgo
- promtail_journal_enabled
- integration

# output configuration options
output:
formats:
Expand Down Expand Up @@ -63,7 +61,7 @@ linters:
- govet
- typecheck
- depguard
- exportloopref
- copyloopvar
- gofmt
- goimports
- gosimple
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ ifeq ($(BUILD_IN_CONTAINER),true)
else
go version
golangci-lint version
GO111MODULE=on golangci-lint run -v --timeout 15m
GO111MODULE=on golangci-lint run -v --timeout 15m --build-tags linux,promtail_journal_enabled
faillint -paths "sync/atomic=go.uber.org/atomic" ./...
endif

Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluentd/docker/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
source 'https://rubygems.org'

gem 'fluentd', '1.15.3'
gem 'fluent-plugin-multi-format-parser', '~>1.0.0'
gem 'fluent-plugin-multi-format-parser', '~>1.1.0'
1 change: 0 additions & 1 deletion clients/pkg/logentry/metric/counters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ func Test_validateCounterConfig(t *testing.T) {
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
err := validateCounterConfig(&tt.config)
Expand Down
2 changes: 0 additions & 2 deletions clients/pkg/logentry/stages/decolorize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ func TestPipeline_Decolorize(t *testing.T) {
}

for testName, testData := range tests {
testData := testData

t.Run(testName, func(t *testing.T) {
t.Parallel()

Expand Down
4 changes: 0 additions & 4 deletions clients/pkg/logentry/stages/eventlogmessage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ func TestEventLogMessage_simple(t *testing.T) {
}

for testName, testData := range tests {
testData := testData
testData.extractedValues[testData.sourcekey] = testData.msgdata

t.Run(testName, func(t *testing.T) {
Expand Down Expand Up @@ -151,7 +150,6 @@ func TestEventLogMessageConfig_validate(t *testing.T) {
},
}
for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
_, err := newEventLogMessageStage(util_log.Logger, tt.config)
if tt.err != nil {
Expand Down Expand Up @@ -262,7 +260,6 @@ func TestEventLogMessage_Real(t *testing.T) {
}

for testName, testData := range tests {
testData := testData
testData.extractedValues[testData.sourcekey] = testData.msgdata

t.Run(testName, func(t *testing.T) {
Expand Down Expand Up @@ -318,7 +315,6 @@ func TestEventLogMessage_invalid(t *testing.T) {
}

for testName, testData := range tests {
testData := testData
testData.extractedValues[testData.sourcekey] = testData.msgdata

t.Run(testName, func(t *testing.T) {
Expand Down
2 changes: 0 additions & 2 deletions clients/pkg/logentry/stages/extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func TestNewDocker(t *testing.T) {
}

for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
t.Parallel()
p, err := NewDocker(util_log.Logger, prometheus.DefaultRegisterer)
Expand Down Expand Up @@ -268,7 +267,6 @@ func TestNewCri(t *testing.T) {
}

for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
t.Parallel()
cfg := map[string]interface{}{}
Expand Down
4 changes: 0 additions & 4 deletions clients/pkg/logentry/stages/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ func TestPipeline_JSON(t *testing.T) {
}

for testName, testData := range tests {
testData := testData

t.Run(testName, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -179,7 +177,6 @@ func TestJSONConfig_validate(t *testing.T) {
},
}
for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
c, err := parseJSONConfig(tt.config)
assert.NoError(t, err, "failed to create config: %s", err)
Expand Down Expand Up @@ -339,7 +336,6 @@ func TestJSONParser_Parse(t *testing.T) {
},
}
for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
t.Parallel()
p, err := New(util_log.Logger, nil, StageTypeJSON, tt.config, nil)
Expand Down
2 changes: 0 additions & 2 deletions clients/pkg/logentry/stages/labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ func TestLabels(t *testing.T) {
},
}
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()
err := validateLabelsConfig(test.config)
Expand Down Expand Up @@ -176,7 +175,6 @@ func TestLabelStage_Process(t *testing.T) {
},
}
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()
st, err := newLabelStage(util_log.Logger, test.config)
Expand Down
4 changes: 0 additions & 4 deletions clients/pkg/logentry/stages/logfmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ func TestPipeline_Logfmt(t *testing.T) {
}

for testName, testData := range tests {
testData := testData

t.Run(testName, func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -153,7 +151,6 @@ func TestLogfmtConfig_validate(t *testing.T) {
},
}
for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
c, err := parseLogfmtConfig(tt.config)
assert.NoError(t, err)
Expand Down Expand Up @@ -281,7 +278,6 @@ func TestLogfmtParser_Parse(t *testing.T) {
},
}
for tName, tt := range tests {
tt := tt
t.Run(tName, func(t *testing.T) {
t.Parallel()
p, err := New(util_log.Logger, nil, StageTypeLogfmt, tt.config, nil)
Expand Down
1 change: 0 additions & 1 deletion clients/pkg/logentry/stages/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ func TestValidateMetricsConfig(t *testing.T) {
}

for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()
err := validateMetricsConfig(test.config)
Expand Down
2 changes: 0 additions & 2 deletions clients/pkg/logentry/stages/output_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ func TestOutputValidation(t *testing.T) {
},
}
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()
err := validateOutputConfig(test.config)
Expand Down Expand Up @@ -120,7 +119,6 @@ func TestOutputStage_Process(t *testing.T) {
},
}
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()
st, err := newOutputStage(util_log.Logger, test.config)
Expand Down
Loading

0 comments on commit 3da88e5

Please sign in to comment.