graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Configuration cannot handle TimeUnit values

Open patrickmann opened this issue 1 year ago • 4 comments

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 <access_token_expiry_time_unit>. - {} 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

  • Graylog Version: 6.0.0 alpha 3

patrickmann avatar Mar 15 '24 07:03 patrickmann

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

trentgashi1 avatar Apr 18 '24 10:04 trentgashi1

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?

patrickmann avatar Apr 18 '24 19:04 patrickmann

We'll scoop this as Patrick already understands fix

tellistone avatar Apr 24 '24 09:04 tellistone

Re-open for backport to 6.0

patrickmann avatar Jun 19 '24 12:06 patrickmann

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

trentgashi1 avatar Aug 27 '24 08:08 trentgashi1

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

patrickmann avatar Aug 27 '24 09:08 patrickmann