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): refactor Lister to ContainerCLI and implement new methods#18243

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

Conversation

mafredri
Copy link
Member

@mafredrimafredri commentedJun 5, 2025
edited
Loading

@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch 2 times, most recently from2984d4e toae52380CompareJune 5, 2025 12:56
Base automatically changed frommafredri/feat-agent-devcontainer-injection-1 tomainJune 5, 2025 13:58
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch 2 times, most recently from5cf4ae7 to2dc395dCompareJune 6, 2025 08:44
…ement new methodsThis change redefines the Lister interface and implements new methodsneeded for sub agent injection.Updatescoder/internal#621
@mafredrimafredriforce-pushed themafredri/feat-agent-devcontainer-injection-2 branch from2dc395d toea0125dCompareJune 6, 2025 09:25
@mafredrimafredri marked this pull request as ready for reviewJune 6, 2025 09:30
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 although have left a comment about theExecAs tests

Comment on lines +560 to +562
// UID 0 is more portable than the name root, so we use that
// because some containers may not have a user named "root".
altUID = "0"
Copy link
Member

Choose a reason for hiding this comment

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

👀 this is wild, do you have an example?

Copy link
MemberAuthor

@mafredrimafredriJun 6, 2025
edited
Loading

Choose a reason for hiding this comment

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

The username is passwd dependent, so there are various ways this could happen. Simple demo:

FROM busyboxRUN rm /etc/passwd
docker run -it --rm --user roottest whoamidocker: Error response from daemon: unable to find user root: no matching entries in passwd fileRun 'docker run --help' for more information

Compared to

docker run -it --rm --user 0test whoamiwhoami: unknown uid 0

johnstcn reacted with thumbs up emoji
Comment on lines +546 to +552
func (dcli *dockerCLI) Copy(ctx context.Context, containerName, src, dst string) error {
_, stderr, err := runCmd(ctx, dcli.execer, "docker", "cp", src, containerName+":"+dst)
if err != nil {
return xerrors.Errorf("copy %s to %s:%s: %w: %s", src, containerName, dst, err, stderr)
}
return nil
}
Copy link
Member

Choose a reason for hiding this comment

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

Idea, non-blocking: could we also allow passing in anio.Reader instead that we convert to TAR archive format and stream tostdin /-?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I like the idea, although I don't see a benefit currently for its planned usage. If we have use-cases where we don't want to write files to disk it would definitely be the go-to approach.

johnstcn reacted with thumbs up emoji
@mafredrimafredrienabled auto-merge (squash)June 6, 2025 10:25
@mafredrimafredri merged commita12429e intomainJun 6, 2025
34 checks passed
@mafredrimafredri deleted the mafredri/feat-agent-devcontainer-injection-2 branchJune 6, 2025 10:33
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 6, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

@DanielleMaywoodDanielleMaywoodDanielleMaywood approved these changes

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