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

DM-11745: Investigate wrapping external function calls in ap_verify #10

Merged
merged 2 commits into from Dec 19, 2017

Conversation

kfindeisen
Copy link
Member

@kfindeisen kfindeisen commented Nov 9, 2017

This PR adds a new decorator, _MetricsRecovery, to pipeline_driver for handling the shared metrics/job/metadata logic. Despite the discussion on DM-10779, I've opted not to replace the existing adapters with an assignment-like syntax. The reasons are twofold:

  • neither ap_verify's strategy for handling measurements nor ap_pipe's API are finalized yet, and having explicit adapter functions will make it easier to absorb any changes
  • ap_verify makes assumptions about how it interacts with ap_pipe (for example, any metadata must be in the getFullMetadata() format, and ap_pipe is expected to internalize details like its system of sub-repositories), and being able to document those assumptions explicitly will make the code easier to maintain

We can always replace the explicit wrappers with statements like _ingestRaws = _MetricsRecovery(apPipe.doIngest) later, once the ap_* packages have stabilized.

@kfindeisen kfindeisen requested review from ebellm and removed request for ebellm November 9, 2017 21:30
The docstring was most likely lost during the conversion of
pipeline_driver to a class and back to a collection of functions.
The _MetricsRecovery decorator splits both the logic and the common
API out of the individual task wrappers. The wrappers have been
preserved in their explicit form for future flexibility.
@kfindeisen kfindeisen merged commit c6afd76 into master Dec 19, 2017
@kfindeisen kfindeisen deleted the tickets/DM-11745 branch November 30, 2018 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants