-
Notifications
You must be signed in to change notification settings - Fork 159
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
feat(BA-468): Add timeout conf for image push #3412
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add timeout configuration for Docker image push |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -815,11 +815,15 @@ async def push_image( | |
log.info("rpc::push_image(c:{})", image_ref.canonical) | ||
bgtask_mgr = self.agent.background_task_manager | ||
|
||
image_push_timeout = cast( | ||
Optional[float], self.local_config["agent"]["api"]["push-timeout"] | ||
) | ||
Comment on lines
+818
to
+820
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is type casting necessary? Can’t we set the timeout value stored in local_config as Optional[float]? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the value is stored as Optional[float]. I used |
||
|
||
async def _push_image(reporter: ProgressReporter) -> None: | ||
await self.agent.push_image( | ||
image_ref, | ||
registry_conf, | ||
timeout=None, | ||
timeout=image_push_timeout, | ||
) | ||
|
||
task_id = await bgtask_mgr.start(_push_image) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn’t seem right to have the push-timeout value under the api section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, since the existing pull-timeout is also in the same location, it seems like this will require a follow-up task to reorganize the config structure.