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

Remove information about the environment from exception when reverting VM snapshot #9944

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucas-a-martins
Copy link
Contributor

Description

When attempting to revert a VM to a VM snapshot, the exception displayed to users can expose some information about the environment.

This PR addresses this issue by keeping the current message to be sent to the logs and adding a new one for the exception shown to users.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Screenshots (if appropriate):

Screenshot from 2024-11-13 15-13-59

How Has This Been Tested?

I forced a CloudRuntimeException when reverting a VM to a VM snapshot and the new exception was thrown as expected. Then I checked that the current message was still being added.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@DaanHoogland
Copy link
Contributor

I am not sure if and how many testing we would need for this, only the textual contents of an exception message has changed and that contents is still available in the log.

Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.80%. Comparing base (b38ee63) to head (10a87b7).
Report is 8 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9944      +/-   ##
============================================
- Coverage     15.80%   15.80%   -0.01%     
  Complexity    12586    12586              
============================================
  Files          5627     5627              
  Lines        492328   492341      +13     
  Branches      59692    59693       +1     
============================================
  Hits          77828    77828              
- Misses       405977   405990      +13     
  Partials       8523     8523              
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests 16.63% <100.00%> (-0.01%) ⬇️

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.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants