Skip to content
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

feat: remove the implementation of dev runserver #718

Merged
merged 2 commits into from
Sep 6, 2022
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
1 change: 1 addition & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ When backporting changes to master, we should keep only the entries that corresp
facing changes.
-->

- 💥[Improvement] Remove the implementation of tutor dev runserver. (by @Carlos-Muniz)
- [Bugfix] Fix MongoDB replica set connection error resulting from edx-platform's pymongo (3.10.1 -> 3.12.3) upgrade ([edx-platform#30569](https://github.com/openedx/edx-platform/pull/30569)). (by @ormsbee)
- [Improvement] For Tutor Nightly (and only Nightly), official plugins are now installed from their nightly branches on GitHub instead of a version range on PyPI. This will allow Nightly users to install all official plugins by running ``pip install -e ".[full]"``.
- [Bugfix] Remove edX references from bulk emails ([issue](https://github.com/openedx/build-test-release-wg/issues/100)).
Expand Down
32 changes: 0 additions & 32 deletions tutor/commands/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,37 +120,6 @@ def quickstart(
)


@click.command(
help="DEPRECATED: Use 'tutor dev start ...' instead!",
context_settings={"ignore_unknown_options": True},
)
@compose.mount_option
@click.argument("options", nargs=-1, required=False)
@click.argument("service")
@click.pass_context
def runserver(
context: click.Context,
mounts: t.Tuple[t.List[compose.MountParam.MountType]],
options: t.List[str],
service: str,
) -> None:
depr_warning = "'runserver' is deprecated and will be removed in a future release. Use 'start' instead."
for option in options:
if option.startswith("-v") or option.startswith("--volume"):
depr_warning += " Bind-mounts can be specified using '-m/--mount'."
break
fmt.echo_alert(depr_warning)
config = tutor_config.load(context.obj.root)
if service in ["lms", "cms"]:
port = 8000 if service == "lms" else 8001
host = config["LMS_HOST"] if service == "lms" else config["CMS_HOST"]
fmt.echo_info(
f"The {service} service will be available at http://{host}:{port}"
)
args = ["--service-ports", *options, service]
context.invoke(compose.run, mounts=mounts, args=args)


@hooks.Actions.COMPOSE_PROJECT_STARTED.add()
def _stop_on_local_start(root: str, config: Config, project_name: str) -> None:
"""
Expand All @@ -163,5 +132,4 @@ def _stop_on_local_start(root: str, config: Config, project_name: str) -> None:


dev.add_command(quickstart)
dev.add_command(runserver)
compose.add_commands(dev)