Skip to content

feat: directory.WithSymlink - #10435

Merged
sipsma merged 5 commits into
dagger:mainfrom
alexcb:with-symlink
Jun 4, 2025
Merged

sipsma merged 5 commits into
dagger:mainfrom
alexcb:with-symlink

Conversation

@alexcb

@alexcb alexcb commented May 19, 2025 •

Copy link
Copy Markdown
Contributor

Adds a new WithSymlink method to the dagger API for both containers and directories.

See #8484 for details.

@alexcb

This comment was marked as outdated.

Comment thread core/directory.go Resolved
@alexcb
alexcb force-pushed the with-symlink branch 4 times, most recently from a80c464 to 4311c8a Compare May 26, 2025 23:58
Comment thread core/container.go Outdated
// NB(vito): iterate in reverse order so we'll find deeper mounts first
for i := len(container.Mounts) - 1; i >= 0; i-- {
mnt := container.Mounts[i]
mnt := &container.Mounts[i]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

note that this change was needed to allow mount.Result = newDir.Result to be set in container.WithSymlink

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This change is no longer needed since we're going to add a replaceMount call.

I'm not sure if we really want it to return a pointer to the actual data, to allow modifications, especially if there's no current use-case.

Comment thread core/schema/container.go Resolved
Comment thread core/container.go Resolved
@alexcb
alexcb force-pushed the with-symlink branch 2 times, most recently from 0bc923b to 8c8a1bd Compare June 2, 2025 16:47
Comment thread core/container.go Resolved
@alexcb
alexcb marked this pull request as ready for review June 2, 2025 18:49
@alexcb
alexcb requested review from a team as code owners June 2, 2025 18:49
@alexcb
alexcb requested review from jedevc and sipsma June 2, 2025 18:50
Comment thread core/integration/container_test.go Resolved
Comment thread core/container.go Resolved

@jedevc jedevc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left a couple nitpicky comments, but generally LGTM!

Will give you a chance to look over them, but won't block merging on them 😁

@jedevc jedevc added this to the v0.18.10 milestone Jun 3, 2025
@alexcb
alexcb force-pushed the with-symlink branch 2 times, most recently from aca4922 to 6063a09 Compare June 3, 2025 18:55
Comment thread core/integration/container_test.go Resolved
Comment thread core/directory.go Resolved
alexcb added 5 commits June 4, 2025 09:16
Adds a new WithSymlink method to the dagger API for both containers and
directories.

See dagger#8484 for details.

Signed-off-by: Alex Couture-Beil <[email protected]>
reuse the connection used in TestSymlinkCaching to prevent prunning from
occuring while the test is running.

Signed-off-by: Alex Couture-Beil <[email protected]>
@alexcb
alexcb requested a review from sipsma June 4, 2025 16:45

@sipsma sipsma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀

@sipsma
sipsma merged commit e79b334 into dagger:main Jun 4, 2025
@sipsma sipsma mentioned this pull request Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants