New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimize source diffs between MSBuild Copy.cs and CoW Copy.cs #496
Conversation
…date warning and error logging to send MSBxxxx code to allow configured suppression or level changes.
FYI, I'm finally fixing the tests: #497 |
@jeffkl Thanks for fixing tests - I have a draft that I've been stuck on for the same reason |
Looks good from a cursory glance. Have you tested that the various scenarios are identical between standard Copy and this? Primarily I can think of:
In general, the more we test now, the less painful our debugging in the future ;) |
Overall, this regressed the fix in #454, causing us to once again error if any drive is unavailable (in my case: bitlocker locked). Can we please restore this error handling? Building on the latest release:
It's the same error/issue, just a new path to it. IMO, this overall scenario needs to be handle more gracefully upstream. |
@erikmav ^ |
FVE_E_LOCKED_VOLUME is handled in the CoW code: https://github.com/microsoft/CopyOnWrite/blob/001ad162f22289228d37b163aaad8d3c112bafc9/lib/Windows/VolumeInfoCache.cs#L135 added in I've been mulling inverting the logic in that cache to just return null on error, but then there's no information channel to tell the user that a volume was ignored. Hence once of the sources of new errors in the underlying logic is adding to that list of error codes. |
I tried this with every SDK version in the last 6 months (hoping to unblock with a release when the fix was active, but no joy). Checked the version and indeed it's at 0.3.7 (and reflected code shows handled), and the error message pathing purports to be the latest SDK...but I think we can disregard my report here. Looks like I was bitten again by "long-running MSBuild had (an old copy of) the types loaded", so despite me upgrading and trying various SDKs, I really wasn't using an updated CopyOnWrite.dll at any point during this. @erikmav @jeffkl I apologize for the noise, and thanks for the quick follow-up! I totally agree this has ultimately been fixed - I was just not actually testing latest :( Clearing everything out and trying 1.0.282 SDK is all good even with a locked drive. For anyone else finding this: be sure to kill all MSBuild processes between SDK upgrades - since it's a dependency DLL the error messages and paths can not be what's actually in play. |
@NickCraver no problem, been bitten there myself. I'll still take a look at making this code path less prone to throw on something unexpected. |
And update warning and error logging to send MSBxxxx code to allow configured suppression or level changes.
Fixes #493, #494 as well as microsoft/CopyOnWrite#32