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

Add retry for pulling images in the podman plugin #2439

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

bajertom
Copy link
Collaborator

@bajertom bajertom commented Oct 29, 2023

Not really sure about the type annotations in pull_image method in GuestContainer class.
I had to skip mypy hook to be able to commit, because I was getting this error:

error: Argument 3 to "Command" has incompatible type "Optional[str]"; expected "Union[str, Path]" [arg-type]

but all I did was move the code out of start method without modifying it.

Fixes #2385

Pull Request Checklist

  • implement the feature

tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
@bajertom bajertom force-pushed the tbajer-retry-functionality-podman branch from 1a3f4be to ca57aac Compare October 30, 2023 20:57
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
@psss psss added this to the 1.29 milestone Oct 31, 2023
@bajertom bajertom force-pushed the tbajer-retry-functionality-podman branch 2 times, most recently from 971ca1e to 8acd645 Compare October 31, 2023 20:47
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

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

Thanks for implementing this. Looks nice! Added just a few naming suggestions.

tmt/steps/provision/podman.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
tmt/utils.py Outdated Show resolved Hide resolved
@psss psss changed the title tbajer-retry-functionality-for-podman Add retry for pulling images in the podman plugin Nov 1, 2023
@psss psss added the step | provision Stuff related to the provision step label Nov 1, 2023
@psss
Copy link
Collaborator

psss commented Nov 1, 2023

Please, update also the commit message according to recommendations. Thanks.

@bajertom bajertom force-pushed the tbajer-retry-functionality-podman branch 2 times, most recently from 3707a13 to 0b2688b Compare November 1, 2023 10:53
@bajertom
Copy link
Collaborator Author

bajertom commented Nov 1, 2023

Adjusted commit message to align with recommendations.

@psss psss self-assigned this Nov 1, 2023
Copy link
Collaborator

@psss psss left a comment

Choose a reason for hiding this comment

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

Thanks for addressing all comments!

In case of failure to fetch podman images due to temporary network issues,
retry function tries to overcome this by waiting a few seconds and trying again.

Not limited to podman only, can be used anywhere.
@psss psss force-pushed the tbajer-retry-functionality-podman branch from 0b2688b to 6eba4f5 Compare November 1, 2023 13:07
@psss psss merged commit 6eba4f5 into main Nov 1, 2023
15 checks passed
@psss psss deleted the tbajer-retry-functionality-podman branch November 1, 2023 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
step | provision Stuff related to the provision step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement retry functionality for the podman plugin
3 participants