Fix max attempts message #24
Merged
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.
This fixes OC-667 (upstream bug is a comment in SOL-423): The "Message (max # attempts)" component was not working.
Explanation:
get_message()was called beforenum_attemptswas incremented, so themax_attempts_reachedmessage would never be used, sincenum_attemptswas always less thanmax_attemptsat that point.Notes:
I wanted to just do a simple fix, which involves moving the
get_message()method to after wherenum_attemptsis updated, but the implications of that move were not at all clear due to the complexity of the "submit" handler, and uncertainty about when the various messages are even supposed to be display. So I added a bunch of new tests and documentation to clarify the expected behavior of each type of message (I hope I got it right), and I also simplified the "submit" handler (in Python at least) while I was at it, in order to make the code easier to understand.Details:
get_message()submit()handler somewhatattemptedwhich was not usedConfusion: