Skip to content

Drop support for Localstack < v0.11.0 #37

@jtdoepke

Description

@jtdoepke

Starting in Localstack v0.11.0, all services are exposed through a single port (4566). In v0.11.6 (not release yet as of this writing) services will be exposed only through that port. We should drop support for Localstack < v0.11.0 and make a new major version release of pytest-localstack.

Why

Compatibility with Localstack will break if we don't. Also we will no longer have to maintain a list of services and default ports in constants.py. When new services are added to Localstack, we won't have to release a new version of pytest-localstack to add support for them.

How

API

  • pytest_localstack.patch_fixture(services=None): Launch Localstack with all services running. Stays the same. We no longer have to pass a default list of services to the container.
  • pytest_localstack.patch_fixture(services=["A", "B", "C"]): Launch Localstack running services A, B, and C. Stays the same. They will use the new default port 4566. We will pass the service names as given to Localstack and assume the user knows what they want.
  • pytest_localstack.patch_fixture(services={"A": 12345}): Launch Localstack with service A running on port 12345. Drop this.

Health checks

Custom health checks are used in pytest-localstack to check that services are ready to receive traffic before the tests start. Starting in Localstack v0.10.8, a health check endpoint was added at /health. Replace our health checks with a request to that endpoint.

Patching existing clients

Since we're making a breaking change anyway, consider dropping support for patching pre-existing botocore/boto3 clients/resources. The code for that is really hard to maintain and breaks whenever AWS makes a significant change to the botocore internals. Take a look at how moto does patching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions