Skip to content

lazy-loading config with GabbitFixture not working in gabbit>=4.0 #343

Description

@tobias-urdin

With the move to use httpx and running the WSGI application in a external process called with subprocess it's no longer possible to lazy-load the config with a global variable and a config fixture that updates the global variable.

In Gnocchi the setup_app() [1] used for intercept is no longer lazy loaded but called directly when httpx.WSGITransport is initialized so the ConfigFixture that updates the global variable needed for the application is None, it's unclear if it's really because the WSGI server is run in an external process now or because setup_app() is called directly before any fixtures has been started.

Do you have any solution or ideas on how we can solve this so that we can unpin and use gabbi>=4.0 instead of using the older versions not using httpx?

I'm thinking this might also impact OpenStack Placement and potentially other OpenStack projects using the same solution with a config fixture but a newer version of gabbi might not be used there yet.

[1] https://github.com/gnocchixyz/gnocchi/blob/master/gnocchi/tests/functional/fixtures.py#L56

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions