fix: allow optional fields on AdapterInfo for inactive adapter payloads#337
Merged
privateip merged 1 commit intoitential:develfrom Mar 18, 2026
Conversation
…ds (itential#329) The IAP platform returns a sparse payload for DEAD adapters — many fields are absent or null. AdapterInfo, MemoryUsage, and LoggerConfig declared these as required, causing get_health to fail with 13 ValidationErrors whenever any adapter is inactive. - MemoryUsage: mark heapTotal, heapUsed, external, arrayBuffers as Optional - LoggerConfig: mark console, file, syslog as Optional - AdapterInfo: mark package_id, description, route_prefix, connection, pid, memory_usage, cpu_usage, logger, timestamp, prev_uptime as Optional - AdapterInfo.pid: broaden to int | str | None (platform sends empty string) Closes itential#329
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.
Summary
nullfor several fields onAdapterInfoobjects when an adapter is inactive or not fully registered (e.g.,package,version,description,log_level,log_file,log_max_file_size,log_max_files,pid)str/intfield declarations caused a PydanticValidationErroron anyget_health()call when such adapters exist in the platform responsefield_name: type | None = Noneand added 12 regression testsTest plan
make cipasses on the branchtests/test_models_health.pycover all null-field scenariosget_healthtool returns successfully on an IAP instance with inactive adaptersFixes #329
🤖 Generated with Claude Code