[Bug] E2E seed helpers and a unit test still reference the old /api/v1/plugins/download endpoint after it was renamed to /download-url
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 24.6k
- Avg merge
- 20h 50m
- Merged PRs (30d)
- 586
Description
- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
### Dify version
`main` @ `b6824334cf`
### Cloud or Self Hosted
- [x] Self Hosted (Source)
### Steps to reproduce
1. Commit `69a16d83` (#39811) renamed the marketplace plugin download endpoint in the backend helper:
`api/core/helper/marketplace.py:22` now builds `/api/v1/plugins/download-url`.
2. The E2E marketplace seed helper still downloads from the old path:
`e2e/support/marketplace-plugins.ts:103` → `new URL('/api/v1/plugins/download', ...)`.
3. The backend unit test still only asserts the old path:
`api/tests/unit_tests/core/helper/test_marketplace.py:20` → `assert "api/v1/plugins/download" in url`.
### ✔️ Expected Behavior
All references in the repository use the renamed endpoint. The unit test verifies the exact new path, and the E2E fallback downloads from `/api/v1/plugins/download-url`.
### ❌ Actual Behavior
The E2E fallback path (`downloadMarketplacePluginPackage`) requests the old endpoint; if the marketplace stops serving `/plugins/download`, the fallback returns 404 and seeding falls back to local package upload with a confusing error. The unit test still passes only because `"download-url"` contains the substring `"download"`, so it does not actually verify the renamed endpoint and would not catch a future rename.
Contributor guide
Research direction
Start with api/core/helper/marketplace.py, e2e/support/marketplace-plugins.ts:103, and api/tests/unit_tests/core/helper/test_marketplace.py:20. Update the E2E fallback and make the unit assertion verify /api/v1/plugins/download-url rather than the old path. Run the affected unit test and verify the marketplace seed fallback uses the renamed endpoint.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100