- Make PySOA compatible with newer versions of attrs (#272)
- Use Ubuntu 20.04 in Dockerfile
- Fix mypy annotations
- Disable mypy errors
- Fix Six issues
- Fix unit tests
- Removed Python 3.8 testing from Travis
- Fix another mypy annotation.
- Fix mypy annotation.
- Switch argument order.
- Make instance_index optional.
- Disable mypy warning.
- Add missing parameter.
- [MINOR] Pass instance index into transport.
- [MINOR] Treat UTC datetime strings as datetimes in test plans (#262)
- Capture stubs to autogenerate schemas for contract testing (#261)
- [PATCH] Prevent creation of empty sequences when global structures are parsed
- [MINOR] Allow Server subclasses to set a custom introspection action (#257)
- [PATCH] Fix handling of empty structures in get_all_paths
- [PATCH] Update README to install latest version
- Fix lint error and pytest-asyncio version.
- Move Redis server transport setting to a separate object.
- [PATCH] Fix #251: Replace use of Django's close_old_connections
- [MINOR] Ensure support for Redis 6 with ACLs and TLS
- [PATCH] Try to make Travis builds faster
- [PATCH] Update documentation
- [PATCH] Fix two bugs regarding client expansions
- [PATCH] Fix two bugs regarding client expansions
- [PATCH] Update documentation
- [PATCH] Fix #240 - Do not strip whitespace from serialized messages
- [PATCH] Improve error messages and use correct msgpack dependency
- [PATCH] Try to make Travis builds faster
- [PATCH] Fix #239: stub_action side_effect now supports mix of types
- [PATCH] Fix #240 - Do not strip whitespace from serialized messages
- [PATCH] Improve error messages and use correct msgpack dependency
- [PATCH] Fix #239: stub_action side_effect now supports mix of types
- [PATCH] Explicitly test for -m invocation in all Python versions
- [MINOR] Add ability to extend context in request.call_local_action
- [PATCH] Skip Django database connection cleanup in PyTest fixtures
- [PATCH] Skip Django database connection cleanup in unit tests
- [PATCH] Try importing from typing before typing_extensions
- [PATCH] Add some more tests to verify stub_action functionality
- [PATCH] Account for potential missing PytestCollectionWarning
- [MAJOR] Removed deprecated class
RedisClientSettings
; useClientSettings
, instead. - [MAJOR] Removed deprecated class
LocalClientSettings
; useClientSettings
, instead. - [MAJOR] Removed deprecated class
PolymorphicClientSettings
; useClientSettings
, instead. - [MAJOR] Removed deprecated class
RedisServerSettings
; useServerSettings
, instead. - [MAJOR] Removed deprecated class
LocalServerSettings
; useServerSettings
, instead. - [MAJOR] Removed deprecated class
PolymorphicServerSettings
; useServerSettings
, instead. - [MAJOR] Removed deprecated class
Settings
; use Conformity Settings, instead. - [MAJOR] Removed deprecated module
pysoa.common.metrics
; use PyMetrics, instead. - [MAJOR] Removed deprecated module
pysoa.common.serializer.exceptions
; usepysoa.common.serializer.errors
, instead. - [MAJOR] Removed deprecated module
pysoa.common.transport.exceptions
, usepysoa.common.transport.errors
, instead. - [MAJOR] Removed deprecated
is_caller_error
argument to and attribute of theActionError
andJobError
classes; use argumentset_is_caller_error_to
, instead (and it is now a private attribute). This was removed to eliminate confusion with theis_caller_error
attribute of theError
class, which has not changed and will not change. - [MAJOR] Removed deprecated function
log_level_schema
; use the Conformity logging helpers, instead. - [MAJOR] Removed deprecated client setting
transport_cache_time_in_seconds
, which has no replacement because transports work differently now than they did when that setting was originally created. - [MINOR] Add a new server-side
EnrichedJobRequest
class to correspond to the server-sideEnrichedActionRequest
. - [MAJOR] Refactor the
ServerMiddleware.job
interface to accept theEnrichedJobRequest
class instead of a dictionary. - [MAJOR] Refactor the way middleware and middleware wrapper stacks are constructed to improve performance.
- [MINOR] Improve logging filter to add action name to record
- [MINOR] New class
BaseServerTestCase
contains helper methods for setting up the test service, calling actions on the service, and asserting actions runs with and without errors, all of which previously resided directly inServerTestCase
. - [MINOR] New class
UnitTestServerTestCase
extends bothunittest.TestCase
andBaseServerTestCase
for when you really want to useunittest
-style tests. ItssetUp
method calls the helper method for setting up the test service. - [MINOR] New class
PyTestServerTestCase
extendsBaseServerTestCase
. Itssetup_class
method will issue a warning and callsetUpClass
if your class has that method. Itsteardown_class
method will issue a warning and calltearDownClass
if your class has that method. Itssetup_method
method calls the helper method for setting up the test service and will issue a warning and callsetUp
if your class has that method. Itsteardown_method
method will issue a warning and calltearDown
if your class has that method. If you currently useaddCleanup
, it will still work but will issue a warning. All the standardself.assert*
andself.fail*
methods are polyfilled and should work similar to the way they previously worked, but you should endeavor to swich over to simple uses of theassert
keyword, which provides better diffs in PyTest failure messages. - [MAJOR]
ServerTestCase
is now an alias forPyTestServerTestCase
instead of a class. If you have existing test classes that extendServerTestCase
, and those tests classes do not start with the wordTest
, PyTest will not run them anymore! You need to rename them to start withTest
. - [MAJOR] The test plan class
ServicePlanTestCase
now inherits fromPyTestServerTestCase
instead ofUnitTestServerTestCase
like it previously did. Test plans behave slightly differently now. Your fixture files should all work the same way they always have, but if you have any advanced uses of setup or teardown methods, they may break. - [PATCH] Fixes a bug in
stub_action
preventing it from working as a decorator in PyTest-style unit test methods (it already worked properly inunittest
-style unit test methods). - [MAJOR] Bump PyMetrics to 1.0.x
- [MAJOR] Make Version 3 the default Redis gateway protocol version
- [PATCH] Add documentation about release roadmap
- [MAJOR] Make Version 3 the default Redis gateway protocol version
- [PATCH] Add missing assertLogs, fix assertCountEqual, rename some tests
- [MAJOR] Bump PyMetrics to 1.0.x
- [MAJOR] Refactor ServerTestCase to not inherit from unittest.TestCase
- [PATCH] Fix new typing issues in MyPy 0.740
- [MINOR] Improve logging filter to add action name to record
- [MAJOR] Implement #197: Refactor ServerMiddleware job with EnrichedJobRequest
- [MAJOR] #196: Remove all deprecated features before release 1.0.0
- [MINOR] Publish documentation on ReadTheDocs.io
- [PATCH] Add support for Python 3.8
- [MINOR] Add gauges to track running and busy PySOA workers
- [MINOR] Improve Server.make_client, including with adding calling_service
- [PATCH] Expand functional test system with more Redis
- [PATCH] Fix typing for stub_action's side_effect
- [PATCH] Fix incorrect type annotation on Error.variables
- [MINOR] Refactor PySOA errors for easier and more concise usage
- [MAJOR] Adopt PyMetrics and remove metrics shims
- [PATCH] Remove noqa comments now that Flake8 3.7.8 is out
- [PATCH] Fix tests broken by releasing 0.70.0
- [MINOR] #204: Add is_caller_error attribute to Error objects
- [PATCH] Be permissive about string types in assertions
- [MAJOR] Add Python typing comments to type the API
- [PATCH] Make typing dependency more specific to fix missing types
- [MINOR] Use Conformity's Settings and deprecate PySOA's Settings
- [PATCH] Fix import errors in Python 3.5.2/3.6.1 and fix Harakiri logging
- [MINOR] Fix #198: Double import trap is broken in Python 3.7
- [PATCH] Update docs further
- [MAJOR] Add support for response chunking to Redis Gateway transport
- [MAJOR] Support UTC-aware datetime objects in MsgpackSerializer
- [MINOR] Add pre-fork hook method to Server class, clean up prints
- [MINOR] Further improve harakiri and verify with functional tests
- [PATCH] Update test documentation to use FIELD_MISSING constant instead of string (#184)
- [MINOR] Refactor harakiri to log details about running threads' stacks
- [MINOR] Add robust support for safe asynchronous code
- [PATCH] Clean up Travis file using config.travis-ci.org
- [PATCH] Commit metrics during perform_pre_request_actions
- [MINOR] Respawn crashed workers when running in forking mode
- By default, when running in forking mode, PySOA will respawn crashed workers.
- If a worker crashes 3 times in 15 seconds or 8 times in 60 seconds, PySOA will give up and stop respawning that worker.
- The new --no-respawn argument can disable this behavior if necessary.
- If all workers crash too many times and PySOA runs out of workers, it exits (this is basically the existing behavior, except for the above-described respawning).
- [MINOR] Add first functional tests and fix some bugs
- Create a functional test environment using Docker/Docker Compose and a simple shell script.
- Add an initial set of functional tests.
- Fix several bugs regarding signal handling in the Server, server process forking, and file-watching auto-reloader:
- If the server received several simultaneous signals (for example, if Ctrl+C is used), the signal handler could be invoked in parallel two or more times, resulting in, at best, forcefully-terminating the server and, at worst, that plus a bunch of concurrency errors. This is now fixed.
- If server process forking was enabled or the file-watching auto-reloader was enabled, non-Ctrl+C signals (such as those from Docker when running within a container) were suppressed, meaning the server would not stop.
- [PATCH] Re-organize all tests into unit, integration, and functional test modules
- [MINOR] Support PyTest 5.0 with tests ensuring compliance
- [PATCH] Fix misleading DeprecationWarning
- [MINOR] Switch to using Conformity's class schemas (all existing configurations are backwards compatible and will continue to work).
- [MINOR] Deprecated pysoa.server.settings.PolymorphicServerSettings and pysoa.client.settings.PolymorphicClientSettings. The base ServerSettings and ClientSettings are now automatically polymorphic and you should use / inherit from those, instead.
- [MINOR] Changed the default settings class in Client.settings_class from PolymorphicClientSettings to ClientSettings.
- [MINOR] Changed the default settings class in Server.settings_class from PolymorphicServerSettings to ServerSettings.
- [MAJOR] Refactored the schemas in LocalClientTransportSchema, LocalServerTransportSchema, RedisTransportSchema, StubClientTransportSchema, and `MetricsSchema to support the new Conformity class schemas. This breaking change is only a disruption if you are using these classes directly. However, this is unusual and you are probably not. This does not break configurations that were processed by these schemas.
- [MAJOR] Deleted module pysoa.common.schemas and its classes BasicClassSchema and PolymorphClassSchema. This breaking change is only a disruption if you are using these classes directly. However, this is unusual and you are probably not.
- [MINOR] Previously, when a Settings object failed to validate against the settings schema, it might have raised ValueError, Conformity's ValidationError, _or_ Settings.ImproperlyConfigured. Now it will _always_ raise _only_ Settings.ImproperlyConfigured when it fails to validate against the settings schema.
- [PATCH] Fix several tests broken by Conformity 1.25.0
- [PATCH] Return same stub in multiple uses of the same stub_action instance
- [PATCH] Allow multiple uses of the same stub_action instance
- [MAJOR] Remove PySOA server import from pysoa/server/__init__.py
- [MINOR] Add forked process ID for creating deterministic heartbeat files
- [MINOR] Add helper for calling local actions within other actions
- [PATCH] Guarantee Server always has _async_event_loop_thread attribute
- [PATCH] #161: Fix server to start async event loop thread, thread to join properly
- [MINOR] Bump Conformity to 1.21
- [PATCH] Update iSort settings and re-apply iSort
- [PATCH] Use Tox to add tests for PyInotify
- [PATCH] Guarantee Server always has _async_event_loop_thread attribute
- [PATCH] #161: Fix server to start async event loop thread, thread to join properly
- [PATCH] Fix issues #152 and #156 resulting in IndexErrors
- [MINOR] Bump Conformity, Attrs to support Attrs 17.4 - 19.x
- [PATCH] Fix exceptions being thrown for missing job request keys (#154)
- [MAJOR] Step 2 in the message serializer content type header
- [PATCH] Run the event loop in a separate thread. (#150)
- [PATCH] Fix tests broken by latest PyTest version
- [PATCH] Use client timeout for expansions receive responses
- [PATCH] Fix test failures introduced by PyTest 4.2.0
- [MINOR] Fix build failures and preempt Travis deploy failure
- [PATCH] Update test compatibility tools to eliminate warnings
- [MINOR] Allow use of raise_job_errors and catch_transport_errors
- [PATCH] Throttle updates of the heartbeat file
- [PATCH] Support newer versions of several dependencies
- [MINOR] Prevent server shutdown on request with non-unicode context keys (#143)
- [MAJOR] Add support for switching message serializer with content type header
- [PATCH] Fix new flake8 errors
- [PATCH] Add MTU cache to SyslogHandler to improve performance
- [MINOR] A better Syslog logging handler
- [MINOR] Allow setting side_effect while defining the stub
- [MINOR] Simplify stub_action decorator implementation
- [MINOR] If timeout specified, include it in the control header
- [MINOR] Remove deprecated use of "encoding" argument in msgpack.unpackb
- [PATCH] Remove use of deprecated assertEquals
- [PATCH] Remove use of deprecated EntryPoint.load
- [PATCH] Fix usage of deprecated attr.it convert parameter
- [PATCH] Move extra_fields_to_redact from common to server settings
- [MINOR] Allow extra keys to be redacted/censored from logs via settings (#128)
- [MAJOR] Fix bug allowing missing kwargs in Redis, Local, and Stub transports
- [MINOR] Make the polymorphic client and server settings extensible
- [PATCH] Extract server settings to a separate fixture
- [MINOR] Add support for a heartbeat file
- [MINOR] Add managed event loop to all action requests for convenience in Python 3 services
- [MINOR] Add tools to support pytesty testing in pysoa services (#122)
- [MINOR] Improve logging configuration to not conflict with Django
- [MINOR] Fix the resolution of the server idle time metric
- [MINOR] Add support for managing the lifecycle of Django cache engines and connections
- Fix python3.7 build (as well as staging) on Travis CI (#116)
- [MAJOR] Add support for non-blocking client futures
- [MINOR] Apply isort and clean up imports
- [MINOR] Remove unused meta header for retired double-serialization
- [PATCH] Add documentation for the platform-independent PySOA protocol
- [PATCH] Fix big introduced by logging rename
- [MINOR] adding support for errors due insufficient permissions (#108)
- [MINOR] Add option to suppress responses for send-and-forget
- [MAJOR] Make the maximum Redis transport message size configurable
- [MAJOR] Add a response context dict to all responses
- [MINOR] Fix database error sometimes encountered during idle cleanup
- [MINOR] Add directives for using stub_action from test plans
- [MAJOR] Fix bug causing server to shut down on unserializable responses
- [MINOR] Add directives for using Mock from test plans
- [MINOR] Add static Server initializer to support settings and server patching
- [MINOR] Add support for decimal.Decimal in MessagePack serializer
- [MINOR] Bump Conformity
- [MINOR] Remove the transport cache as it is no longer needed
- [MINOR] Add more documentation
- [MINOR] Add a SwitchedAction class to facilitate switch usage
- [MINOR] Add more field names to the set of log redactions
- [PATCH] Import Mock if installed before unittest.mock
- [PATCH] Fix optionality of test plans
- [MINOR] Add idle timer for tracking how long servers stay idle
- [PATCH] Ensure an error response is sent if response too large
- [MINOR] Don't require mock library for stub_service, tests in Python 3
- [MINOR] Use error codes supplied by Conformity
- Properly copy PyTest marks to fixture test cases
- Improve auto-docs using built-in method designed for it
- [MAJOR] Add extensive test plan system with customized test plan syntax
- [PATCH] Add client receive timeout metric
- [MINOR] Better handling of out-of-order responses
- [MAJOR] Fix several expansion bugs and refactor configuration
- [MINOR] Ensure stub_action supports expansions
- [PATCH] Add pip cache to Travis
- [MAJOR] Support sending multiple requests to execute in parallel
- [MINOR] Add stock ability to include other services' status in status
- [MAJOR] Add support for setting a custom timeout when sending a request
- Improve logging defaults and support for Syslog
- Corrected binary distribution wheel
- [MINOR] Censor sensitive fields in the request and response log
- Re-raise InvalidExpansionKey for expansion exception when request has invalid key
NOTE: This release contains a breaking change, not for existing services/code, but for existing metrics graphs and reports utilizing any of the timer metrics PySOA records. Previously, the value these graphs and reports displayed represented a number with millisecond units. Now, they will be a number with microsecond units. As such, without the context of this change in mind, performance will appear to get worse by three orders of magnitude across the board on all existing graphs after a release deployment. - [MAJOR] Switch to microsecond resolution for metrics timers - [MINOR] Add support for metric timer resolution
- Ensure actionless job request causes validation error
- Ensure that action errors also trigger higher level logging
- Fix expansion response format
- Make disable_existing_loggers default to False to allow module-level getLogger
- Ensure logging context works with local services by using a stack
- [PATCH] Fix improper type for logging logger propagate setting
- [PATCH] Refactor test_expansion: renaming with well-known book-author to present intuitive relations, instead of foo/bar/baz
- [PATCH] If no databases are configured, do not attempt Django connection cleanup
- Relax version spec for Six to reduce version conflicts
- Rename test module packages that were redundantly named
- Add support for server introspection
- Add request details to a logging context for all log records
- Bump Conformity
- Add support for controlling request log logging level
- Add support for clean-up operations before and after requests
- Just a little defensive programming so that we don't break status actions
- Refactor expansion methods
- Renaming to differentiate expansion_config init v.s. expansions from request
- When make request, the body takes [value] instead of value, assuming we always call batch endpoints
- When expand, the initial exp_service_requests set to empty, because the upstream service has been called before this method.
- Bump Conformity and remove duplicate msgpack-python dependency
- Add support for auto-reloading code changes in dev environments
- Use Invoke Release for releases going forward
- Fix bug causing response mix-ups with transport cache
- Add ability to fork multiple server processes with the standalone command
- Start request counter at a random value (#50)
- Add .pytest_cache to .gitignore
- Remove mock of randint
- Improve status action to enable abbreviated responses when only the version is needed
- Tweak comment
- Ensure double-import trap doesn't catch entrypoint execution
- Remove duplicate serialization from the server now that clients are no longer requesting serialization
- Bump Attrs, Conformity, and PyTest
- Add standalone helpers to eliminate lots of boilerplace code across services
- Fix a documentation typo
- Attempt two at removing duplicate serialization from the client now that ASGI (incompatible) is removed
- BREAKING CHANGE: Remove the deprecated and unused ASGI Transport
- BREAKING CHANGE: Ensure that the service name passed to the client is always unicode
- Recognize either settings variable name in non-Django services
- Improve the msgpack serializer to support local-date and dateless-time objects
- Add extensive testing documentation and fix bug in ServerTestCase
- Add base status action class for creating easy healthcheck actions
- Ensure metrics are published after server startup
- Fix stub_action bug that made ActionErrors not work as side effects
- Improve transport error messages with service name
- Add stub_action helper for use as decorator or context manager in tests
- Use master_for correctly to reduce number of Redis connections
- Fix issue causing client metrics to not record when transport cache enabled
- Roll back the phase-out of double-serialization due to incompatibility with ASGI-Redis
- Add option for PySOA server to gracefully recover from Redis master failover
- Add support for a cached client transport to increase connection re-use
- Improve server startup log to include additional information
- Don't record receive metrics timer in server if no message received
- Phase out double-serialization in favor of transport-only serialization
- Add a few more metrics to help identify potential client-creation bottlenecks
- Fix #22: Missing key issue when client and server on different Python versions
- Add new direct Redis transport that doesn't use ASGI
- Deprecate ASGI transport due to performance issues
- Add support for recording metrics directly within SOA clients, servers, and transports
- General clean-up and improvements
- Add exception info to error logging
- Add support for in keyword in SOA settings
- Use uuid4 instead of uuid1 to calculate the client ID
- Pin the versions of six and attrs
- LocalTransportSchema server class can be a path or a class object
- Ensure that switches from Client.context are correctly merged with the switches passed to each request
- Improve schema validation for client transport settings, including settings schema for ASGI, local and multi-backend Clients
- Add helpers to ServerTestCase to make calling actions and asserting errors easier
- Merge routing functionality into the Client, and remove ClientRouter
- Exposed expansions to actions.
- Added initial implementation of PySOA expansions to the ClientRouter
- Fixed a small bug in the local transport that broke tests for Python 3.
- Updated the router configuration dictionary format to include type expansions and routes.
- Fixed signature of middleware instantiation in ClientRouter._make_client
- Added logging for critical server errors
- Option to disable harakiri by setting timeout to 0
- Add channel capacities argument to ASGI transport core
- Updated the ASGI transport backend to use the new version of asgi_redis
- Improved the local client transport and renamed to LocalClientTransport
- Added settings schema for ASGI transports
- Added settings classes for ASGI-backed Server and Client
- Made MsgpackSerializer the default serializer for all Servers and Clients
- Updated the ASGI transport backend to support multiple Redis masters and Sentinel
- New ServerTestCase for writing tests against Servers and their actions
- Allow variables to be included with errors and then sends the response down with failed serialization
- Update ThreadlocalClientTransport to support both import paths and objects at initialization
- Make Server class somewhat Django-compatible
- Client middleware uses onion calling pattern
- Changed middleware to work in a callable (new-Django) style
- Fixed an issue wherein the ASGI transport class was violating the ASGI message protocol requirement for unicode message keys when running under Python 2.
- Fixed a bug that caused the Server to crash when instantiating middleware classes from settings.
- Make SOASettings middleware schema consistent with transport and serializer schema
- Updated PySOA to be Python 3 compatible.
- Make stub service a real service with a real server and real actions, using ThreadlocalClientTransport
- ActionResponse automatically converts errors to Error type
- Error type accepts both field and traceback properties, both optional.
- Updated ASGI client transport to support latest asgiref channel name syntax
- Use custom attrs types at all edges, for consistency
- Die when killed, Harakiri when locked
- Refactored Server to have more modular JobRequest processing
- Added Client and Server threadlocal transport classes
- Make Client.call_actions take extra control arguments
- Settings merge values with defaults
- Fixed a bug wherein ActionResponse.action was not being set upon initialization.
- Fix a few incorrect imports
- ASGI transport
- JSON and MessagePack serializers
- Update the client interface with call_action and call_actions
- Request and response validation
- Update Client middleware interface.
- Client now keeps track of request IDs and passes them to Transport.send_request_message
- Updated JobRequest and related schemas
- Added overridable server setup method
- Basic logging support
- Initial tagged development release