Skip to content
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

RustEnvironmentCheck: Check for corrupted components #842

Conversation

makubacki
Copy link
Member

Description

Running rustup upgrade tends to result in components becoming
corrupted, particularly when the upgrade occurs in a VS Code prompt.

This change adds a check to RustEnvironmentCheck to detect this
condition and provide more helpful instructions. Previously, the
generic instructions were displayed which do not fix the problem.

See issue 2704 in https://github.com/rust-lang/rustup for more
details.

  • Impacts functionality?
    • Functionality - Does the change ultimately impact how firmware functions?
    • Examples: Add a new library, publish a new PPI, update an algorithm, ...
  • Impacts security?
    • Security - Does the change have a direct security impact on an application,
      flow, or firmware?
    • Examples: Crypto algorithm change, buffer overflow fix, parameter
      validation improvement, ...
  • Breaking change?
    • Breaking change - Will anyone consuming this change experience a break
      in build or boot behavior?
    • Examples: Add a new library class, move a module to a different repo, call
      a function in a new library class in a pre-existing module, ...
  • Includes tests?
    • Tests - Does the change include any explicit test code?
    • Examples: Unit tests, integration tests, robot tests, ...
  • Includes documentation?
    • Documentation - Does the change contain explicit documentation additions
      outside direct code modifications (and comments)?
    • Examples: Update readme file, add feature readme file, link to documentation
      on an a separate Web page, ...

How This Was Tested

  • Verified the message is shown when the condition is present.
  • Verified the message is not shown when the condition is not present.

Integration Instructions

N/A

@makubacki makubacki added the type:enhancement New feature or pull request label May 6, 2024
@makubacki makubacki requested review from Javagedes and apop5 May 6, 2024 18:34
@makubacki makubacki self-assigned this May 6, 2024
@github-actions github-actions bot added language:python Pull requests that update Python code impact:non-functional Does not have a functional impact labels May 6, 2024
Running `rustup upgrade` tends to result in components becoming
corrupted, particularly when the upgrade occurs in a VS Code prompt.

This change adds a check to RustEnvironmentCheck to detect this
condition and provide more helpful instructions. Previously, the
generic instructions were displayed which do not fix the problem.

See issue 2704 in https://github.com/rust-lang/rustup for more
details.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki makubacki force-pushed the add_rustenvcheck_componentcheck branch from e90ae35 to 0d17a7f Compare May 6, 2024 18:37
@codecov-commenter
Copy link

codecov-commenter commented May 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 1.22%. Comparing base (6e76157) to head (0d17a7f).

Additional details and impacted files
@@               Coverage Diff               @@
##           release/202311     #842   +/-   ##
===============================================
  Coverage            1.22%    1.22%           
===============================================
  Files                1303     1303           
  Lines              335685   335685           
  Branches             3183     3183           
===============================================
  Hits                 4118     4118           
  Misses             331491   331491           
  Partials               76       76           
Flag Coverage Δ
MdeModulePkg 0.68% <ø> (ø)
MdePkg 5.37% <ø> (ø)
NetworkPkg 0.00% <ø> (ø)
PolicyServicePkg 30.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@makubacki makubacki merged commit 8a8febc into microsoft:release/202311 May 9, 2024
38 checks passed
srilathasridharan pushed a commit to srilathasridharan/mu_basecore that referenced this pull request May 21, 2024
## Description

Running `rustup upgrade` tends to result in components becoming
corrupted, particularly when the upgrade occurs in a VS Code prompt.

This change adds a check to RustEnvironmentCheck to detect this
condition and provide more helpful instructions. Previously, the
generic instructions were displayed which do not fix the problem.

See issue 2704 in https://github.com/rust-lang/rustup for more
details.

- [ ] Impacts functionality?
- [ ] Impacts security?
- [ ] Breaking change?
- [ ] Includes tests?
- [ ] Includes documentation?

## How This Was Tested

- Verified the message is shown when the condition is present.
- Verified the message is not shown when the condition is not present.

## Integration Instructions

N/A

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact:non-functional Does not have a functional impact language:python Pull requests that update Python code type:enhancement New feature or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants