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

Add try/catch when reading upgrade codes #3637

Merged
merged 1 commit into from Sep 19, 2023

Conversation

JohnMcPMS
Copy link
Member

@JohnMcPMS JohnMcPMS commented Sep 18, 2023

Change

Despite the look of the diff on github, this change only adds two try/catch blocks to the upgrade code parsing code to prevent failures from propagating out. The upgrade codes are just additional data to help with correlations and should not cause additional user impact beyond not being present.

The outer block protects against the primary key throwing, as well as the subkey enumeration.

The inner block protects against a single upgrade code key throwing, while allowing the loop to potentially continue.

Validation

Code inspection only.

Microsoft Reviewers: Open in CodeFlow

@JohnMcPMS JohnMcPMS requested a review from a team as a code owner September 18, 2023 17:36
@JohnMcPMS JohnMcPMS linked an issue Sep 18, 2023 that may be closed by this pull request
@JohnMcPMS
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@yao-msft yao-msft left a comment

Choose a reason for hiding this comment

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

:shipit:

@JohnMcPMS JohnMcPMS merged commit 06cb489 into microsoft:master Sep 19, 2023
8 checks passed
@JohnMcPMS JohnMcPMS deleted the opt-upgrades branch September 19, 2023 17:25
@microsoft-github-policy-service microsoft-github-policy-service bot added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Sep 19, 2023
JohnMcPMS added a commit that referenced this pull request Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to open the predefined source;
3 participants