mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-02 11:48:57 +08:00
Downloading a dataset from a remote (S3-like) object store blocks a web thread while the whole object is pulled into the local cache before any bytes are sent, causing 504 timeouts on large files and making objects larger than the cache undownloadable. Add an opt-in `enable_direct_download` flag per object store backend. When set, plain whole-file downloads are served by redirecting the client (302) to a short-lived presigned URL generated by the backing store, removing Galaxy from the download path entirely. - ObjectStore.get_direct_download_url() gates on the flag and forwards content-disposition/content-type into the presigned URL so the client receives the right filename; implemented for boto3, s3, and azure. - DatasetsService.display() returns a redirect for non-archive whole-file download requests; previews, chunked display, extra-files access, and composite/archived downloads continue to stream as before. - The single-file-vs-archive decision is shared with the existing streamed-download path via Data.is_archive_download(). Refs galaxyproject/galaxy#19255
client/packages/
Workspace packages consumed by the main client as workspace:* deps. The main client (client/package.json, client/src/) is the workspace root.
| Package | Published | Purpose |
|---|---|---|
api-client/ |
Yes (@galaxyproject/galaxy-api-client) |
OpenAPI schema types, typed fetch client, error utilities. |
Criteria for adding a package
A package boundary has real cost. Adding one needs:
- Zero Galaxy-specific coupling (no stores, session, routing, auth).
- No existing npm substitute (don't republish
@vueuse/coreorlodashequivalents). - Either a real external consumer or a real internal architectural case -- a migration target, an enforced dependency-direction boundary. See the decomposition issue (#13336) before extracting.
How it works
client/pnpm-workspace.yamldeclarespackages/*as members; singleclient/pnpm-lock.yaml.- A
postinstallonclient/package.jsonbuilds each workspace package sodist/is present forvue-tscand productionvite build. client/vite.config.mjshas a conditionalresolve.aliasthat maps@galaxyproject/*imports directly to package source duringvite serve-- edits HMR without a rebuild. Production builds usedist/.
Published vs internal
Published packages have a Galaxy-release-tied version and ship via publish_artifacts.yaml. Internal packages ("private": true) exist for the architectural boundary only; flip to published by removing "private": true and adding a publish step.
Common ops (from client/)
pnpm install # workspace + postinstall builds
pnpm --filter @galaxyproject/galaxy-api-client test # scoped command
pnpm --filter @galaxyproject/galaxy-api-client run build
make update-client-api-schema # from galaxy root