Skip to content

fix: handle list API responses for controller 26.7+ compatibility (v1.8.2) - #197

Merged
alexafshar merged 1 commit into
Appdynamics:masterfrom
alexafshar:fix/1.8.2-default-thresholds-version
Aug 18, 2026
Merged

alexafshar merged 1 commit into
Appdynamics:masterfrom
alexafshar:fix/1.8.2-default-thresholds-version

Conversation

@alexafshar

Copy link
Copy Markdown
Collaborator

Summary

Fixes #193 and adds compatibility for controller 26.7+.

This PR incorporates two fixes for AppDynamics controller API response format changes where endpoints now return a plain list instead of the expected {"data": [...]} dict, causing a fatal TypeError that aborted the entire job.

Changes

From #194 (fix #193):

  • AppDService.getServers — guard serverAvailabilityResult.data with isinstance(dict) check; default availability to None with a warning log
  • HealthRulesAndAlertingAPM/BRUM/MRUM — guard eventCounts[idx].data with error/type check; default to zero violations so analyze() proceeds

New (controller 26.7+):

  • AppDService.getAppServerAgentsIdsPOST /controller/restui/agents/list/appserver/ids now returns a plain list on 26.7+; guard with isinstance check to support both old and new formats

  • DefaultThresholds.json — version bumped to 1.8.2 to match tool version

Compatibility

  • Fully backward compatible with all controller versions prior to 26.7
  • Required for controllers upgraded to 26.7+

Aligns thresholds file version with tool version so users running
pre-built executables or source from the 1.8.2 release do not hit
a version mismatch error on startup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@alexafshar
alexafshar merged commit 87105db into Appdynamics:master Aug 18, 2026
1 check passed
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.

bug: TypeError crash when API returns a list instead of dict for eventCounts / serverAvailability

1 participant