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

Add basic synchronous API for triggering reconcilation runs #42

Closed
chadlwilson opened this issue Oct 25, 2021 · 1 comment
Closed

Add basic synchronous API for triggering reconcilation runs #42

chadlwilson opened this issue Oct 25, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request size:S small items

Comments

@chadlwilson
Copy link
Collaborator

Context / Goal

To support performance testing it would be useful to have a basic API to trigger a reconcilation run, and wait for it to be complete.

This way, when implementing #26 we can use simple timed HTTP calls. Ideally the response can tell us various timings that we can use for reporting purposes.

Expected Outcome

  • Add an HTTP/JSON REST API that
    • allows a rec run to be triggered by identifier against a pre-configured source and target DB with pre-configured queries
    • reports the results of the rec run back to the user synchronously

Out of Scope

  • Creating a truly async API from an HTTP perspective using events/websockets/polls etc. With reactive programming on source/target side, we can probably make this work just fine without anything more complex at this stage.
  • Worrying about API docs or anything too fancy at this stage.

Additional context / implementation notes

@chadlwilson chadlwilson added the enhancement New feature or request label Oct 25, 2021
@chadlwilson chadlwilson self-assigned this Oct 25, 2021
chadlwilson added a commit that referenced this issue Oct 25, 2021
Currently directly serializes the returns the `MigrationRun` which is probably not desirable.
chadlwilson added a commit that referenced this issue Oct 25, 2021
Believe this is more canonical usage anyway.
chadlwilson added a commit that referenced this issue Oct 25, 2021
Needs more work, however start to decouple the persisted results model from the returned model.
@chadlwilson
Copy link
Collaborator Author

Basic API added. Paths need changing, but runs can be triggered with

echo '{ "datasetId": "test-dataset" }' | http POST http://localhost:8080/runs

Returning

{
    "completedDurationSeconds": 2.7854958,
    "completedTime": "2021-10-25T14:30:10.290869700Z",
    "createdTime": "2021-10-25T14:30:07.505373900Z",
    "datasetId": "test-dataset",
    "id": 29,
    "results": {
        "sourceRows": 1003,
        "targetRows": 1003
    }
}

@chadlwilson chadlwilson added the size:S small items label Nov 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:S small items
Projects
None yet
Development

No branches or pull requests

1 participant