Skip to content

agent: Avoid needlessly re-applying an unchanged NVUE configuration#1965

Open
DrewBloechl wants to merge 2 commits into
NVIDIA:mainfrom
DrewBloechl:drew/agent-avoid-nvue-noop
Open

agent: Avoid needlessly re-applying an unchanged NVUE configuration#1965
DrewBloechl wants to merge 2 commits into
NVIDIA:mainfrom
DrewBloechl:drew/agent-avoid-nvue-noop

Conversation

@DrewBloechl
Copy link
Copy Markdown
Contributor

Description

The agent's main loop is supposed to distinguish between the case where the specified network configuration is the same as it was before (in which case we can avoid needless work trying to apply it again), versus the case where the configuration is actually different. This wasn't implemented for the NVUE REST client code.

This adds a hash comparison to the NVUE REST implementation so that we don't create a bunch of churn in NVUE configuration revisions.

closes #1925

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

#1925

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

@DrewBloechl DrewBloechl requested a review from a team as a code owner May 27, 2026 21:26
&mut self,
config: &NvueConfig,
) -> Result<Option<String>, NvueClientError> {
let new_hash = config.u64_hash();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we instead lean on the ConfigVersion that we got from carbide-api for the config? i.e. if the ConfigVersion hasn't changed, don't write anything?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't currently have a way to link a given NVUE config back to the ConfigVersion it relates to, so while I'd like to do that at some point, it seems awkward under the current architecture.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I suppose we could do that further up in the logic, but this is more or less mirroring what the HBN startup-file code does.

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: dpf: dpu-agent pushes the network config to HBN frequently.

2 participants