Merged
Conversation
…key generator interface
…spec_helper: improve tests
Member
Author
davidor
approved these changes
Mar 4, 2019
Contributor
davidor
left a comment
There was a problem hiding this comment.
I think this is good 👍
There are a few things that we discussed in other PRs that can be addressed in future PRs.
Contributor
|
bors r+ |
Contributor
|
👎 Rejected by PR status |
Contributor
|
bors r+ |
bors Bot
added a commit
that referenced
this pull request
Mar 4, 2019
78: Feature/delete service stats r=davidor a=eguzki
Given a Service, delete all its Stats
The number of stats from a given service A can be huge. It is roughly estimated that there are 300K keys of stats per metric, application, user and year. Deleting all stat keys at once is not a good idea.
Stats deletion task partitioning system has been implemented using resque async background jobs
Internal endpoint has been published for that task:
```
DELETE /internal/services/#{service_id}/stats
```
Request body
```yaml
openAPIV3Schema:
properties:
deletejobdef:
properties:
applications:
type: array
metrics:
type: array
users:
type: array
from:
type: int64
to:
type: int64
required:
- applications
- metrics
- users
- from
- to
```
Example
```sh
$ cat delete_job.json
{
"deletejobdef": {
"applications": ["1"],
"metrics": ["5"],
"from": 1483228800,
"to": 1483228800,
"users": []
}
}
$ curl -v -X DELETE -d '@delete_job.json' -H "Content-Type: application/json" http://127.0.0.1:3000/internal/services/c2f28d6c-aa75-46d4-b5d8-5bc8d2dc0cff/stats
```
Doc about implementation design is included
Co-authored-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
Co-authored-by: Eguzki Astiz Lezaun <eguzki.astiz@gmail.com>
Contributor
Build succeeded |
Contributor
|
@eguzki I just tried this in staging and noticed a problem. Some jobs fail with The problem is that this raises an exception when a user reports a response code that Apisonator does not track, for example, 304. Instead of raising, we should just ignore the code. |
Member
Author
bors Bot
added a commit
that referenced
this pull request
Mar 5, 2019
82: Fix/response code processing r=davidor a=eguzki * Fix #78 (comment) Do not raise an exception when a user reports a response code that Apisonator does not track, for example, 304. * Do not account for untracked http response codes, currently, for example 304 Co-authored-by: Eguzki Astiz Lezaun <eastizle@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Given a Service, delete all its Stats
The number of stats from a given service A can be huge. It is roughly estimated that there are 300K keys of stats per metric, application, user and year. Deleting all stat keys at once is not a good idea.
Stats deletion task partitioning system has been implemented using resque async background jobs
Internal endpoint has been published for that task:
Request body
Example
$ cat delete_job.json { "deletejobdef": { "applications": ["1"], "metrics": ["5"], "from": 1483228800, "to": 1483228800, "users": [] } } $ curl -v -X DELETE -d '@delete_job.json' -H "Content-Type: application/json" http://127.0.0.1:3000/internal/services/c2f28d6c-aa75-46d4-b5d8-5bc8d2dc0cff/statsDoc about implementation design is included