fix(nvue-client): Don't apply an unchanged config - #5790
Conversation
This is a backport to v2.2 of dsx-ai-factory#5772, whose original text follows: Previously (dsx-ai-factory#1965, dsx-ai-factory#3047) we've tried to avoid updating the NVUE config via the API by detecting changes in the input data and skipping the apply logic when it's unchanged from the last time we updated it. However, there was still a gap in this logic since the agent process had to complete at least one NVUE config update before it would update its cache, so a newly-started agent process could still send NVUE an unchanged config, and now that we're actually polling the revision state (dsx-ai-factory#4729), that turns out to be a big problem. This branch adds additional logic to the NVUE client so that we also detect a no-change config revision by asking NVUE for its own diff between what we're planning to apply and what it's currently running. We then skip the apply operation if the diff indicates a no-op. We do still potentially abandon one NVUE revision per agent process lifetime; I haven't convinced myself it's safe to try to remove the revision since HBN's OpenAPI spec flavor has patched this endpoint out. 😕
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-09-04 03:03:38 UTC | Commit: 3b29d68 |
This is a backport to v2.2 of #5772, whose original text follows:
Previously (#1965, #3047) we've tried to avoid updating the NVUE config via the API by detecting changes in the input data and skipping the apply logic when it's unchanged from the last time we updated it. However, there was still a gap in this logic since the agent process had to complete at least one NVUE config update before it would update its cache, so a newly-started agent process could still send NVUE an unchanged config, and now that we're actually polling the revision state (#4729), that turns out to be a big problem.
This branch adds additional logic to the NVUE client so that we also detect a no-change config revision by asking NVUE for its own diff between what we're planning to apply and what it's currently running. We then skip the apply operation if the diff indicates a no-op.
We do still potentially abandon one NVUE revision per agent process lifetime; I haven't convinced myself it's safe to try to remove the revision since HBN's OpenAPI spec flavor has patched this endpoint out. 😕
Related issues
Type of Change
Breaking Changes
Testing
Additional Notes