Closed
Bug 1452166
Opened 8 years ago
Closed 8 years ago
Create HTTP Edge node that responds with 400 on invalid payloads
Categories
(Data Platform and Tools :: General, enhancement, P1)
Data Platform and Tools
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: frank, Assigned: amiyaguchi)
References
Details
Attachments
(1 file)
Currently we respond with some pieces about improper messages on the production edge server, but if the JSON Validation (or something else) fails the client doesn't know.
This server wouldn't necessarily be hooked in to the rest of the pipeline (though, a CEP attached to it would be nice). It would run messages through validation, and let the client know if things were not validated.
Comment 1•8 years ago
|
||
This seems like it's within the purview of the validation service :amiyaguchi is working on in bug 1454062. Anthony, does this seem like something that would fit that project, possibly in v2?
Flags: needinfo?(amiyaguchi)
| Assignee | ||
Comment 2•8 years ago
|
||
This definitely fits in the flavor of the validation service. One nice thing about the framework I'm using (flask) is that functionality can be modularized into packages called blueprints.[1] A flask blueprint for validating a single ping on-demand can be stood up separately and then integrated into the larger schema validation API.
However, this may not be the right choice if the number of requests per second is above roughly 10k req/sec.[2]
[1] http://flask.pocoo.org/docs/0.12/blueprints/
[2] https://medium.com/@tschundeee/express-vs-flask-vs-go-acc0879c2122
Flags: needinfo?(amiyaguchi)
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → amiyaguchi
Points: --- → 2
Priority: -- → P2
| Assignee | ||
Comment 3•8 years ago
|
||
The main task of this service would be to map the incoming document and version to the schema in the mozilla-pipeline-schema. This logic will also need to be implemented in the v2 release of the validation CI service, so implementing and deploying this would cover a lot of ground.
| Assignee | ||
Updated•8 years ago
|
Priority: P2 → P1
| Assignee | ||
Comment 4•8 years ago
|
||
A work in progress exists at [1]. I've manually tested processed landfill pings from several doctypes with the correct response using schemas from the mozilla-pipeline-schemas HEAD. I will include scripts for syncing data and integration tests for deployment.
uWSGI with nginx is potential deployment option.
[1] https://github.com/acmiyaguchi/edge-validator
| Assignee | ||
Comment 6•8 years ago
|
||
I've set up an endpoint that should 200 or 400. It implements the proposed generic ingestion spec (except for the optional docid that doesn't make sense in this context).[1]
The schemas repo is a submodule within the project, so the submodule can be updated using git commands to update the schemas in the endpoint.
:frank I've tagged you as a reviewer, let me know if this works.
[1] https://docs.google.com/document/d/1PqiF1rF2fCk_kQuGSwGwildDf4Crg9MJTY44E6N5DSk/edit#heading=h.74qlucdvwdg0
Attachment #8975694 -
Flags: review?(fbertsch)
| Reporter | ||
Updated•8 years ago
|
Attachment #8975694 -
Flags: review?(fbertsch) → review+
| Reporter | ||
Comment 7•8 years ago
|
||
Anthony, next steps here would be:
1. Have somebody try this locally with the docker setup you have and a locally-built Fx instance
2. Deploy this to incoming-test.telemetry.mozilla.org (or alternate)
Does that sound right to you?
Flags: needinfo?(amiyaguchi)
| Assignee | ||
Comment 8•8 years ago
|
||
Those sounds like good next steps. I've filed a bug with ops for (2) in bug 1462048, which should hopefully be a straightforward process.
Flags: needinfo?(amiyaguchi)
| Assignee | ||
Comment 9•8 years ago
|
||
This is ready-to-use locally. See the follow-up bugs for deployment.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Updated•4 years ago
|
Component: Pipeline Ingestion → General
You need to log in
before you can comment on or make changes to this bug.
Description
•