okta / okta-sdk-golang

A Golang SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
https://github.com/okta/okta-sdk-golang
Other
171 stars 142 forks source link

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

Closed FeignedHydra0 closed 2 months ago

FeignedHydra0 commented 3 months ago

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 commented 3 months ago

This is preventing us currently from migrating to v4

FeignedHydra0 commented 3 months ago

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

duytiennguyen-okta commented 3 months ago

@FeignedHydra0 most probably

duytiennguyen-okta commented 3 months ago

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

FeignedHydra0 commented 3 months ago

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

duytiennguyen-okta commented 3 months ago

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

github-actions[bot] commented 2 months ago

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.

erezrokah commented 2 months ago

Not stale

FeignedHydra0 commented 2 months ago

@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?

erezrokah commented 2 months ago

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

duytiennguyen-okta commented 2 months ago

I will try to provide a release next week

duytiennguyen-okta commented 2 months ago

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

FeignedHydra0 commented 2 months ago

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

erezrokah commented 2 months ago

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

FeignedHydra0 commented 2 months ago

@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?

duytiennguyen-okta commented 2 months ago

I will release this week

erezrokah commented 2 months ago

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?

duytiennguyen-okta commented 1 month ago

@erezrokah It is release in v4.1.0