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
(PDB-1072) Add endpoint to mirror report command structure. #1193
(PDB-1072) Add endpoint to mirror report command structure. #1193
Conversation
open to suggestions on renaming this endpoint |
hash, puppet_version, receive_time, report_format, | ||
start_time, end_time, transaction_uuid, status, environment, | ||
configuration_version, certname FROM (%s) distinct_names %s%s%s) %s" | ||
sql sql inner-order-by limit-clause offset-clause order-by-clause) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to think about whether we have better options than this pattern. The issue is limit/offset on API responses that comprise multiple rows.
Test PASSed. |
e8bf0b5
to
019ec8b
Compare
Test PASSed. |
2518125
to
6dedcea
Compare
Test FAILed. |
Test PASSed. |
[puppetlabs.puppetdb.middleware :refer [verify-accepts-json validate-query-params | ||
wrap-with-paging-options]] | ||
[puppetlabs.puppetdb.jdbc :as jdbc] | ||
[puppetlabs.puppetdb.http :as http])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all these dependencies necessary?
So here is the thing, this new endpoint looks almost exactly like /reports ... but without the downstream information like events ... I'm wondering if we should just call this /reports instead, and let people use the extract field selector capability if they want the old report format? That would save us from having to create a brand new end-point. |
that's fine with me in concept, but we'll have to extend extract to cover non-queryable fields, since the event-reports field of this endpoint is not queryable. Not sure what that will take; I'll give it some thought. |
6dedcea
to
fd3602d
Compare
actually, that's not going to be an issue in the slightest. Happy to take this route. |
Test FAILed. |
CLA signed by all contributors. |
57972b7
to
f8785fe
Compare
Test FAILed. |
fe7a9aa
to
1f15228
Compare
Test FAILed. |
Test FAILed. |
1f15228
to
969f545
Compare
Test FAILed. |
969f545
to
85acb27
Compare
Test FAILed. |
@pljenkinsro retest this please |
Test FAILed. |
@pljenkinsro retest this please |
Test FAILed. |
85acb27
to
e1479b9
Compare
Test FAILed. |
@pljenkinsro retest this please |
Test FAILed. |
@pljenkinsro retest this please |
Test FAILed. |
@pljenkinsro retest this please |
Test PASSed. |
e1479b9
to
3ffb104
Compare
Test FAILed. |
3ffb104
to
973e08f
Compare
Test FAILed. |
@pljenkinsro retest this please |
Test FAILed. |
|
||
(defn remove-receive-times | ||
(defn treat-reports-response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you come up with a more descriptive function name here? Maybe munge-for-compare, or prep-for-compare or something like that?
This commit changes the /v4/reports endpoint to mirror the store-report command structure -- this amounts to an additional field containing resource-events. The upshot of this is that the api response can be easily munged for resubmission as a report. In an HA context, this will allow us to transfer reports from one database to another over HTTP without needing a second query for the events associated with a report.
973e08f
to
5b015a2
Compare
Test FAILed. |
@pljenkinsro retest this please |
Test PASSed. |
+1 from me |
…reports (PDB-1072) Add endpoint to mirror report command structure.
This commit adds an endpoint called event-reports, the return value of which
can be easily munged for resubmission as a report. In an HA context, this will
allow us to transfer reports from one database to another over HTTP without
needing a second query for the events associated with a report.