Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(agent/agentcontainers): update containers periodically#17972

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mafredri merged 11 commits intomainfrommafredri/wip
May 22, 2025

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedMay 21, 2025
edited
Loading

This change introduces a significant refactor to the agentcontainers API
and enables periodic updates of Docker containers rather than on-demand.
Consequently this change also allows us to move away from using a
locking channel and replace it with a mutex, which simplifies usage.

Additionally a previous oversight was fixed, and testing added, to clear
devcontainer running/dirty status when the container has been removed.

Updates#16424
Updatescoder/internal#621

@mafredrimafredriforce-pushed themafredri/wip branch 4 times, most recently from84e7fb1 to25ead7bCompareMay 21, 2025 15:51
@mafredrimafredri requested a review fromCopilotMay 21, 2025 15:52
Copilot

This comment was marked as resolved.

This change introduces a significant refactor to the agentcontainers APIand enabled periodic updates of Docker containers rather than on-demand.Consequently this change also allows us to move away from using alocking channel and replace it with a mutex, which simplifies usage.Additionally a previous oversight was fixed, and testing added, to cleardevcontainer running/dirty status when the container has been removed.Updates#16424Updatescoder/internal#621
@mafredrimafredri marked this pull request as ready for reviewMay 21, 2025 16:02
Comment on lines 264 to 266
defer func() { sema <- struct{}{} }()

return api.updateContainers(api.ctx)
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense instead to just return early fromdoUpdate() if we're not able to read fromsema? Queueing multiple updates seems like it could cause increased memory usage over time, and I'm not sure what value we get from running it right again after one instance has just completed.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

If we did that, we can't wait for it to complete in therefreshContainers function. I'll see if there's any point in keeping a refresh method around after I refactor the recreate endpoint.

@mafredrimafredri requested a review fromjohnstcnMay 22, 2025 10:07
Copy link
Contributor

@DanielleMaywoodDanielleMaywood left a comment

Choose a reason for hiding this comment

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

looks good to me 😄

@mafredrimafredri merged commitd6c14f3 intomainMay 22, 2025
34 checks passed
@mafredrimafredri deleted the mafredri/wip branchMay 22, 2025 16:44
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 22, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

Copilot code reviewCopilotCopilot left review comments

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

@johnstcnjohnstcnAwaiting requested review from johnstcn

Assignees

@mafredrimafredri

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mafredri@johnstcn@DanielleMaywood

[8]ページ先頭

©2009-2025 Movatter.jp