Skip to content

Add 'break' at RedifshClient request re-try loop#4846

Merged
yadvr merged 3 commits into
apache:4.15from
CLDIN:redifsh-retry-break
Mar 24, 2021
Merged

Add 'break' at RedifshClient request re-try loop#4846
yadvr merged 3 commits into
apache:4.15from
CLDIN:redifsh-retry-break

Conversation

@GabrielBrascher

Copy link
Copy Markdown
Member

Description

This PR adds a missing break at the HTTP request re-try loop.

It is a minor bug, but it can result in double re-try requests where one should be enough. Also, talking about corner cases, there is a small possibility of the first re-try request be successful, and the second fails, which could result in false error.

This PR added the break and also Test cases that cover such scenarios to ensure that now we have it all covered.

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)

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

@GabrielBrascher GabrielBrascher added this to the 4.15.1.0 milestone Mar 19, 2021
@GabrielBrascher GabrielBrascher self-assigned this Mar 19, 2021
@GabrielBrascher

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@GabrielBrascher a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S]

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 192

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - no way to verify the changes; smoketests won't cover changes in the plugin.

@yadvr

yadvr commented Mar 22, 2021

Copy link
Copy Markdown
Member

@GabrielBrascher have you performed any integration tests (manual/automated)?

@GabrielBrascher

Copy link
Copy Markdown
Member Author

Thanks for the review @rhtyd! I have tested it, and it looks good.

Here follows details of the test process comparing 4.15.0.0 with this implementation (4.15.1.0-SNAPSHOT based on this branch).

A - Test steps with 4.15.0.0:

  1. connect at the JVM via remote debug
  2. place breakpoints and tail logs
  3. verify that it keeps attempting new HTTP requests even with the previous not failing until it reaches 3 attempts

B - Test this implementation (4.15.1.0-SNAPSHOT):

  1. build packages
  2. update mgmt server
  3. connect on JVM to remote debug
  4. place breakpoints and tail logs
  5. verify that the break indeed works if the HTTP request has not failed

@Pearl1594 Pearl1594 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

code LGTM

@yadvr yadvr merged commit 96dd728 into apache:4.15 Mar 24, 2021
yadvr added a commit that referenced this pull request Mar 24, 2021
yadvr added a commit that referenced this pull request Mar 24, 2021
@yadvr

yadvr commented Mar 24, 2021

Copy link
Copy Markdown
Member

@GabrielBrascher unfortunately I didn't check Travis and based on your confirmation/testing merged the PR only to find that unit tests were failing. I've reverted the PR #4861
Please raise a new one with the unit tests issues fixed.

@GabrielBrascher

Copy link
Copy Markdown
Member Author

Sorry, @rhtyd my bad; the string.format parameters order changed at the last commit has not been updated correctly.
I will soon raise another PR.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants