Summary
In order to fully test this plugin we need to validate the metrics that are generated. The use of subprocesses and multiprocessing introduces unique challenges that must be addressed.
Success Criteria
There is a MockServer service to capture all outbound requests.
The lifecycle of the MockServer requests is managed via a pytest fixture that sets up expectations on MockServer at the beginning of the test and calls reset at the end of the test.
A helper function is in place to validate metrics captured on the MockServer
A basic test is added to exercise an airflow task.
Notes
Azure pipelines allows configuring docker servicesMockServer provides functionality to set up endpoints which are expected to be hit and to check and validate all requests that it receives. The goal is to have mock server intercept all calls to new relic's metric API.
Proposed Implementation
Update the plugin to be able to run a development mode, taking a configurable url and overriding the HTTPSConnectionPool to ignore ssl certificates or using HTTPConnectionPool.
Add a MockServer service to azure pipelines
Implement a pytest fixture to control lifecycle of expectations in MockServer
Add a helper function to query MockServer for metrics / yield a list of metrics from the pytest fixture described in the previous step
Implement a basic test exercising an airflow task flow
Summary In order to fully test this plugin we need to validate the metrics that are generated. The use of subprocesses and multiprocessing introduces unique challenges that must be addressed.
Success Criteria
Notes Azure pipelines allows configuring docker services MockServer provides functionality to set up endpoints which are expected to be hit and to check and validate all requests that it receives. The goal is to have mock server intercept all calls to new relic's metric API.
Proposed Implementation