This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 195
Require explicit call to async Expand::machine_id()
#1468
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tokio runtimes, modified test accordingly
ranweiler
changed the title
Update machine_id function to be async. Call this function in Expand constructors in tasks.
Require explicit call to async Nov 19, 2021
Expand::machine_id()
ranweiler
reviewed
Nov 19, 2021
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.
Looking good! Added a few documentation suggestions.
Also, two remaining questions:
- Are there uses of
Expand
elsewhere that also need to be updated, such as in theonefuzz
library crate? - Have we manually tested this with a job that tries to expand
{machine_id}
?
Add comment to indicate proper use of machine_id function Co-authored-by: Joe Ranweiler <joe@lemma.co>
Add comment to indicate proper use of machine_id function Co-authored-by: Joe Ranweiler <joe@lemma.co>
bmc-msft
reviewed
Nov 19, 2021
chkeita
approved these changes
Nov 24, 2021
ghost
locked as resolved and limited conversation to collaborators
Jan 2, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
This PR address an issue with a panic occurring due to nested Tokio runtimes when expanding
{machine_id}
to machine identifier. This issue is documented in #1351. The fix was to update theExpand
API by modifying the functionmachine_id
that got and set the machine identifier by making it async so that it would not need to use another Tokio runtime. Now this function runs at the timeExpand
is constructed rather than at the time of expanding the particular{machine_id}
value when expanding each value intarget_options
.PR Checklist
Info on Pull Request
Modified
machine_id
function, called this function at appropriate constructions ofExpand
. Closes #1351Validation Steps Performed
Modified
test_expand_machine_id
to be async to properly test that modified function expands{machine_id}
without panic.