Skip to content

Commit

Permalink
Rename dagit to dagster-webserver (dagster-io#14725)
Browse files Browse the repository at this point in the history
## Summary & Motivation

- New `dagster-webserver` Python package.
- Package renames all uses of `dagit` to either "webserver" or
"dagster-webserver", depending on context.
- A few options in the CLI had the word "dagit"-- these were renamed to
use "webserver", but the "dagit" variants were preserved as aliases for
backcompat (removal in 2.0)
- A few webserver routes (`/dagit_info` and `/dagit/notebook`) also
included "dagit"-- these renamed to "webserver" equivalents, with the
"dagit" variants preserved as aliases.
- `dagit` package is now a stub package.
    - Includes `dagster-webserver` as a dependency.
- Installing the `dagit` package still installs a `dagit` executable,
but the executable points to the CLI defined in `dagster-webserver`.
- All tests transferred to `dagster-webserver` except one that invokes
the `dagit` executable (and checks that `dagster-webserver` executable
is invoked.
- Invoking the `dagit` executable will cause a deprecation warning to be
printed advising use of `dagster-webserver` or `dagster dev`.
- Updates to `dagster`
- Rename `dagster dev` options `--dagit-port` and `--dagit-host` to
`--webserver-port` and `--webserver-host`, preserving the old names as
deprecated aliases
- Updates to `dagster-graphql`
    - Root query type renamed from "DagitQuery" -> "WebserverQuery"
- Other
- Packages and test suites that depended on `dagit` now depend on
`dagster-webserver`
- Change new library template to include `dagster-webserver` as dep
instead of `dagit`
- I preserved the telemetry code `"start_dagit_webserver"` (but renamed
the constant referencing it) to avoid disrupting data collection.
    - Makefile: `rebuild_dagit` -> `rebuild_ui`

## How I Tested These Changes

- Existing test suite
- New unit tests to ensure URL and CLI redirects work
- Fresh `make dev_install` on this branch, ensured the following work
(don't crash and you can visit localhost:
    - `dagster dev -f ...`
    - `dagit -f ...`
    - `dagster-webserver -f ...`
  • Loading branch information
smackesey authored Jul 6, 2023
1 parent 5490aeb commit a9d036f
Show file tree
Hide file tree
Showing 140 changed files with 746 additions and 304 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def build_repo_wide_check_manifest_steps() -> List[CommandStep]:
"python_modules/dagit",
"python_modules/dagster",
"python_modules/dagster-graphql",
"python_modules/dagster-webserver",
*(
os.path.relpath(p, GIT_REPO_ROOT)
for p in glob(f"{GIT_REPO_ROOT}/python_modules/libraries/*")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def docker_extra_cmds(version: str, _) -> List[str]:
]


dagit_extra_cmds = ["make rebuild_dagit"]
ui_extra_cmds = ["make rebuild_ui"]


mysql_extra_cmds = [
Expand Down Expand Up @@ -348,7 +348,7 @@ def k8s_extra_cmds(version: str, _) -> List[str]:

LIBRARY_PACKAGES_WITH_CUSTOM_CONFIG: List[PackageSpec] = [
PackageSpec("python_modules/automation"),
PackageSpec("python_modules/dagit", pytest_extra_cmds=dagit_extra_cmds),
PackageSpec("python_modules/dagster-webserver", pytest_extra_cmds=ui_extra_cmds),
PackageSpec(
"python_modules/dagster",
env_vars=["AWS_ACCOUNT_ID"],
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ dagit_run_logs

python_modules/libraries/dagster-aws/dagster_aws/ecs/config.yaml

python_modules/dagster-webserver/node_modules/
python_modules/dagster-webserver/yarn.lock
python_modules/dagit/node_modules/
python_modules/dagit/yarn.lock


# Gatsby stuff
docs/gatsby/**/node_modules/
docs/gatsby/**/_build
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,25 +70,25 @@ graphql:
sanity_check:
#NOTE: fails on nonPOSIX-compliant shells (e.g. CMD, powershell)
@echo Checking for prod installs - if any are listed below reinstall with 'pip -e'
@! (pip list --exclude-editable | grep -e dagster -e dagit)
@! (pip list --exclude-editable | grep -e dagster -e dagster-webserver)

rebuild_dagit: sanity_check
rebuild_ui: sanity_check
cd js_modules/dagit/; yarn install && yarn build

rebuild_dagit_with_profiling: sanity_check
rebuild_ui_with_profiling: sanity_check
cd js_modules/dagit/; yarn install && yarn build-with-profiling

dev_install_m1_grpcio_wheel: install_dev_python_modules_verbose_m1 rebuild_dagit
dev_install_m1_grpcio_wheel: install_dev_python_modules_verbose_m1 rebuild_ui

dev_install: install_dev_python_modules_verbose rebuild_dagit
dev_install: install_dev_python_modules_verbose rebuild_ui

dev_install_quiet: install_dev_python_modules rebuild_dagit
dev_install_quiet: install_dev_python_modules rebuild_ui

graphql_tests:
pytest python_modules/dagster-graphql/dagster_graphql_tests/graphql/ -s -vv

check_manifest:
check-manifest python_modules/dagster
check-manifest python_modules/dagit
check-manifest python_modules/dagster-webserver
check-manifest python_modules/dagster-graphql
ls python_modules/libraries | xargs -n 1 -Ipkg check-manifest python_modules/libraries/pkg
6 changes: 3 additions & 3 deletions docs/sphinx/sections/api/apidocs/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ Dagster CLI
.. click:: dagster_graphql.cli:cli
:prog: dagster-graphql

.. currentmodule:: dagit
.. currentmodule:: dagster_webserver

.. click:: dagit.cli:cli
:prog: dagit
.. click:: dagster_webserver.cli:cli
:prog: dagster-webserver

.. currentmodule:: dagster

Expand Down
2 changes: 1 addition & 1 deletion docs/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ deps =
# Can't stub deps because processed by sphinx-click
-e ../python_modules/dagster
-e ../python_modules/dagster-graphql
-e ../python_modules/dagit
-e ../python_modules/dagster-webserver
-e ../python_modules/libraries/dagster-celery

# Can't stub deps due to import-time use of at least one dep
Expand Down
2 changes: 1 addition & 1 deletion examples/assets_dbt_python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@
# packaging v22 has build compatibility issues with dbt as of 2022-12-07
"packaging<22.0",
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
4 changes: 2 additions & 2 deletions examples/assets_dbt_python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ deps =
source: -e ../../python_modules/dagster[test]
pypi: dagster[test]
pypi: -r ../temp_pins.txt
source: -e ../../python_modules/dagit
source: -e ../../python_modules/dagster-webserver
source: -e ../../python_modules/libraries/dagster-pandas/
source: -e ../../python_modules/libraries/dagster-dbt/
source: -e ../../python_modules/libraries/dagster-duckdb/
Expand All @@ -18,5 +18,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
2 changes: 1 addition & 1 deletion examples/assets_dynamic_partitions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
"dagster-duckdb-pandas",
"requests",
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
2 changes: 1 addition & 1 deletion examples/assets_dynamic_partitions/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
2 changes: 1 addition & 1 deletion examples/assets_modern_data_stack/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"dbt-postgres",
"packaging<22.0", # match dbt-core's requirement to workaround a resolution issue
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
4 changes: 2 additions & 2 deletions examples/assets_modern_data_stack/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ deps =
pypi: dagster[test]
pypi: -r ../temp_pins.txt
source: -e ../../python_modules/dagster-graphql
source: -e ../../python_modules/dagit
source: -e ../../python_modules/dagster-webserver
source: -e ../../python_modules/libraries/dagster-dbt/
source: -e ../../python_modules/libraries/dagster-airbyte/
source: -e ../../python_modules/libraries/dagster-postgres/
Expand All @@ -19,5 +19,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
2 changes: 1 addition & 1 deletion examples/assets_pandas_pyspark/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# "pyarrow",
],
extras_require={
"dev": ["dagit", "pytest"],
"dev": ["dagster-webserver", "pytest"],
"test": ["pandas", "pyarrow; python_version < '3.9'", "pyspark"],
},
)
4 changes: 2 additions & 2 deletions examples/assets_pandas_pyspark/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagit
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-graphql
-e ../../python_modules/libraries/dagster-spark
-e ../../python_modules/libraries/dagster-pyspark
Expand All @@ -15,5 +15,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
2 changes: 1 addition & 1 deletion examples/assets_pandas_type_metadata/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"pandera",
"pandas",
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
4 changes: 2 additions & 2 deletions examples/assets_pandas_type_metadata/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagit
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-graphql
-e ../../python_modules/dagster[test]
-e ../../python_modules/libraries/dagster-pandera/
-e .
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
2 changes: 1 addition & 1 deletion examples/assets_smoke_test/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
"dagster-snowflake-pandas",
],
extras_require={
"dev": ["dagit", "pytest"],
"dev": ["dagster-webserver", "pytest"],
},
)
4 changes: 2 additions & 2 deletions examples/assets_smoke_test/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagit
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-graphql
-e ../../python_modules/libraries/dagster-pandas/
-e ../../python_modules/libraries/dagster-dbt/
Expand All @@ -16,5 +16,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -vv
2 changes: 1 addition & 1 deletion examples/deploy_docker/Dockerfile_dagster
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM python:3.7-slim
RUN pip install \
dagster \
dagster-graphql \
dagit \
dagster-webserver \
dagster-postgres \
dagster-docker

Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_docker/from_source/Dockerfile_dagster
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ WORKDIR /tmp
RUN pip install \
-e python_modules/dagster \
-e python_modules/dagster-graphql \
-e python_modules/dagit \
-e python_modules/dagster-webserver \
-e python_modules/libraries/dagster-postgres \
-e python_modules/libraries/dagster-docker

Expand Down
4 changes: 2 additions & 2 deletions examples/deploy_docker/from_source/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if [[ -z ${DAGIT_DONT_BUILD_JS_BUNDLE+x} ]]; then
echo -e "--- \033[32m:wrench: Building JS bundle\033[0m"
echo -e "(set DAGIT_DONT_BUILD_JS_BUNDLE to skip)"
pushd ${ROOT}
make rebuild_dagit
make rebuild_ui
popd
fi

Expand All @@ -41,7 +41,7 @@ alias copy_py="rsync -av \
--exclude .coverage"

copy_py $ROOT/python_modules/dagster \
$ROOT/python_modules/dagit \
$ROOT/python_modules/dagster-webserver \
$ROOT/python_modules/dagster-graphql \
python_modules/

Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_docker/from_source/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
context: .
dockerfile: ./Dockerfile_dagster
entrypoint:
- dagit
- dagster-webserver
- -h
- "0.0.0.0"
- -p
Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_docker/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dagster
dagit
dagster-webserver
dagster-docker
2 changes: 1 addition & 1 deletion examples/deploy_docker/tests/test_deploy_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_deploy_docker():

try:
sanity_check = requests.get(f"http://{dagit_host}:3000/dagit_info")
assert "dagit" in sanity_check.text
assert "dagster_webserver" in sanity_check.text
break
except requests.exceptions.ConnectionError:
pass
Expand Down
2 changes: 1 addition & 1 deletion examples/deploy_docker/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
2 changes: 1 addition & 1 deletion examples/deploy_ecs/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -s -vv {posargs}
2 changes: 1 addition & 1 deletion examples/deploy_k8s/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ deps =
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
2 changes: 1 addition & 1 deletion examples/development_to_production/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
4 changes: 2 additions & 2 deletions examples/development_to_production/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
deps =
-e ../../python_modules/dagster[test]
-e .[test]
-e ../../python_modules/dagit
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-graphql
-e ../../python_modules/libraries/dagster-snowflake/
-e ../../python_modules/libraries/dagster-snowflake-pandas/
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from urllib.parse import urlencode

import pytest
from dagit.app import create_app_from_workspace_process_context
from dagster_webserver.app import create_app_from_workspace_process_context
from starlette.testclient import TestClient

from dagster._cli.workspace import get_workspace_process_context_from_kwargs
Expand Down
4 changes: 2 additions & 2 deletions examples/docs_snippets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
],
packages=find_packages(exclude=["test"]),
install_requires=[
"dagit",
"dagster",
"dagster-webserver",
"dagstermill",
"dagster-airbyte",
"dagster-airflow",
Expand Down Expand Up @@ -58,7 +58,7 @@
"snapshottest",
"dbt-duckdb",
"xgboost",
"dagit[test]",
"dagster-webserver[test]",
]
},
)
4 changes: 2 additions & 2 deletions examples/docs_snippets/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ passenv = CI_* COVERALLS_REPO_TOKEN POSTGRES_TEST_DB_HOST BUILDKITE*
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-graphql
-e ../../python_modules/dagster-webserver
-e ../../python_modules/libraries/dagstermill[test]
-e ../../python_modules/libraries/dagster-airbyte
-e ../../python_modules/libraries/dagster-airflow
Expand All @@ -27,10 +28,9 @@ deps =
-e ../../python_modules/libraries/dagster-snowflake
-e ../../python_modules/libraries/dagster-snowflake-pandas
-e ../../python_modules/libraries/dagster-snowflake-pyspark
-e ../../python_modules/dagit
-e .[full]
allowlist_externals =
/bin/bash
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster -e dagit'
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
2 changes: 1 addition & 1 deletion examples/experimental/tutorial_dbt_dagster_v2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"dbt-core>=1.4.0",
"dbt-duckdb",
],
extras_require={"dev": ["dagit"]},
extras_require={"dev": ["dagster-webserver"]},
)
2 changes: 1 addition & 1 deletion examples/feature_graph_backed_assets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
extras_require={"dev": ["dagit", "pytest"]},
extras_require={"dev": ["dagster-webserver", "pytest"]},
)
Loading

0 comments on commit a9d036f

Please sign in to comment.