-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat(cdp): spike out new REST API in property-defs-rs #29096
base: master
Are you sure you want to change the base?
Conversation
12347d0
to
eab1854
Compare
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.
PR Summary
This PR introduces a new REST API in the property-defs-rs service to replace Django's property definitions API, implementing query building, routing, and constants management.
- Critical bug in
routing.rs
:gen_url
function hardcodes "new_value" instead of using actualnew_offset
value for pagination - Missing error handling in
routing.rs
: URI unwrapping can panic when scheme/authority are missing - Incorrect type in
routing.rs
:is_seen_on_filtered_events
defined as String but used as boolean - Syntax error in
Cargo.toml
:url.workspace = true
should beurl = { workspace = true }
- Empty results array in
routing.rs
: Query results not being populated into PropDefResponse
8 file(s) reviewed, 10 comment(s)
Edit PR Review Bot Settings | Greptile
4d3ab9f
to
67b3207
Compare
👋 added you as a reviewer @oliverb123 🙇 my goal is to (among other things) do a quick walkthrough of this iteration of the new API tomorrow at our huddle, get anything that concerns you straightened out, then hopefully land it and iterate in follow-on PRs from there. At this point the API/query plumbing should be a no-op, so I assume this plan is safe 🤞 ...but I'm just getting back into Rust now, so feel free to push back on this idea if you see something ghastly! |
…fs query construction
…factor to split out api::v1 child modules
…-approved count query
…ke out next/prev URL handling
…ODO: fight borrow checker and DRY the queries up!
… in favor of prop def aliases list
…bug log them as we iterate
16fd8f4
to
464892b
Compare
👋 @oliverb123 FYI for your review pass on this:
☝️ I'm fine iterating on that later as it isn't blocking anything, but I'm sure I'm missing something conceptual (and perhaps simple?) about the lifetimes of the builder vs. parameters I'm binding to it right now Thanks again! |
Problem
CDP team aims to replace the property definitions API in the Django monolith with a new API implemented in the new
property-defs-rs
service.Changes
The PR scaffolds out the basic API, including new
axum
GET route, request parameter extraction, and a pair of queries that for the core of the project-scoped property definitions APIs in the Django service.There's lots more to do here, but I want to land this first iteration before it gets too large. TODOs include:
axum
/serde_json
friendly wayHow did you test this code?
Locally, so far (see above)