Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jan 22, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

doomedraven and others added 3 commits January 22, 2026 10:12
Updated label text and enhanced options help section with detailed descriptions of available options.
* Improve Azure VMSS error handling and logging

Adds handling for ResourceNotFoundError when listing VMSS VMs and NICs, preventing exceptions when VMSS capacity is zero. Improves logging for VMSS deletion conditions and corrects log formatting in reimage and delete threads. Also wraps VMSS creation logic in a broader exception handler for robustness.

✦ Here is the summary of changes specifically for the Azure machinery module (`modules/machinery/az.py`):

  Azure Machinery (`az.py`) Enhancements

   * Zero-Scale Compatibility:
       * Added handling for ResourceNotFoundError in _add_machines_to_db and _delete_machines_from_db_if_missing. This prevents the module from crashing when a Virtual Machine Scale Set (VMSS) has a capacity of 0,
         enabling the "scale from zero" cost-saving feature.
   * External Management Support:
       * Updated _process_pre_existing_vmsss to honor the just_start parameter. This prevents CAPE from automatically deleting VMSSs that don't match its internal tags/names if they are managed by external tools
         like Terraform or Ansible.
   * Robust Connection Logic:
       * Refactored _thr_wait_for_ready_machine to use an explicit socket creation and getaddrinfo iteration loop. This fixes potential thread hangs, improves reliability on busy systems, and adds full support for
         DNS hostnames and IPv6 addresses.
   * Thread Stability & Error Handling:
       * Wrapped the _thr_create_vmss background thread in a top-level exception handler to ensure that failures during VMSS creation (e.g., subnet issues or API errors) are logged instead of failing silently.
   * Bug Fixes & Logging:
       * Fixed malformed logging strings in the batch reimage and delete list readers (previously using incorrect set literal syntax and missing format arguments).
       * Added detailed debug logging for VMSS deletion and zero-capacity scenarios to improve troubleshooting.
       * Ensured proper import of ResourceNotFoundError from azure.core.exceptions.

* Update modules/machinery/az.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Update modules/machinery/az.py

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@pull pull bot locked and limited conversation to collaborators Jan 22, 2026
@pull pull bot added the ⤵️ pull label Jan 22, 2026
@pull pull bot merged commit bf7afa3 into threatcode:master Jan 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant