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

Update go version used in CI to 1.23.1 #891

Merged
merged 4 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
pull_request:
env:
# Default minimum version of Go to support.
DEFAULT_GO_VERSION: "1.22.5"
DEFAULT_GO_VERSION: "1.23.1"
jobs:
lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
compatibility-test:
strategy:
matrix:
go-version: ["1.22.3", "1.21"]
go-version: ["1.23.1", "1.22.5", "1.21"]
os: [ubuntu-latest, macos-latest, windows-latest]
arch: ["386", amd64]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-e2e-cloud-functions-gen2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

steps:
# Vendor dependencies, and zip the code.
- name: golang:1.22.3
- name: golang:1.23.1
id: zip-code
entrypoint: /bin/bash
args:
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-e2e-gae-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

steps:
# Vendor dependencies, and zip the code.
- name: golang:1.22.2
- name: golang:1.23.1
id: zip-code
entrypoint: /bin/bash
args:
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

steps:
- name: golang:1.22.3
- name: golang:1.23.1
env: ["SECOND_PROJECT_ID=opentelemetry-ops-e2e-2"]
args: ["make", "integrationtest"]
logsBucket: gs://opentelemetry-ops-e2e-cloud-build-logs
2 changes: 1 addition & 1 deletion e2e-test-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM golang:1.22.3 as builder
FROM golang:1.23.1 as builder

WORKDIR /workspace/e2e-test-server/

Expand Down
12 changes: 6 additions & 6 deletions exporter/collector/integrationtest/protos/fixtures.pb.go

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

51 changes: 20 additions & 31 deletions golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ run:
# on Windows.
skip-dirs:

# default is true. Enables skipping of directories:
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
skip-dirs-use-default: false

# which files to skip: they will be analyzed, but issues from them
# won't be reported. Default value is empty list, but there is
# no need to include all autogenerated files, we confidently recognize
Expand All @@ -56,7 +52,7 @@ run:
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats: colored-line-number

# print lines of code with issue, default is true
print-issued-lines: true
Expand All @@ -71,29 +67,20 @@ output:
# all available settings of specific linters
linters-settings:
depguard:
# Check the list against standard lib.
# Default: false
include-go-root: true
# A list of packages for the list type specified.
# Default: []
packages:
- "crypto/md5"
- "crypto/sha1"
- "crypto/**/pkix"
ignore-file-rules:
- "**/*_test.go"
additional-guards:
# Do not allow testing packages in non-test files.
- list-type: denylist
include-go-root: true
packages:
- testing
- github.com/stretchr/testify
ignore-file-rules:
- "**/*_test.go"
- "**/*test/*.go"
- "**/testcase.go"
- "**/recordfixtures/*.go"
rules:
non-tests:
files:
- "!$test"
- "!**/testcase.go"
- "!**/*test/*.go"
- "!**/*recordfixtures/*.go"
- "!**/internal/matchers/*.go"
deny:
- pkg: "testing"
- pkg: "github.com/stretchr/testify"
- pkg: "crypto/md5"
- pkg: "crypto/sha1"
- pkg: "crypto/**/pkix"
godot:
exclude:
# Exclude sentence fragments for lists.
Expand All @@ -113,7 +100,7 @@ linters-settings:
min-confidence: 0.8
govet:
# report about shadowed variables
check-shadowing: true
shadow: true

# settings per analyzer
settings:
Expand Down Expand Up @@ -153,8 +140,9 @@ linters-settings:
- name: constant-logical-expr
disabled: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-as-argument
# TODO reenable linter when it is compatible. https://github.com/golangci/golangci-lint/issues/3280
- name: context-as-argument
disabled: false
disabled: true
arguments:
allowTypesBefore: "*testing.T"
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#context-keys-type
Expand Down Expand Up @@ -292,7 +280,7 @@ linters:
enable:
- depguard
- errcheck
- exportloopref
- copyloopvar
- godot
- gofmt
- goimports
Expand Down Expand Up @@ -322,3 +310,4 @@ issues:
- path: \.pb\.go
linters:
- govet
exclude-dirs-use-default: false
3 changes: 1 addition & 2 deletions internal/resourcemapping/resourcemapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,8 @@
return createMonitoredResource(k8sPod, attrs)
} else if _, ok := attrs.GetString(string(semconv.K8SNodeNameKey)); ok {
return createMonitoredResource(k8sNode, attrs)
} else {
return createMonitoredResource(k8sCluster, attrs)
}
return createMonitoredResource(k8sCluster, attrs)

Check warning on line 225 in internal/resourcemapping/resourcemapping.go

View check run for this annotation

Codecov / codecov/patch

internal/resourcemapping/resourcemapping.go#L225

Added line #L225 was not covered by tests
}

// Fallback to generic_task
Expand Down
Loading
Loading