-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: warn about det deploy det-version mistmach (#8994)
- Loading branch information
Showing
5 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,31 @@ | ||
from typing import Optional | ||
|
||
import termcolor | ||
|
||
import determined as det | ||
|
||
|
||
class PreflightFailure(Exception): | ||
pass | ||
|
||
|
||
class MasterTimeoutExpired(Exception): | ||
pass | ||
|
||
|
||
def warn_version_mismatch(requestd_version: Optional[str]) -> None: | ||
""" | ||
check for and warn about version compatibility between the `det` CLI and | ||
the requested det version. | ||
""" | ||
if not requestd_version or requestd_version == det.__version__: | ||
return | ||
print( | ||
termcolor.colored( | ||
f"Warning: The specified --det-version ({requestd_version}) does not match the " | ||
f"the current `det` CLI version ({det.__version__}), proceed with caution. " | ||
"You should probably use a matching version of det CLI instead. " | ||
"Please refer to the CLI documentation for more information", | ||
"yellow", | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters