fix(install): prevent mirror settings from changing dependency resolution inputs
Maintainers usually reply within 1 day
@WH-2099 is already working on this.
Since Nov 20, 2026.
Assessment
This issue has not been assessed yet.
Description
Self Checks
To make sure we get to you in time, please check the following :)
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report.
- This report is submitted in English.
- "Please do not modify this template :) and fill in all the required fields."
Versions
- dify-plugin-daemon: source inspected at tags
0.6.10,0.6.14, andmaincommit1fa10988ce3fb69af48538d3a6d405fcd4769afc.
The relevant dependency selection and command construction are the same in these revisions. - dify-api: not required for the isolated installer reproduction; no full Dify deployment was exercised.
- Local dependency-resolution check: uv
0.13.8, using two locally generated fixture wheels.
Describe the bug
Changing the effective PipMirrorUrl changes which dependency file the daemon treats as authoritative.
For a plugin containing pyproject.toml and a fully pinned requirements.txt, but no uv.lock, the default installation path ignores the requirements pins and resolves from pyproject.toml.
The mirror path installs from requirements.txt instead.
The same plugin package can therefore install different versions even when both indexes provide identical packages.
The current selection is:
| Package contents | Empty PipMirrorUrl |
Nonempty PipMirrorUrl |
|---|---|---|
| Only requirements | uv pip install -r requirements.txt |
Same requirements input |
| pyproject + requirements, no lock | uv sync --no-dev; requirements pins are not read |
uv pip install -r requirements.txt -i <index> |
| pyproject + requirements + lock | Normally uv sync --no-dev --frozen |
Installs from requirements |
Mirror and logging arguments are abbreviated above.
This affects first installation and environment rebuilds; a previously accepted virtual environment can be reused without exercising these branches.
To Reproduce
- Prepare a valid Python plugin package containing the following dependency files and no
uv.lock.
Use a controlled index containing versions1.0.0and1.1.0of the dependency-free fixture packagerequirements-scope-demo.
This is a synthetic fixture, not a package that must be downloaded from PyPI.
# pyproject.toml
[project]
name = "requirements-scope-plugin"
version = "0.0.0"
requires-python = ">=3.12"
dependencies = ["requirements-scope-demo>=1.0.0,<2"]
# requirements.txt
requirements-scope-demo==1.0.0
- In a fresh environment, disable mirror auto-detection and leave the effective
PipMirrorUrlempty.
KeepPIP_EXTRA_ARGSempty.
The daemon selectsuv sync --no-dev, which can install1.1.0. - Install the same package in another fresh environment with an explicit mirror URL exposing the same available versions.
The daemon selects the requirements path, which installs1.0.0. - Compare installed distribution metadata, rather than relying on the presence of
.venvor its validity marker.
The underlying commands were checked locally on 2026-11-17 with both fixture wheels supplied through --offline --no-index --find-links <fixture-wheel-directory>:
| Command/input | Installed fixture version |
|---|---|
uv pip install -r requirements.txt, requirements only |
1.0.0 |
uv sync --no-dev, pyproject + requirements without lock |
1.1.0 |
uv pip install -r requirements.txt, with pyproject also present |
1.0.0 |
uv sync --no-dev --frozen, consistent lock pinning 1.0.0 |
1.0.0 |
uv sync --no-dev, retaining that existing lock |
1.0.0 |
uv sync --no-dev --upgrade, retaining that existing lock |
1.1.0 |
These checks validate command behavior; they do not claim that the original release images or a complete daemon deployment were tested.
Expected behavior
Dependency-file precedence and the treatment of supplied pins should be explicit and consistent across mirror settings.
Changing the package download source should not silently change the dependency-resolution inputs.
For pyproject + exact requirements without a lock, define how the supplied exact resolution is used or reject an unsupported/conflicting combination with an actionable error.
Preserve valid-lock and requirements-only installations, and distinguish deliberate re-resolution or upgrades from normal installation.
Screenshots
Not applicable; the differing commands and installed versions are listed above.
Additional context
The relevant code path is InitPythonEnvironment() → detectDependencyFileType() → installDependencies() → prepareSyncArgs() / preparePipArgs().
- Dependency-file selection and command construction.
- Environment reuse and installation.
- Packaging behavior: existing requirements are preserved; missing requirements are exported only when pyproject and a lock exist; the export uses
--frozen. - Related packaging work: #719.
PLUGIN_IGNORE_UV_LOCK=true only prevents the daemon from automatically adding --frozen; it does not delete the lock or force all packages to upgrade.
Existing versions may still be retained unless constraints require a change or an upgrade is requested.
Successful packaging alone does not prove that pyproject, the lock, and requirements agree.
Stale or conflicting inputs can make the different installation branches select incompatible dependency sets.
This is an existing daemon installation design issue, recorded for a separate follow-up.
It is deferred from the current native async SDK migration and is not a prerequisite for that work.
The migration should continue with consistent package dependency files; no SDK runtime workaround is requested by this issue.
- Dominant language
- Go
- Stars
- 462
- Forks
- 326
- Avg merge
- 22h 15m
- Merged PRs (30d)
- 8
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langgenius/dify-plugin-daemon
-
Agent strategy run cut by PLUGIN_MAX_EXECUTION_TIMEOUT is reported only as "Internal Server Error"Open
Difficulty 3/5 1-2 days Newbie friendliness 62/100
langgenius/dify-plugin-daemon#863 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
langgenius/dify-plugin-daemon#862 ·
Maintainers usually reply within 1 day
-
READONLY error when using Redis 6.2.2 Sentinel cluster on Kubernetes with dify-plugin-daemon 0.6.10-localPossibly taken @Souravrajvi0 claimed this 60 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
langgenius/dify-plugin-daemon#826 · 2 comments ·
Maintainers usually reply within 1 day
-
uninstall the plugin, but the plugin package is not removedPossibly taken @fatelei claimed this 111 days ago. Openbug plugin-daemon
Difficulty 3/5 1-2 days Newbie friendliness 38/100
langgenius/dify-plugin-daemon#797 · 2 comments ·
Maintainers usually reply within 1 day
-
bug plugin-daemon project#dify-plugin-daemon
Difficulty 4/5 3-5 days Newbie friendliness 45/100
langgenius/dify-plugin-daemon#771 · 2 comments ·
Maintainers usually reply within 1 day
All issues in langgenius/dify-plugin-daemon
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
github/github-mcp-server#3960 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
JuliusBrussee/caveman#1594 ·
Maintainers usually reply within 1 day
-
C-bug O-community X-blathers-triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
cockroachdb/cockroach#176264 · 1 comment ·