Skip to content

fix(remote-build): ignore dangling symlinks#1104

Open
bepri wants to merge 4 commits into
mainfrom
work/remote-build-dangling-symlinks
Open

fix(remote-build): ignore dangling symlinks#1104
bepri wants to merge 4 commits into
mainfrom
work/remote-build-dangling-symlinks

Conversation

@bepri

@bepri bepri commented Jun 25, 2026

Copy link
Copy Markdown
Member
  • Have you followed the guidelines for contributing?
  • Have you signed the CLA?
  • Have you successfully run make lint && make test?
  • Have you added an entry to the changelog (docs/reference/changelog.rst)?

Fixes #1103.

Copilot AI review requested due to automatic review settings June 25, 2026 15:45
@bepri bepri requested review from a team and lengau as code owners June 25, 2026 15:45
@bepri bepri requested review from mr-cal and removed request for a team June 25, 2026 15:46


@pytest.fixture(autouse=True)
@pytest.fixture

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Every test that needed this mock was already directly requesting it, but the autouse broke my new test

Copilot AI 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.

Pull request overview

Fixes remote-build failing when the project directory contains dangling symlinks by adjusting how the remote-build worktree repository is created, and documenting the fix.

Changes:

  • Update WorkTree.init_repo() to avoid crashing during repository copy when dangling symlinks are present.
  • Adjust unit tests around worktree initialization and add coverage for dangling-symlink scenarios.
  • Add a changelog entry for the remote-build symlink handling fix.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
craft_application/remote/worktree.py Changes how the project tree is copied into the remote-build worktree repo.
tests/unit/remote/test_worktree.py Updates fixtures and adds a dangling-symlink unit test for worktree init.
docs/reference/changelog.rst Documents the remote-build dangling-symlink behavior change in the changelog.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread craft_application/remote/worktree.py
Comment thread tests/unit/remote/test_worktree.py Outdated
Comment thread docs/reference/changelog.rst Outdated
@bepri

bepri commented Jun 25, 2026

Copy link
Copy Markdown
Member Author

Duplicate of #1100

@bepri bepri marked this as a duplicate of #1100 Jun 25, 2026
@bepri bepri closed this Jun 25, 2026
@mr-cal mr-cal reopened this Jun 25, 2026
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.

Remote build fails on dangling symlinks

4 participants