Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/dstack/_internal/cli/services/configurators/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,9 @@ def apply_configuration(
repo_config = config_manager.get_repo_config(repo_path)
if repo_config is None:
warn(
"The repo is not initialized. Starting from 0.19.25, repos are optional\n"
"There are three options:\n"
" - Run `dstack init` to initialize the current directory as a repo\n"
" - Specify `--repo`\n"
" - Specify `--no-repo` to not use any repo and supress this warning"
" (this will be the default in the future versions)"
"Repo is not initialized. "
"Use [code]--repo <dir>[/code] or [code]--no-repo[/code] to initialize it.\n"
"Starting from 0.19.25, repos will be configured via YAML and this message won't appear."
)
if not command_args.yes and not confirm_ask("Continue without the repo?"):
console.print("\nExiting...")
Expand Down
5 changes: 4 additions & 1 deletion src/dstack/_internal/core/services/configs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ def load(self):
with open(self.config_filepath, "r") as f:
config = yaml.safe_load(f)
self.config = GlobalConfig.parse_obj(config)
except (FileNotFoundError, ValidationError):
except FileNotFoundError:
self.config = GlobalConfig()
except ValidationError:
logger.error(f"Error in `{self.config_filepath}`", exc_info=True)
self.config = GlobalConfig()

def get_project_config(self, name: Optional[str] = None) -> Optional[ProjectConfig]:
Expand Down
Loading