Temp fix for no match for request bug. Fixes #9591#9593
Closed
Temp fix for no match for request bug. Fixes #9591#9593
Conversation
added 2 commits
June 6, 2019 23:42
…ire re-recording all tests in the cli.
tjprescott
reviewed
Jun 7, 2019
| def random_name(self): | ||
| # override random_name so that in play-back mode the name is deterministic. | ||
| # non-deterministic preparers have no recording of requests involved in creating the resource | ||
| return self.moniker |
Member
There was a problem hiding this comment.
If this is only supposed to apply to playback mode, then should it not be something like:
if self.is_live:
return random_thing
else:
return self.moniker
?
tjprescott
suggested changes
Jun 7, 2019
Member
tjprescott
left a comment
There was a problem hiding this comment.
Because NoRecordingPreparers don't record requests during resource creation, during playback they are not aware of the random name used during recording.
The fix is to use a deterministic moniker during recording and playback. This means to get the effect of randomness a user might have to manually change the resource preparer's prefix and / or name length.
No. This is a regression. It would be better to completely back out the original PR than implement this.
Contributor
Author
|
I will close this given the comments and #9602 fixes this issue |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Temp fix for #9591.
Because NoRecordingPreparers don't record requests during resource creation, during playback they are not aware of the random name used during recording.
The fix is to use a deterministic moniker during recording and playback. This means to get the effect of randomness a user might have to manually change the resource preparer's prefix and / or name length.
Some solutions to keep resource names random during live runs:
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.