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

upgrade plux to 1.7 #10266

Merged
merged 3 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ install-s3: venv ## Install dependencies for the localstack runtime for s3-o

install: install-dev entrypoints ## Install full dependencies into venv

entrypoints: ## Run setup.py develop to build entry points
$(VENV_RUN); python setup.py plugins egg_info
entrypoints: ## Run plux to build entry points
$(VENV_RUN); python -m plux entrypoints
@# make sure that the entrypoints were correctly created and are non-empty
@test -s localstack_core.egg-info/entry_points.txt || (echo "Entrypoints were not correctly created! Aborting!" && exit 1)

Expand Down
2 changes: 1 addition & 1 deletion localstack/cli/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import os

import click
from plugin import Plugin, PluginManager
from plux import Plugin, PluginManager

LOG = logging.getLogger(__name__)

Expand Down
5 changes: 3 additions & 2 deletions localstack/cli/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import time

import click
from plugin import PluginManager
from plugin.entrypoint import find_plugins, spec_to_entry_point
from plux import PluginManager
from plux.build.setuptools import find_plugins
from plux.core.entrypoint import spec_to_entry_point
from rich import print as rprint
from rich.console import Console
from rich.table import Table
Expand Down
2 changes: 1 addition & 1 deletion localstack/extensions/api/extension.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from plugin import Plugin
from plux import Plugin

from .aws import CompositeExceptionHandler, CompositeHandler, CompositeResponseHandler
from .http import RouteHandler, Router
Expand Down
2 changes: 1 addition & 1 deletion localstack/packages/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from threading import RLock
from typing import Callable, List, Optional, Tuple

from plugin import Plugin, PluginManager, PluginSpec
from plux import Plugin, PluginManager, PluginSpec

from localstack import config

Expand Down
2 changes: 1 addition & 1 deletion localstack/runtime/hooks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import functools

from plugin import PluginManager, plugin
from plux import PluginManager, plugin

# plugin namespace constants
HOOKS_CONFIGURE_LOCALSTACK_CONTAINER = "localstack.hooks.configure_localstack_container"
Expand Down
2 changes: 1 addition & 1 deletion localstack/services/cloudformation/resource_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import botocore
from botocore.exceptions import UnknownServiceError
from plugin import Plugin, PluginManager
from plux import Plugin, PluginManager

from localstack import config
from localstack.aws.connect import ServiceLevelClientFactory, connect_to
Expand Down
2 changes: 1 addition & 1 deletion localstack/services/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class PluginsResource:
"""

def on_get(self, request):
from plugin import PluginManager
from plux import PluginManager

from localstack.runtime import hooks
from localstack.services.plugins import SERVICE_PLUGINS
Expand Down
2 changes: 1 addition & 1 deletion localstack/services/lambda_/invocation/plugins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from plugin import Plugin
from plux import Plugin


class RuntimeExecutorPlugin(Plugin):
Expand Down
2 changes: 1 addition & 1 deletion localstack/services/lambda_/invocation/runtime_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from typing import Type

from plugin import PluginManager
from plux import PluginManager

from localstack import config
from localstack.services.lambda_.invocation.lambda_models import FunctionVersion, InvocationResult
Expand Down
2 changes: 1 addition & 1 deletion localstack/services/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from enum import Enum
from typing import Callable, Dict, List, Optional, Protocol, Tuple

from plugin import Plugin, PluginLifecycleListener, PluginManager, PluginSpec
from plux import Plugin, PluginLifecycleListener, PluginManager, PluginSpec

from localstack import config
from localstack.aws.skeleton import DispatchTable, Skeleton
Expand Down
2 changes: 1 addition & 1 deletion localstack/state/snapshot.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from plugin import Plugin
from plux import Plugin

from .core import StateVisitor

Expand Down
2 changes: 1 addition & 1 deletion localstack/utils/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ def configure_container(container: Container):
else:
container.config.additional_flags = f"{container.config.additional_flags} {user_flags}"

# get additional parameters from plugins
# get additional parameters from pluxs
thrau marked this conversation as resolved.
Show resolved Hide resolved
hooks.configure_localstack_container.run(container)

if config.DEVELOP:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LocalStack project configuration
[build-system]
requires = ['setuptools', 'wheel', 'plux>=1.3.1']
requires = ['setuptools', 'wheel', 'plux>=1.7']
build-backend = "setuptools.build_meta"

[tool.black]
Expand Down
2 changes: 1 addition & 1 deletion requirements-base-runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ packaging==23.2
# via docker
pbr==6.0.0
# via stevedore
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
priority==2.0.0
# via hypercorn
Expand Down
2 changes: 1 addition & 1 deletion requirements-basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mdurl==0.1.2
# via markdown-it-py
pbr==6.0.0
# via stevedore
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
psutil==5.9.8
# via localstack-core (pyproject.toml)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ pluggy==1.4.0
# pytest
plumbum==1.8.2
# via pandoc
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
ply==3.11
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements-runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pbr==6.0.0
# jschema-to-python
# sarif-om
# stevedore
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
ply==3.11
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pluggy==1.4.0
# via
# localstack-core (pyproject.toml)
# pytest
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
ply==3.11
# via
Expand Down
2 changes: 1 addition & 1 deletion requirements-typehint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ pluggy==1.4.0
# pytest
plumbum==1.8.2
# via pandoc
plux==1.5.0
plux==1.7.0
# via localstack-core (pyproject.toml)
ply==3.11
# via
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ install_requires =
dill==0.3.6
dnslib>=0.9.10
dnspython>=1.16.0
plux>=1.3.1
plux>=1.7,<2.0
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a good opportunity to discuss upper version limits.
We explicitly removed pins like this in #10195.
We did this because there's no need for the pins for as long as the currently released version is compatible.
New releases will either be picked up proactively by us (in PRs like this, explicitly upgrading a single dependency), or they are picked up by the weekly upgrades where the breaking changes are identified and (a) fixed in the PR by adding a small fix, or (b) pinned and explicitly upgraded in a follow up PR (where the min version is updated and the upper version limit removed).
In this case, the library is maintained by us, meaning that we already explicitly know that 2.0 will contain breaking changes. However, if the person who creates the release does not proactively update it here, we most likely won't find out (because the automated updates won't dare to touch it 😛)...
This is why I am leaning towards not having these pins, but again, this is a great opportunity to discuss them. 😄

psutil>=5.4.8
python-dotenv>=0.19.1
pyyaml>=5.1
Expand Down
Loading