Skip to content

Make local code upload size limit configurable #2673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

colinjc
Copy link
Contributor

@colinjc colinjc commented May 20, 2025

Resolves #2663

Adds an env variable which can be used to configure the max code upload size, or disable it. Also improves error message when hitting limit by including size of diff.

@@ -85,6 +85,7 @@
USER_PROJECT_DEFAULT_QUOTA = int(os.getenv("DSTACK_USER_PROJECT_DEFAULT_QUOTA", 10))
FORBID_SERVICES_WITHOUT_GATEWAY = os.getenv("DSTACK_FORBID_SERVICES_WITHOUT_GATEWAY") is not None

SERVER_CODE_UPLOAD_LIMIT = int(os.getenv("DSTACK_SERVER_CODE_UPLOAD_LIMIT", 2 * 2**20))

Choose a reason for hiding this comment

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

Would it be easy to implement this as a friendly string like 2M or 1G?

Copy link
Collaborator

Choose a reason for hiding this comment

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

LGTM, so merging it now. Feel free to open a new PR if parsing human-readable strings is needed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dakota-shop, other environment variables like DSTACK_DEFAULT_SERVICE_CLIENT_MAX_BODY_SIZE do not support human-readable strings as well, so probably makes sense to add the parsing to all of them if at all.

@r4victor r4victor merged commit 3d8ab62 into dstackai:master May 21, 2025
25 checks passed
@r4victor
Copy link
Collaborator

Thanks!

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.

[Feature]: Make local code upload size limit configurable
3 participants