Skip to content

fix: add more logging for task errors (#783) - #790

Merged
abhay-nutanix merged 1 commit into
release-v1.9from
issue/logging1.9
Sep 23, 2026
Merged

abhay-nutanix merged 1 commit into
release-v1.9from
issue/logging1.9

Conversation

@abhay-nutanix

Copy link
Copy Markdown
Contributor

Summary

When a Prism parent task fails, CAPX often only surfaces a generic parent-task error. This change waits for converged operations and, on failure, collects error messages from failed child subtasks so machine (and related) status includes the actionable infrastructure reason (for example DHCP pool exhaustion).

  • Enrich wait errors with failed subtask messages (list failed children; Get parent/subtasks only if that list call errors)
  • Deduplicate ErrorMessages and LegacyErrorMessage when Prism Central fills both with the same string
  • Log parent and subtask failure details for operators

@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.90756% with 37 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-v1.9@4c21b5a). Learn more about missing BASE report.

Files with missing lines Patch % Lines
controllers/task_errors.go 71.57% 16 Missing and 11 partials ⚠️
controllers/nutanixmachine_controller.go 58.33% 8 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (68.90%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@               Coverage Diff               @@
##             release-v1.9     #790   +/-   ##
===============================================
  Coverage                ?   65.76%           
===============================================
  Files                   ?       25           
  Lines                   ?     2921           
  Branches                ?        0           
===============================================
  Hits                    ?     1921           
  Misses                  ?      880           
  Partials                ?      120           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* fix: add more logging for task errors

* fix: address review comments on task error logging

* fix: unit-tests

* fix: tighten the vm creation check
@abhay-nutanix
abhay-nutanix merged commit 12b0198 into release-v1.9 Sep 23, 2026
54 of 64 checks passed
@abhay-nutanix
abhay-nutanix deleted the issue/logging1.9 branch September 23, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants