Skip to content

fix: tolerate non-conforming apps when listing applications - #64

Open
mjdavidson wants to merge 1 commit into
okta:mainfrom
mjdavidson:fix/list-applications-resilient-parsing
Open

fix: tolerate non-conforming apps when listing applications#64
mjdavidson wants to merge 1 commit into
okta:mainfrom
mjdavidson:fix/list-applications-resilient-parsing

Conversation

@mjdavidson

Copy link
Copy Markdown

A single application with a sparse settings.signOn or a features value outside the SDK enum made the bulk pydantic deserialization raise, breaking list_applications entirely. This fetches the page through the request executor and parses each record individually, falling back to the raw dict (with a warning marker) when strict parsing fails. Also maps include_non_deleted to Okta's includeNonDeleted query key.\n\nTests: tests/test_list_applications.py.

list_applications deserialized the whole page into strict SDK models in a
single pass, so one record the models reject — a SAML app with a partial
settings.signOn, or a provisioning features value outside the SDK enum —
raised a validation error that aborted the entire response. A single
non-conforming app made the tool unusable on real orgs.

Fetch the apps page through the SDK request executor and parse each record
individually, falling back to the raw dict (tagged with a warning) when strict
deserialization fails. Conforming apps are still returned as typed models, and
pagination is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant