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

Added retry to sonic-mgmt docker container #7997

Merged
merged 2 commits into from
Jul 20, 2021

Conversation

slutati1536
Copy link
Contributor

Signed-off-by: Sharon Lutati slutati@nvidia.com

Why I did it

the motivation for this PR is to add retry_call to several test cases in the community, for example, the following cases:

  • test_show_platform_fanstatus_mocked
  • test_show_platform_temperature_mocked

are executing a command once and comparing the output to the expected mock data,
sometimes differences between the mock and the actual are causing the tests to fail.

retry will make these tests more stable.
retry will also be more efficient than sleep which will cause the tests to run longer because sometimes it is not necessary to sleep all that time, retry will only run a function only until it passed.

How I did it

added retry to the docker file

How to verify it

I run the tests with retry on the docker after installing the retry package

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

adding retry to dockerfile so that retry module will be supported on sonic-mgmt

Signed-off-by: Sharon Lutati <slutati@nvidia.com>
@slutati1536 slutati1536 requested a review from lguohan as a code owner June 28, 2021 14:12
@liat-grozovik liat-grozovik requested review from jleveque, keboliu and yxieca and removed request for lguohan and jleveque July 2, 2021 15:38
@@ -69,6 +69,7 @@ RUN pip install cffi==1.10.0 \
tabulate \
textfsm \
virtualenv \
retry \
Copy link
Collaborator

Choose a reason for hiding this comment

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

please make the ident aligned.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please use white spaces instead of tabs. If this was the problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@keboliu @yxieca I fixed the indentation in file

@yxieca yxieca merged commit de43c6a into sonic-net:master Jul 20, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Why I did it
the motivation for this PR is to add retry_call to several test cases in the community, for example, the following cases:

test_show_platform_fanstatus_mocked
test_show_platform_temperature_mocked
are executing a command once and comparing the output to the expected mock data,
sometimes differences between the mock and the actual are causing the tests to fail.

retry will make these tests more stable.
retry will also be more efficient than sleep which will cause the tests to run longer because sometimes it is not necessary to sleep all that time, retry will only run a function only until it passed.

How I did it
added retry to the docker file

How to verify it
I run the tests with retry on the docker after installing the retry package

Signed-off-by: Sharon Lutati <slutati@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants