Skip to content

Commit

Permalink
Merge branch 'master' into postgres_sanitize
Browse files Browse the repository at this point in the history
  • Loading branch information
powersj authored Feb 22, 2024
2 parents ff668c4 + c4069a4 commit c24328a
Show file tree
Hide file tree
Showing 78 changed files with 2,651 additions and 2,574 deletions.
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ commands:
equal: [ "386", << parameters.arch >> ]
steps:
- run: echo 'export RACE="-race"' >> $BASH_ENV
- when:
condition:
equal: [ windows, << parameters.os >> ]
steps:
- run: echo 'export CGO_ENABLED=1' >> $BASH_ENV
- run: |
GOARCH=<< parameters.arch >> ./<< parameters.gotestsum >> -- ${RACE} -short ./...
package-build:
Expand Down Expand Up @@ -170,7 +175,8 @@ jobs:
- run: git config --system core.longpaths true
- run: choco feature enable -n allowGlobalConfirmation
- run: 'sh ./scripts/installgo_windows.sh'
- run: choco install mingw --version=12.2.0.03042023
- run: choco install mingw
- run: echo 'export PATH="$PATH:/c/ProgramData/mingw64/mingw64/bin"' >> $BASH_ENV
- test-go:
os: windows
gotestsum: "gotestsum.exe"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: super-linter/super-linter@v6.0.0
uses: super-linter/super-linter@v6.1.1
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,54 @@
the `server` tag value for a URI-format address might change in case it
contains spaces, backslashes or single-quotes in non-redacted parameters.

## v1.29.5 [2024-02-20]

### Bugfixes

