fix: tolerate non-conforming apps when listing applications - #64
Open
mjdavidson wants to merge 1 commit into
Open
fix: tolerate non-conforming apps when listing applications#64mjdavidson wants to merge 1 commit into
mjdavidson wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A single application with a sparse
settings.signOnor afeaturesvalue outside the SDK enum made the bulk pydantic deserialization raise, breakinglist_applicationsentirely. 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 mapsinclude_non_deletedto Okta'sincludeNonDeletedquery key.\n\nTests:tests/test_list_applications.py.