okta-sdk-golang icon indicating copy to clipboard operation
okta-sdk-golang copied to clipboard

Bug: Wrong type for LogEvent.DebugContext.DebugData in v4.0.0

Open FeignedHydra0 opened this issue 1 year ago • 14 comments
trafficstars

Describe the bug?

I believe the DebugContext.DebugData type should be map[string]interface{} instead map[string]map[string]interface{}, see https://github.com/okta/okta-sdk-golang/blob/v4.0.0/okta/model_log_event.go#L37 and https://github.com/okta/okta-sdk-golang/blob/v4.0.0/okta/model_log_debug_context.go#L33

As a result JSON decoding of LogeEvent fails with cannot unmarshal string into Go struct field _LogEvent.debugContext of type map[string]interface {}

What is expected to happen?

listing system logs should succeed

What is the actual behavior?

listing system logs fails

Reproduction Steps?

Use the ListLogEventsExecute API

Additional Information?

example response should contain an object like seen here https://developer.okta.com/docs/reference/api/system-log/#logevent-object-annotated-example

Golang Version

go version go1.22.1 darwin/arm64

SDK Version

v4.0.0

OS version

Darwin ******* 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

FeignedHydra0 avatar Apr 08 '24 19:04 FeignedHydra0

This is preventing us currently from migrating to v4

FeignedHydra0 avatar Apr 09 '24 18:04 FeignedHydra0

@duytiennguyen-okta this could be related to or similar to https://github.com/okta/okta-sdk-golang/issues/447

FeignedHydra0 avatar Apr 10 '24 13:04 FeignedHydra0

@FeignedHydra0 most probably

duytiennguyen-okta avatar Apr 10 '24 13:04 duytiennguyen-okta

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-718064

duytiennguyen-okta avatar Apr 10 '24 14:04 duytiennguyen-okta

@duytiennguyen-okta Do you perhaps Have a timeline I can give my management on when this fix will be ready? Just looking for visibility.

FeignedHydra0 avatar Apr 12 '24 13:04 FeignedHydra0

I am aiming to release on the week of April 22nd

duytiennguyen-okta avatar Apr 12 '24 14:04 duytiennguyen-okta

This issue has been marked stale because there has been no activity within the last 14 days. To keep this issue active, remove the stale label.

github-actions[bot] avatar Apr 27 '24 01:04 github-actions[bot]

Not stale

erezrokah avatar Apr 27 '24 06:04 erezrokah

@duytiennguyen-okta just wanted to see if we can get a quick update on this one? I need to just provide on to Our leadership, on when we can migrate to v4?

FeignedHydra0 avatar Apr 29 '24 16:04 FeignedHydra0

Hi @FeignedHydra0 I'm not an maintainer so nothing much I can do. We're using a fork of this repo with the fix from https://github.com/okta/okta-sdk-golang/pull/448 until this thing is sorted for all types

erezrokah avatar Apr 29 '24 16:04 erezrokah

I will try to provide a release next week

duytiennguyen-okta avatar Apr 30 '24 14:04 duytiennguyen-okta

I mean if you want to migrate, you can do it piece by piece and not the whole thing. You can import both v2 and v4 in the same go.mod file

duytiennguyen-okta avatar Apr 30 '24 14:04 duytiennguyen-okta

We have v2 currently. But we can't migrate to v4 since this is what we are using currently.

FeignedHydra0 avatar Apr 30 '24 18:04 FeignedHydra0

Hi @duytiennguyen-okta it can be quite hard using both since it's hard to identify which v4 APIs have the wrong type and thus will break during runtime

erezrokah avatar Apr 30 '24 20:04 erezrokah

@duytiennguyen-okta any update on this? We cannot move forward with our migration since the one that we need to use is broken. When is the target date for v2 to go away?

FeignedHydra0 avatar May 13 '24 14:05 FeignedHydra0

I will release this week

duytiennguyen-okta avatar May 14 '24 21:05 duytiennguyen-okta

Hi @duytiennguyen-okta thanks for the fix, I can see both issues were closed but a new released was not tagged. When is that expected to happen?

erezrokah avatar May 17 '24 09:05 erezrokah

@erezrokah It is release in v4.1.0

duytiennguyen-okta avatar May 22 '24 20:05 duytiennguyen-okta