- [#14669](https://github.com/influxdata/telegraf/pull/14669) `inputs.filecount` Respect symlink files with FollowSymLinks
- [#14838](https://github.com/influxdata/telegraf/pull/14838) `inputs.gnmi` Normalize path for inline origin handling
- [#14679](https://github.com/influxdata/telegraf/pull/14679) `inputs.kafka_consumer` Fix typo of msg_headers_as_tags
- [#14707](https://github.com/influxdata/telegraf/pull/14707) `inputs.postgresql_extensible` Add support for bool tags
- [#14659](https://github.com/influxdata/telegraf/pull/14659) `inputs.redfish` Resolve iLO4 fan data
- [#14665](https://github.com/influxdata/telegraf/pull/14665) `inputs.snmp_trap` Enable SHA ciphers
- [#14635](https://github.com/influxdata/telegraf/pull/14635) `inputs.vsphere` Use guest.guestId value if set for guest name
- [#14752](https://github.com/influxdata/telegraf/pull/14752) `outputs.mqtt` Retry metrics for server timeout
- [#14770](https://github.com/influxdata/telegraf/pull/14770) `processors.execd` Accept tracking metrics instead of dropping them
- [#14832](https://github.com/influxdata/telegraf/pull/14832) `processors.unpivot` Handle tracking metrics correctly
- [#14654](https://github.com/influxdata/telegraf/pull/14654) `rpm` Ensure telegraf is installed after useradd

### Dependency Updates

- [#14690](https://github.com/influxdata/telegraf/pull/14690) `deps` Bump cloud.google.com/go/bigquery from 1.57.1 to 1.58.0
- [#14772](https://github.com/influxdata/telegraf/pull/14772) `deps` Bump cloud.google.com/go/pubsub from 1.33.0 to 1.36.1
- [#14819](https://github.com/influxdata/telegraf/pull/14819) `deps` Bump cloud.google.com/go/storage from 1.36.0 to 1.38.0
- [#14688](https://github.com/influxdata/telegraf/pull/14688) `deps` Bump github.com/Azure/azure-event-hubs-go/v3 from 3.6.1 to 3.6.2
- [#14845](https://github.com/influxdata/telegraf/pull/14845) `deps` Bump github.com/DATA-DOG/go-sqlmock from 1.5.0 to 1.5.2
- [#14820](https://github.com/influxdata/telegraf/pull/14820) `deps` Bump github.com/IBM/sarama from 1.42.1 to 1.42.2
- [#14774](https://github.com/influxdata/telegraf/pull/14774) `deps` Bump github.com/awnumar/memguard from 0.22.4-0.20231204102859-fce56aae03b8 to 0.22.4
- [#14687](https://github.com/influxdata/telegraf/pull/14687) `deps` Bump github.com/cloudevents/sdk-go/v2 from 2.14.0 to 2.15.0
- [#14769](https://github.com/influxdata/telegraf/pull/14769) `deps` Bump github.com/eclipse/paho.golang from 0.11.0 to 0.20.0
- [#14775](https://github.com/influxdata/telegraf/pull/14775) `deps` Bump github.com/google/uuid from 1.5.0 to 1.6.0
- [#14686](https://github.com/influxdata/telegraf/pull/14686) `deps` Bump github.com/gopcua/opcua from 0.4.0 to 0.5.3
- [#14848](https://github.com/influxdata/telegraf/pull/14848) `deps` Bump github.com/gophercloud/gophercloud from 1.7.0 to 1.9.0
- [#14755](https://github.com/influxdata/telegraf/pull/14755) `deps` Bump github.com/gwos/tcg/sdk from v0.0.0-20220621192633-df0eac0a1a4c to v8.7.2
- [#14816](https://github.com/influxdata/telegraf/pull/14816) `deps` Bump github.com/jhump/protoreflect from 1.15.4 to 1.15.6
- [#14773](https://github.com/influxdata/telegraf/pull/14773) `deps` Bump github.com/klauspost/compress from 1.17.4 to 1.17.6
- [#14817](https://github.com/influxdata/telegraf/pull/14817) `deps` Bump github.com/miekg/dns from 1.1.57 to 1.1.58
- [#14766](https://github.com/influxdata/telegraf/pull/14766) `deps` Bump github.com/showwin/speedtest-go from 1.6.7 to 1.6.10
- [#14765](https://github.com/influxdata/telegraf/pull/14765) `deps` Bump github.com/urfave/cli/v2 from 2.25.7 to 2.27.1
- [#14818](https://github.com/influxdata/telegraf/pull/14818) `deps` Bump go.opentelemetry.io/collector/pdata from 1.0.1 to 1.1.0
- [#14768](https://github.com/influxdata/telegraf/pull/14768) `deps` Bump golang.org/x/oauth2 from 0.16.0 to 0.17.0
- [#14849](https://github.com/influxdata/telegraf/pull/14849) `deps` Bump google.golang.org/api from 0.162.0 to 0.165.0
- [#14847](https://github.com/influxdata/telegraf/pull/14847) `deps` Bump google.golang.org/grpc from 1.61.0 to 1.61.1
- [#14689](https://github.com/influxdata/telegraf/pull/14689) `deps` Bump k8s.io/apimachinery from 0.29.0 to 0.29.1
- [#14767](https://github.com/influxdata/telegraf/pull/14767) `deps` Bump k8s.io/client-go from 0.29.0 to 0.29.1
- [#14846](https://github.com/influxdata/telegraf/pull/14846) `deps` Bump k8s.io/client-go from 0.29.1 to 0.29.2
- [#14850](https://github.com/influxdata/telegraf/pull/14850) `deps` Bump super-linter/super-linter from 6.0.0 to 6.1.1
- [#14771](https://github.com/influxdata/telegraf/pull/14771) `deps` Bump tj-actions/changed-files from 41 to 42
- [#14757](https://github.com/influxdata/telegraf/pull/14757) `deps` Get rid of golang.org/x/exp and use stable versions instead
- [#14753](https://github.com/influxdata/telegraf/pull/14753) `deps` Use github.com/coreos/go-systemd/v22 instead of git version

## v1.29.4 [2024-01-31]

### Bugfixes
Expand Down
23 changes: 17 additions & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,10 @@ func (c *Config) LoadConfigData(data []byte) error {
}

if len(c.UnusedFields) > 0 {
return fmt.Errorf("line %d: configuration specified the fields %q, but they weren't used", tbl.Line, keys(c.UnusedFields))
return fmt.Errorf(
"line %d: configuration specified the fields %q, but they were not used. "+
"This is either a typo or this config option does not exist in this version.",
tbl.Line, keys(c.UnusedFields))
}

// Initialize the file-sorting slices
Expand Down Expand Up @@ -575,7 +578,9 @@ func (c *Config) LoadConfigData(data []byte) error {
pluginName)
}
if len(c.UnusedFields) > 0 {
return fmt.Errorf("plugin %s.%s: line %d: configuration specified the fields %q, but they weren't used",
return fmt.Errorf(
"plugin %s.%s: line %d: configuration specified the fields %q, but they were not used. "+
"This is either a typo or this config option does not exist in this version.",
name, pluginName, subTable.Line, keys(c.UnusedFields))
}
}
Expand All @@ -598,7 +603,9 @@ func (c *Config) LoadConfigData(data []byte) error {
pluginName)
}
if len(c.UnusedFields) > 0 {
return fmt.Errorf("plugin %s.%s: line %d: configuration specified the fields %q, but they weren't used",
return fmt.Errorf(
"plugin %s.%s: line %d: configuration specified the fields %q, but they were not used. "+
"This is either a typo or this config option does not exist in this version.",
name, pluginName, subTable.Line, keys(c.UnusedFields))
}
}
Expand All @@ -617,7 +624,8 @@ func (c *Config) LoadConfigData(data []byte) error {
}
if len(c.UnusedFields) > 0 {
return fmt.Errorf(
"plugin %s.%s: line %d: configuration specified the fields %q, but they weren't used",
"plugin %s.%s: line %d: configuration specified the fields %q, but they were not used. "+
"This is either a typo or this config option does not exist in this version.",
name,
pluginName,
subTable.Line,
Expand All @@ -639,7 +647,9 @@ func (c *Config) LoadConfigData(data []byte) error {
pluginName)
}
if len(c.UnusedFields) > 0 {
return fmt.Errorf("plugin %s.%s: line %d: configuration specified the fields %q, but they weren't used",
return fmt.Errorf(
"plugin %s.%s: line %d: configuration specified the fields %q, but they were not used. "+
"This is either a typo or this config option does not exist in this version.",
name, pluginName, subTable.Line, keys(c.UnusedFields))
}
}
Expand All @@ -656,7 +666,8 @@ func (c *Config) LoadConfigData(data []byte) error {
return fmt.Errorf("unsupported config format: %s", pluginName)
}
if len(c.UnusedFields) > 0 {
msg := "plugin %s.%s: line %d: configuration specified the fields %q, but they weren't used"
msg := "plugin %s.%s: line %d: configuration specified the fields %q, but they were not used. " +
"This is either a typo or this config option does not exist in this version."
return fmt.Errorf(msg, name, pluginName, subTable.Line, keys(c.UnusedFields))
}
}
Expand Down
30 changes: 20 additions & 10 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,52 +373,62 @@ func TestConfig_FieldNotDefined(t *testing.T) {
{
name: "in input plugin without parser",
filename: "./testdata/invalid_field.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in input plugin with parser",
filename: "./testdata/invalid_field_with_parser.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in input plugin with parser func",
filename: "./testdata/invalid_field_with_parserfunc.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in parser of input plugin",
filename: "./testdata/invalid_field_in_parser_table.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in parser of input plugin with parser-func",
filename: "./testdata/invalid_field_in_parserfunc_table.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in processor plugin without parser",
filename: "./testdata/invalid_field_processor.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in processor plugin with parser",
filename: "./testdata/invalid_field_processor_with_parser.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in processor plugin with parser func",
filename: "./testdata/invalid_field_processor_with_parserfunc.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in parser of processor plugin",
filename: "./testdata/invalid_field_processor_in_parser_table.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
{
name: "in parser of processor plugin with parser-func",
filename: "./testdata/invalid_field_processor_in_parserfunc_table.toml",
expected: `line 1: configuration specified the fields ["not_a_field"], but they weren't used`,
expected: "line 1: configuration specified the fields [\"not_a_field\"], but they were not used. " +
"This is either a typo or this config option does not exist in this version.",
},
}

Expand Down
26 changes: 13 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ require (
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12
github.com/BurntSushi/toml v1.3.2
github.com/ClickHouse/clickhouse-go v1.5.4
github.com/DATA-DOG/go-sqlmock v1.5.0
github.com/DATA-DOG/go-sqlmock v1.5.2
github.com/IBM/nzgo/v12 v12.0.9-0.20231115043259-49c27f2dfe48
github.com/IBM/sarama v1.42.2
github.com/Masterminds/sprig v2.22.0+incompatible
Expand Down Expand Up @@ -95,7 +95,7 @@ require (
github.com/google/licensecheck v0.3.1
github.com/google/uuid v1.6.0
github.com/gopcua/opcua v0.5.3
github.com/gophercloud/gophercloud v1.7.0
github.com/gophercloud/gophercloud v1.9.0
github.com/gorcon/rcon v1.3.5
github.com/gorilla/mux v1.8.1
github.com/gorilla/websocket v1.5.1
Expand Down Expand Up @@ -174,7 +174,7 @@ require (
github.com/sirupsen/logrus v1.9.3
github.com/sleepinggenius2/gosmi v0.4.4
github.com/snowflakedb/gosnowflake v1.7.2
github.com/srebhan/cborquery v0.0.0-20230626165538-38be85b82316
github.com/srebhan/cborquery v1.0.1
github.com/srebhan/protobufquery v0.0.0-20230803132024-ae4c0d878e55
github.com/stretchr/testify v1.8.4
github.com/tbrandon/mbserver v0.0.0-20170611213546-993e1772cc62
Expand Down Expand Up @@ -208,17 +208,17 @@ require (
golang.org/x/text v0.14.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20211230205640-daad0b7ba671
gonum.org/v1/gonum v0.14.0
google.golang.org/api v0.162.0
google.golang.org/api v0.165.0
google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014
google.golang.org/grpc v1.61.0
google.golang.org/grpc v1.61.1
google.golang.org/protobuf v1.32.0
gopkg.in/gorethink/gorethink.v3 v3.0.5
gopkg.in/olivere/elastic.v5 v5.0.86
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.29.1
k8s.io/apimachinery v0.29.1
k8s.io/client-go v0.29.1
k8s.io/api v0.29.2
k8s.io/apimachinery v0.29.2
k8s.io/client-go v0.29.2
layeh.com/radius v0.0.0-20221205141417-e7fbddd11d68
modernc.org/sqlite v1.28.0
)
Expand All @@ -228,6 +228,7 @@ require (
github.com/apache/arrow/go/v14 v14.0.2 // indirect
github.com/distribution/reference v0.5.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fxamacker/cbor/v2 v2.6.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
Expand Down Expand Up @@ -318,7 +319,6 @@ require (
github.com/echlebek/timeproxy v1.0.0 // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect
github.com/fxamacker/cbor v1.5.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.5 // indirect
github.com/go-logr/logr v1.4.1 // indirect
Expand Down Expand Up @@ -469,10 +469,10 @@ require (
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/collector/consumer v0.84.0 // indirect
go.opentelemetry.io/collector/semconv v0.87.0 // indirect
go.opentelemetry.io/otel v1.22.0 // indirect
go.opentelemetry.io/otel/metric v1.22.0 // indirect
go.opentelemetry.io/otel v1.23.0 // indirect
go.opentelemetry.io/otel/metric v1.23.0 // indirect
go.opentelemetry.io/otel/sdk v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.22.0 // indirect
go.opentelemetry.io/otel/trace v1.23.0 // indirect
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
Expand All @@ -484,7 +484,7 @@ require (
golang.zx2c4.com/wireguard v0.0.0-20211209221555-9c9e7e272434 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240205150955-31a09d347014 // indirect
gopkg.in/fatih/pool.v2 v2.0.0 // indirect
gopkg.in/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit c24328a

Please sign in to comment.