Skip to content

Commit e41d2cd

Browse files
authored
InfluxDB: remove the deprecated authToken trigger metadata (#8271)
The authToken read from trigger metadata has been rejected at parse time since v2.20 and is scheduled for code cleanup in v2.22 (#7722). Drop the field and regenerate the scalers schema. The authToken from resolvedEnv or authParams is unchanged. The unit case that expected the deprecation error is dropped; it was the last row of the table. Signed-off-by: Sai Ram <4089996+vjsairam@users.noreply.github.com> Co-authored-by: Sai Ram <4089996+vjsairam@users.noreply.github.com>
1 parent dfed3b7 commit e41d2cd

4 files changed

Lines changed: 0 additions & 15 deletions

File tree

‎pkg/scalers/influxdb_scaler.go‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type influxDBScalerV3 struct {
3131
}
3232

3333
type influxDBMetadata struct {
34-
AuthTokenOld string `keda:"name=authToken, order=triggerMetadata, optional, deprecated=The 'authToken' setting from triggerMetadata is DEPRECATED and is removed in v2.20 - Use 'authToken' from resolvedEnv or authParams instead"`
3534
AuthToken string `keda:"name=authToken, order=resolvedEnv;authParams, optional"`
3635
OrganizationName string `keda:"name=organizationName, order=triggerMetadata;resolvedEnv;authParams, optional"`
3736
Query string `keda:"name=query, order=triggerMetadata"`

‎pkg/scalers/influxdb_scaler_test.go‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ var testInfluxDBMetadata = []parseInfluxDBMetadataTestData{
6565
{map[string]string{"serverURL": "https://influxdata.com", "influxVersion": "3", "database": "test", "metricKey": "mymetric", "queryType": "FlightSQL", "metricName": "influx_metric", "organizationName": "influx_org", "query": "SELECT \"water_level\" FROM \"h2o_feet\" WHERE \"location\"='coyote_creek' ORDER BY time DESC LIMIT 1;", "thresholdValue": "10", "unsafeSsl": "false"}, false, map[string]string{"authToken": "myToken"}},
6666
// 18 influxVersion 3 with no organization
6767
{map[string]string{"serverURL": "https://influxdata.com", "influxVersion": "3", "database": "test", "metricKey": "mymetric", "queryType": "FlightSQL", "metricName": "influx_metric", "query": "SELECT \"water_level\" FROM \"h2o_feet\" WHERE \"location\"='coyote_creek' ORDER BY time DESC LIMIT 1;", "thresholdValue": "10", "unsafeSsl": "false"}, false, map[string]string{"authToken": "myToken"}},
68-
// 19 deprecated authToken in triggerMetadata errors
69-
{map[string]string{"serverURL": "https://influxdata.com", "organizationName": "influx_org", "query": "from(bucket: hello)", "thresholdValue": "10", "authToken": "myToken", "unsafeSsl": "false"}, true, map[string]string{}},
7068
}
7169

7270
func TestInfluxDBParseMetadata(t *testing.T) {

‎schema/generated/scalers-schema.json‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3499,13 +3499,6 @@
34993499
{
35003500
"type": "influxdb",
35013501
"parameters": [
3502-
{
3503-
"name": "authToken",
3504-
"type": "string",
3505-
"optional": true,
3506-
"deprecated": "The 'authToken' setting from triggerMetadata is DEPRECATED and is removed in v2.20 - Use 'authToken' from resolvedEnv or authParams instead",
3507-
"metadataVariableReadable": true
3508-
},
35093502
{
35103503
"name": "authToken",
35113504
"type": "string",

‎schema/generated/scalers-schema.yaml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,11 +2324,6 @@ scalers:
23242324
triggerAuthenticationVariableReadable: true
23252325
- type: influxdb
23262326
parameters:
2327-
- name: authToken
2328-
type: string
2329-
optional: true
2330-
deprecated: The 'authToken' setting from triggerMetadata is DEPRECATED and is removed in v2.20 - Use 'authToken' from resolvedEnv or authParams instead
2331-
metadataVariableReadable: true
23322327
- name: authToken
23332328
type: string
23342329
optional: true

0 commit comments

Comments
 (0)