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

Progress report for pulling images and session creation #227

Open
6 tasks
achimnol opened this issue Oct 13, 2020 · 2 comments · May be fixed by #1954
Open
6 tasks

Progress report for pulling images and session creation #227

achimnol opened this issue Oct 13, 2020 · 2 comments · May be fixed by #1954
Assignees
Labels
comp:agent Related to Agent component comp:client Related to Client component comp:manager Related to Manager component comp:webui Related to WebUI component type:feature Add new features
Milestone

Comments

@achimnol
Copy link
Member

achimnol commented Oct 13, 2020

Let's add explicit progress reports when creating a new session.

For cluster sessions, multiple agents may try to pull the image at the same time,
so the pull progress should include both per-agent progress and total progress.

  • Manager
    • Spawn a background task when creating a new session, returning the task ID to the client after max_wait seconds.
    • Let the background task relay the kernel_pull_progress events.
  • Agent
    • Add a progress reporter argument to AbstractAgent.pull_image() and let the concrete implementations report the progress from the underlying backend (e.g., the docker API).
    • Implement the progress report to produce kernel_pull_progress events.
  • Client (Python & Javascript)
    • Check the existence of the task ID in the create-kernel API response.
    • If it exists, show a progress bar reflecting its progress stream.

FYI:
Using the following code snippet, we can keep track of the overall progress in percent:
https://gist.github.com/achimnol/11fd2b379ad186cf624307b2c7e0953f

@youngjun0627
Copy link
Contributor

youngjun0627 commented Sep 1, 2021

@achimnol I implement kernel-pull-progress. please review my code.

result images:

image
image

@fregataa
Copy link
Member

Suggenstion.
How about creating association_agents_images table and let it determine Image.is_installed, which has been saved in Redis?
Plus, saving bgtask_id in the association_agents_images would be good to track the long-term pulling for each agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:agent Related to Agent component comp:client Related to Client component comp:manager Related to Manager component comp:webui Related to WebUI component type:feature Add new features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants