diff --git a/docker/Dockerfile b/docker/Dockerfile index 073ce00dae46..a6aeca6d51e3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13.1-slim-bullseye as sdist +FROM python:3.11.10-slim-bullseye as sdist LABEL maintainer="oss@netflix.com" LABEL org.opencontainers.image.title="Dispatch PyPI Wheel" @@ -56,7 +56,7 @@ RUN YARN_CACHE_FOLDER="$(mktemp -d)" \ && mv /usr/src/dispatch/dist /dist # This is the image to be run -FROM python:3.13.1-slim-bullseye +FROM python:3.11.10-slim-bullseye LABEL maintainer="oss@dispatch.io" LABEL org.opencontainers.image.title="Dispatch" diff --git a/requirements-base.in b/requirements-base.in index ee63da82d474..832ffdfa2484 100644 --- a/requirements-base.in +++ b/requirements-base.in @@ -23,6 +23,7 @@ jinja2 jira==2.0.0 joblib jsonpath_ng +lxml==5.3.0 markdown msal numpy diff --git a/requirements-base.txt b/requirements-base.txt index 5d988e4c91e0..d15fead32cc6 100644 --- a/requirements-base.txt +++ b/requirements-base.txt @@ -209,6 +209,7 @@ limits==3.13.0 # via slowapi lxml==5.3.0 # via + # -r requirements-base.in # emails # premailer mako==1.3.6 diff --git a/src/dispatch/common/utils/cli.py b/src/dispatch/common/utils/cli.py index 965416990b6f..4bed4f8bfd35 100644 --- a/src/dispatch/common/utils/cli.py +++ b/src/dispatch/common/utils/cli.py @@ -1,14 +1,12 @@ import traceback import logging -import pkg_resources +from importlib.metadata import entry_points from sqlalchemy.exc import SQLAlchemyError from dispatch.plugins.base import plugins, register - logger = logging.getLogger(__name__) - # Plugin endpoints should determine authentication # TODO allow them to specify (kglisson) def install_plugin_events(api): """Adds plugin endpoints to the event router.""" @@ -16,14 +14,15 @@ def install_plugin_events(api): if plugin.events: api.include_router(plugin.events, prefix="/{organization}/events", tags=["events"]) - def install_plugins(): """ Installs plugins associated with dispatch :return: """ + # Retrieve entry points for 'dispatch.plugins' + dispatch_plugins = entry_points().get("dispatch.plugins", []) - for ep in pkg_resources.iter_entry_points("dispatch.plugins"): + for ep in dispatch_plugins: logger.info(f"Attempting to load plugin: {ep.name}") try: plugin = ep.load()