Skip to content

Dangling symlink in the project directory crashes bundling with FileNotFoundError #898

Closed

Description

@tdstein

🤖 A dangling symlink anywhere in the project directory makes manifest and bundle creation crash with FileNotFoundError.

Repro

mkdir p && cd p
printf 'from flask import Flask\napp = Flask(__name__)\n' > app.py
echo flask > requirements.txt
ln -s /nonexistent/data.csv data.csv
rsconnect write-manifest api .
[ERROR]
Internal error: [Errno 2] No such file or directory: './data.csv'

A common way to hit this is a project .venv whose base interpreter was removed. If the .venv has no pyvenv.cfg, it isn't recognized as a virtual environment, gets walked, and the broken .venv/bin/python link crashes bundling.

Expected

Skip broken symlinks with a warning, or fail with a clear message naming the file. No traceback.

Found during live QA of #892 against Posit Connect. Reproduced on 1.32.0 and current main (0287aca3).

Activity

  1. added
    bugSomething isn't working
    ready-for-agentFully specified, ready for an autonomous coding agent
    on Oct 28, 2026
  2. tdstein commented on Oct 28, 2026

    @tdstein
    CollaboratorAuthor

    🤖 Steering for PR #907: the only failing check is Integration tests against Connect 2024.03.0. In it, tests/test_agent_cli_e2e.py::test_node_preflight_uses_saved_oauth_and_preserves_project_files failed with assert 'unknown' == 'ok' on the Node preflight status.

    This looks like a flake, not a regression from the change:

    • The same test passed on the same commit in all 18 other jobs that ran it. That includes the 8 other Connect integration versions, prerelease-test, and every Ubuntu and macOS unit-test job.
    • The test talks to a local stub HTTP server and the runner's node/npm, not the Connect version under test.
    • The PR's change (file_checksum raising RSConnectException for dangling symlinks) is not on the Node preflight path.

    To fix:

    • Do not modify the Node preflight test or preflight code to work around this.
    • Re-run the failed job (gh run rerun 40721976651 --failed). If you can't re-run CI, push no code changes and say so in the handoff.
    • If it fails again on re-run, capture the full preflight JSON output from the log and investigate why status is unknown before changing anything. Check whether node/npm resolved differently on that runner.
    • Otherwise the PR is ready. Just confirm just lint and uv run pytest tests/test_bundle.py still pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready-for-agentFully specified, ready for an autonomous coding agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions