Skip to content

fix: address review feedback on config-manager symlink handling - #1995

Merged
abrarshivani merged 1 commit into
NVIDIA:mainfrom
abrarshivani:fix/config-manager-symlink-review-feedback
Sep 1, 2026
Merged

fix: address review feedback on config-manager symlink handling#1995
abrarshivani merged 1 commit into
NVIDIA:mainfrom
abrarshivani:fix/config-manager-symlink-review-feedback

Conversation

@abrarshivani

Copy link
Copy Markdown
Contributor

Follow-up to #1982, addressing review feedback from @tariq1890 that came in after the PR had already merged.

  • Wrap errors with %w instead of %v, and drop the redundant quoting around the destination path since these logs are already emitted in JSON.
  • Split TestUpdateSymlinkDanglingDestination into two independent subtests. Previously the second subtest relied on state left behind by the first, so it failed when run in isolation (e.g. via -run).

I left the !os.IsNotExist(err) check on the os.Remove call as is: it guards a different error value from a different syscall than the earlier os.Readlink check, so it isn't actually redundant, it's the standard idiom for tolerating a concurrent removal between the two calls.

@abrarshivani abrarshivani self-assigned this Sep 1, 2026

@tariq1890 tariq1890 left a comment

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.

Thanks @abrarshivani !

@tariq1890

Copy link
Copy Markdown
Contributor

Please squash the commit history as well

Wrap errors with %w instead of %v/%s so callers can unwrap them, and
drop the redundant quoting since logs are already emitted in JSON.

Split TestUpdateSymlinkDanglingDestination into independent subtests
that each set up their own state via a shared fixture helper, so
either case passes when run in isolation rather than depending on
execution order.

Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
@abrarshivani
abrarshivani force-pushed the fix/config-manager-symlink-review-feedback branch from 7a4c210 to 4855607 Compare September 1, 2026 21:29
@abrarshivani
abrarshivani merged commit 325c1b2 into NVIDIA:main Sep 1, 2026
12 checks passed
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.

2 participants