Skip to content

Commit

Permalink
feat: update TF provider to v3.11.0 (#189)
Browse files Browse the repository at this point in the history
* feat: update TF provider to v3.11.0

* fix: match go an golangci-lint version

* chore(golangci-lint): update config to remove warn messages

* chore(golangci-lint): give it 5min timeout
  • Loading branch information
Duologic authored Oct 31, 2024
1 parent 3cdfb8f commit c60e30d
Show file tree
Hide file tree
Showing 13 changed files with 157 additions and 135 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.22'
GOLANGCI_VERSION: 'v1.54.0'
GO_VERSION: '1.23'
GOLANGCI_VERSION: 'v1.61.0'
DOCKER_BUILDX_VERSION: 'v0.8.2'

# Common users. We can't run a step 'if secrets.XXX != ""' but we can run a
Expand Down
32 changes: 16 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
run:
timeout: 5m
deadline: 10m

skip-files:
- "zz_\\..+\\.go$"

output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
formats:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
- format: colored-line-number

linters-settings:
errcheck:
Expand All @@ -18,19 +17,17 @@ linters-settings:
# default is false: such cases aren't reported by default.
check-blank: false

# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
# List of functions to exclude from checking, where each entry is a single
# function to exclude. See
# https://github.com/kisielk/errcheck#excluding-functions for details.
exclude-functions:
- fmt:.*
- io/ioutil:^Read.*

govet:
# report about shadowed variables
check-shadowing: false

golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8

gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
Expand Down Expand Up @@ -104,15 +101,15 @@ linters-settings:

linters:
enable:
- megacheck
- gosimple
- staticcheck
- unused
- govet
- gocritic
- interfacer
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- prealloc
- golint
- unconvert
- misspell
- nakedret
Expand Down Expand Up @@ -179,6 +176,9 @@ issues:
# Default value for this option is true.
exclude-use-default: false

exclude-files:
- "zz_\\..+\\.go$"

# Show only new issues: if there are unstaged changes or untracked files,
# only those changes are analyzed, else only changes in HEAD~ are analyzed.
# It's a super-useful option for integration of golangci-lint into existing
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export CROSSPLANE_VERSION := 1.17
export TERRAFORM_PROVIDER_SOURCE := grafana/grafana
export TERRAFORM_PROVIDER_REPO := https://github.com/grafana/terraform-provider-grafana
# UPGRADE THE go.mod also!
export TERRAFORM_PROVIDER_VERSION := 3.10.0
export TERRAFORM_PROVIDER_VERSION := 3.11.0
export TERRAFORM_PROVIDER_DOWNLOAD_NAME := terraform-provider-grafana
export TERRAFORM_NATIVE_PROVIDER_BINARY := terraform-provider-grafana_v3.10.0
export TERRAFORM_NATIVE_PROVIDER_BINARY := terraform-provider-grafana_v3.11.0
export TERRAFORM_DOCS_PATH := docs/resources

PLATFORMS ?= linux_amd64 linux_arm64
Expand Down Expand Up @@ -40,8 +40,8 @@ NPROCS ?= 1
# to half the number of CPU cores.
GO_TEST_PARALLEL := $(shell echo $$(( $(NPROCS) / 2 )))

GO_REQUIRED_VERSION ?= 1.19
GOLANGCILINT_VERSION ?= 1.54.0
GO_REQUIRED_VERSION ?= 1.23
GOLANGCILINT_VERSION ?= 1.61.0
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/provider $(GO_PROJECT)/cmd/generator
GO_LDFLAGS += -X $(GO_PROJECT)/internal/version.Version=$(VERSION)
GO_SUBDIRS += cmd internal apis
Expand Down
12 changes: 6 additions & 6 deletions apis/oncall/v1alpha1/zz_escalation_types.go

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

2 changes: 1 addition & 1 deletion apis/sm/v1alpha1/zz_check_terraformed.go

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

24 changes: 8 additions & 16 deletions apis/sm/v1alpha1/zz_check_types.go

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

34 changes: 8 additions & 26 deletions apis/sm/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 3 additions & 3 deletions config/provider-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ resources:
}
argumentDocs:
action_to_trigger: (String) The ID of an Action for trigger_webhook type step.
duration: (Number) The duration of delay for wait type step.
duration: (Number) The duration of delay for wait type step. (60-86400) seconds
escalation_chain_id: (String) The ID of the escalation chain.
group_to_notify: (String) The ID of a User Group for notify_user_group type step.
id: (String) The ID of this resource.
Expand Down Expand Up @@ -3910,7 +3910,7 @@ resources:
attribute: (String) The attribute to use when finding the variable value. Only used when type is CSS_SELECTOR
basic_auth: '(Block Set, Max: 1) Basic auth settings. (see below for nested schema)'
basic_metrics_only: (Boolean) Metrics are reduced by default. Set this to false if you'd like to publish all metrics. We maintain a full list of metrics collected for each. Defaults to true.
bearer_token: (String) Token for use with bearer authorization header.
bearer_token: (String, Sensitive) Token for use with bearer authorization header.
body: (String) The body of the HTTP request used in probe.
ca_cert: (String) CA certificate in PEM format.
cache_busting_query_param_name: (String) The name of the query parameter used to prevent the server from using a cached response. Each probe will assign a random value to this parameter each time a request is made.
Expand Down Expand Up @@ -3949,7 +3949,7 @@ resources:
multihttp: '(Block Set, Max: 1) Settings for MultiHTTP check. The target must be a URL (http or https) (see below for nested schema)'
name: (String) Name of the header to send
no_follow_redirects: (Boolean) Do not follow redirects. Defaults to false.
password: (String) Basic auth password.
password: (String, Sensitive) Basic auth password.
payload: (String) The body payload
payload_size: (Number) Payload size. Defaults to 0.
ping: '(Block Set, Max: 1) Settings for ping (ICMP) check. The target must be a valid hostname or IP address. (see below for nested schema)'
Expand Down
2 changes: 1 addition & 1 deletion config/schema.json

Large diffs are not rendered by default.

Loading

0 comments on commit c60e30d

Please sign in to comment.