Skip to content

Commit

Permalink
Set default log level to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
r4victor committed Oct 25, 2023
1 parent cdd3e08 commit d8374ac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/dstack/_internal/cli/commands/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def _register(self):
"-l",
"--log-level",
type=str,
help="Logging level for hub. Defaults to ERROR.",
default=os.getenv("DSTACK_SERVER_LOG_LEVEL", "ERROR"),
help="Server logging level. Defaults to WARNING.",
default=os.getenv("DSTACK_SERVER_LOG_LEVEL", "WARNING"),
)
self._parser.add_argument("--token", type=str, help="The admin user token")

Expand Down
5 changes: 4 additions & 1 deletion src/dstack/_internal/server/routers/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ async def upload_code(
user_project: Tuple[UserModel, ProjectModel] = Depends(ProjectMember()),
):
if request_size_exceeded(request, limit=2 * 2**20):
raise ServerClientError("Repo diff size exceeds the limit of 2MB")
raise ServerClientError(
"Repo diff size exceeds the limit of 2MB. "
"Use .gitignore to exclude large files from the repo."
)
_, project = user_project
await repos.upload_code(
session=session,
Expand Down
4 changes: 3 additions & 1 deletion src/dstack/api/_public/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ def load(
logger.debug("Loading repo config")
repo_config = config.get_repo_config(repo_dir)
if repo_config is None:
raise ConfigurationError(f"The repo is not initialized")
raise ConfigurationError(
f"The repo is not initialized. Run `dstack init` to initialize the repo."
)
repo = load_repo(repo_config)
else:
logger.debug("Initializing repo")
Expand Down

0 comments on commit d8374ac

Please sign in to comment.