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: deprecate runserver in favor of start #644

Merged

Conversation

kdmccormick
Copy link
Collaborator

@kdmccormick kdmccormick commented Apr 20, 2022

Notes

Resolves openedx-unsupported/wg-developer-experience#61

Blocked by these plugin PRs:

There are still a couple references to tutor dev runserver in the official plugins, but totally scrubbing them would require moving the plugins to the V1 API and implementing the COMPOSE_MOUNTS filter. I figure that we can punt that work to openedx-unsupported/wg-developer-experience#26.

Description

See commit message / changelog for details.

Screenshots

Deprecation warning

image

Deprecation warning when --volume is provided

image

New section in the plugin dev tutorial

image

`tutor dev runserver` will be removed in a future release.
Developers are encouraged to use `tutor dev start` instead,
which is more flexible and provides a consistent interface
with `tutor local start`.

As part of this deprecation, we enable the `tty` and
`stdin_open` options on development docker-compose
services. This will allow developers to use `start`
for breakpoint debugging, which was previously only
availble via `runserver`. Several parallel PRs have
been merged in order to make the same change in the
development services of the official plugins.

Although `start` does not support the `--volume` option,
it supports a more-powerful `--mount` option. So, where
developers previously used:

    tutor dev runserver --volume ...

to bind-mount host directories, they should now use:

    tutor dev start --mount ...

Resolves openedx-unsupported/wg-developer-experience#61
@kdmccormick kdmccormick force-pushed the kdmccormick/deprecate-runserver branch from 4c39c1c to 830df37 Compare April 20, 2022 23:54
@kdmccormick
Copy link
Collaborator Author

@regisb This PR and its linked PRs are all ready for review :)

for option in options:
if option.startswith("-v") or option.startswith("--volume"):
depr_warning += " Bind-mounts can be specified using '-m/--mount'."
fmt.echo_alert(depr_warning)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI Click has a deprecated=True option: https://click.palletsprojects.com/en/8.1.x/api/?highlight=deprecated#click.Command

This option adds "deprecated" warnings to stdout and in the command help, but it does not suggest any replacement. So your solution works just as well.

Copy link
Contributor

@regisb regisb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exciting stuff!

@regisb regisb merged commit 5a81b6a into overhangio:master Apr 21, 2022
@kdmccormick kdmccormick deleted the kdmccormick/deprecate-runserver branch April 21, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate 'runserver' in favor of 'start'
2 participants