Skip to content

Conversation

@paulgmiller
Copy link
Member

Reason for Change:

Issue Fixed:

Requirements:

Notes:

@paulgmiller paulgmiller requested a review from a team as a code owner November 25, 2025 00:29
Copilot finished reviewing on behalf of paulgmiller November 25, 2025 00:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves error messaging when Network Containers (NCs) aren't programmed on a host by providing clearer diagnostic information to help troubleshoot issues. The changes add informational logging and enhance error messages with more specific details about which NCs are outdated and which have been successfully programmed.

Key Changes

  • Added informational log message when no NCs have been programmed yet, indicating CNI conflist generation is skipped
  • Enhanced error message to show both outdated NCs and currently programmed NICs from NMA/IMDS for better debugging

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

// need to return an error indicating that
if len(outdatedNCs) > 0 {
return len(programmedNCs), errors.Errorf("unable to update some NCs: %v, missing or bad response from NMA or IMDS", outdatedNCs)
return len(programmedNCs), errors.Errorf("Have outdated NCs: %v, Current Programmed nics from NMA/IMDS %v", outdatedNCs, programmedNCs)
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message has grammar and capitalization issues:

  1. "Have" should be lowercase "have" (error messages typically start with lowercase)
  2. "nics" should be "NICs" (consistent with "NCs" used elsewhere)
  3. "Current Programmed" should be "currently programmed" (grammatically correct)
  4. Missing colon before the second %v placeholder

Suggested fix:

return len(programmedNCs), errors.Errorf("have outdated NCs: %v, currently programmed NICs from NMA/IMDS: %v", outdatedNCs, programmedNCs)
Suggested change
return len(programmedNCs), errors.Errorf("Have outdated NCs: %v, Current Programmed nics from NMA/IMDS %v", outdatedNCs, programmedNCs)
return len(programmedNCs), errors.Errorf("have outdated NCs: %v, currently programmed NICs from NMA/IMDS: %v", outdatedNCs, programmedNCs)

Copilot uses AI. Check for mistakes.
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.

1 participant