Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.31k stars 1.05k forks source link

Configuration cannot handle TimeUnit values #18645

Closed patrickmann closed 1 week ago

patrickmann commented 5 months ago

Configuration does not support type TimeUnit. Code should not be trying to add a TimeUnit value to a configuration.

Expected Behavior

There should not be an error message when creating SalesforceDriver.

Current Behavior

SalesforceDriver attempts to add this TimeUnit value to the configuration: request.accessTokenExpiryTimeUnit()

https://github.com/Graylog2/graylog-plugin-enterprise/blob/0d609902b67f922f6ca21e4ed40fba10737a9254/enterprise/src/main/java/org/graylog/enterprise/integrations/salesforce/api/SalesforceDriver.java#L75

This results in the following error log:

2024-03-11 12:15:31,671 ERROR [Configuration] - Cannot handle type [java.util.concurrent.TimeUnit] of plugin configuration key . - {} 2024-03-11 12:15:31,689 INFO [SalesforceDriver] - New Salesforce input created. id [65eef5e39d03297db469ab02] request [SalesforceCreateInputRequest{clientId=, clientSecret=, instanceName=haufe--fcs, name=hg-salesforce, throttlingAllowed=false, pollingInterval=60, pollingTimeUnit=MINUTES, logTypes=[REST_API_EVENT_TYPE, LOGIN_EVENT_TYPE, REPORT_EXPORT_EVENT_TYPE], accessTokenExpiresIn=24, accessTokenExpiryTimeUnit=HOURS}] - {}

Possible Solution

Looks like this should have been request.accessTokenExpiryTimeUnit().name()

Your Environment

trentgashi1 commented 4 months ago

Hi, is there any update on this case? it's been a while since it was assigned but no progress has been made since. Customer is chasing for an update and progress. Thanks

patrickmann commented 4 months ago

The issue is understood. Somebody needs to make the 1 line fix and ship it in a Bugfix .

@sethgraylog can you raise priority on this?

tellistone commented 4 months ago

We'll scoop this as Patrick already understands fix

patrickmann commented 2 months ago

Re-open for backport to 6.0

trentgashi1 commented 1 week ago

@patrickmann when will this be available to the customer? will it be as part of 6.1?

patrickmann commented 1 week ago

It is in 6.1. It was also merged back to 6.0 on June 19. So it was included in 6.0.4