-
Notifications
You must be signed in to change notification settings - Fork 30
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
Rework System Capabilities Check (Caching, Timeout, and Conditional on Recipe) #837
Conversation
…w cache valid results, only check what is needed for the selected recipe, and add a timeout to prevent runaway commands.
ee15007
to
21125fd
Compare
bool needAwsCredentials = false, | ||
CancellationToken cancellationToken = default) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flipped these everywhere for https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1068
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #837 +/- ##
==========================================
+ Coverage 61.57% 61.85% +0.27%
==========================================
Files 278 279 +1
Lines 10801 10840 +39
Branches 1492 1496 +4
==========================================
+ Hits 6651 6705 +54
+ Misses 3612 3601 -11
+ Partials 538 534 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests that go over the non-covered areas to address the CodeCov warnings
Fixed now. For the one outstanding warning, that's where we're reporting that Docker is in "windows" mode. I added a test for this, but it returns early if not running on Windows because we assume "linux" otherwise. aws-dotnet-deploy/test/AWS.Deploy.Orchestration.UnitTests/SystemCapabilityEvaluatorTests.cs Lines 137 to 145 in 9db5758
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm good with the changes, but Codecov still shows a warning. Could you please tackle that?
Wrote a summary up in #837 (comment), essentially those lines will only ever be invoked on Windows (it's when Docker is running in Windows mode, which isn't possible on Linux/OSX), so the test that I did add returns early. I don't think it's worth mocking out the OS detection just for this coverage. Noticed another issue while doing final testing in Visual Studio, I didn't realize that |
Issue #, if available: DOTNET-7552
Description of changes: The deploy tool checks whether the user has Node.JS and Docker installed, since those are required for most deployments.
I also consolidated two different helpers for unit testing
CommandLineWrapper
into one.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.