-
Notifications
You must be signed in to change notification settings - Fork 60
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
Query non-reference fields and subclass-specific fields through path queries #2662
Query non-reference fields and subclass-specific fields through path queries #2662
Conversation
- Query subclass specific fields with path queries
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.
Great job on this fix 👍 I have only a few remarks/ suggestions for further improvement. I also noticed several new exception throws in the implementation, which seem important, but none of these are tested. Keep up the good work!
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.
Looks good 👍 But please keep a note of the exceptions testing for a next iteration
Checklist for QA:
What works:From the UI
What doesn't work:
Bug or feature?:Based on what I read in the ticket I'd expect that the query below would give results? Could be I'm doing something wrong here. Request: Response: Stack traceThis change seems to break the Katalogus in the UI: Katalogus
|
@stephanie0x00 Should hopefully be fixed now! |
Yes fixed! |
* main: (51 commits) Fix static files for container images/Debian packages when DEBUG is on (#2742) OOI selection at Aggregate report does not remember changed selection (#2619) fix schema errors on empty / missing schemas (#2744) Updated `phonenumbers` and `django-phonenumber-field` (#2757) Remove octopoes coverage workflow (#2755) Bump actions/configure-pages from 4 to 5 (#2745) Add xtdb-cli tool to Octopoes (#2733) Dont report vulnerabilities without version info of the software for snyk (#2730) Feature/boefjes to oci images (#2709) Query non-reference fields and subclass-specific fields through path queries (#2662) Fix in System Specific (#2732) Plugins overview in appendix not showing any plugins (#2694) Feat stepper design v2 (#2704) Undo project-directory in Rocky (#2734) Remove Docker Compose: "version" (#2718) Upgrade `pre-commit` hooks (#2729) Fix #1739 (#2705) Improve generate report (#2633) Fix critical vulnerability counter (#2712) Fix pdf alignment (#2674) ...
Changes
This extends the path query functionality by handling cases where the path ends on a non-relation field, such as
Hostname.name
(non-relation field) versusHostname.network
(relation-field). Furthermore, we were having issues querying subclass-specific fields. Consider for example:With the first feature we can now query
URL.web_url.scheme
and with the second feature we can now queryURL.web_url.netloc
.Querying non-reference fields
Before:
After:
Querying subclass-specific fields
Before:
After:
Note for QA
This is a bit hard to QA as it is not part of regular flows yet but an internal API feature. One way to check this is trying this configuration from the ticket at http://localhost:8001/docs for both the
/{client}/query
and/{client}/query-many
:Issue link
Closes #2579
Demo
See the new tests.
Code Checklist
Communication
.env
changes files if required and changed the.env-dist
accordingly.Checklist for code reviewers:
Copy-paste the checklist from the docs/source/templates folder into your comment.
Checklist for QA:
Copy-paste the checklist from the docs/source/templates folder into your comment.