Skip to content
Merged
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
22 changes: 0 additions & 22 deletions src/dstack/_internal/cli/commands/logs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import argparse
import sys
from pathlib import Path

from dstack._internal.cli.commands import APIBaseCommand
from dstack._internal.cli.services.completion import RunNameCompleter
Expand All @@ -19,19 +18,6 @@ def _register(self):
self._parser.add_argument(
"-d", "--diagnose", action="store_true", help="Show run diagnostic logs"
)
self._parser.add_argument(
"-a",
"--attach",
action="store_true",
help="Set up an SSH tunnel and print logs as they follow",
)
self._parser.add_argument(
"--ssh-identity",
metavar="SSH_PRIVATE_KEY",
help="The private SSH key path for SSH tunneling",
type=Path,
dest="ssh_identity_file",
)
self._parser.add_argument(
"--replica",
help="The replica number. Defaults to 0.",
Expand All @@ -51,14 +37,6 @@ def _command(self, args: argparse.Namespace):
run = self.api.runs.get(args.run_name)
if run is None:
raise CLIError(f"Run {args.run_name} not found")
if not args.diagnose and args.attach:
if run.status.is_finished():
raise CLIError(f"Run {args.run_name} is finished")
else:
logger.warning(
"`dstack logs --attach` is deprecated in favor of `dstack attach --logs`"
)
run.attach(args.ssh_identity_file)
logs = run.logs(
diagnose=args.diagnose,
replica_num=args.replica,
Expand Down