-
Notifications
You must be signed in to change notification settings - Fork 594
feat: RPC modernization APIs #9631
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
base: main
Are you sure you want to change the base?
Conversation
chore: Merge main branch
feat: api endpoint for docs submitted to the rpc
feat: optimize fetching persons
* feat: adding rev to demo doc creation * fix: remove attempt to control required
* feat: Add @requires_api_token decorator * refactor: Use @requires_api_token * refactor: Tweak api token endpoints This might be drifting from the design intent, but at least uses the defined endpoint values. Further cleanup may well be needed.
chore: Merge main into feat/rpc-api
* feat: subject_id -> Person api call * doc: Add error responses to openapi spec
chore: Merge main into feat/rpc-api
chore: Merge main into feat/rpc-api
# Conflicts: # ietf/doc/models.py
chore: Merge main into feat/rpc-api
# Conflicts: # ietf/doc/models.py
feat: Add API call to get normative references
* refactor: Separate demo logic * chore: Skip tests
* chore: Remove line noise * chore: Add RPC references API call to OpenAPI spec * chore: Update rpcapi.yaml Co-authored-by: Robert Sparks <[email protected]> --------- Co-authored-by: Robert Sparks <[email protected]>
* chore: Remove more line noise * fix: Fix OpenAPI spec errors
# Conflicts: # docker/configs/settings_local.py
* feat: person search endpoint * refactor: address review comments * improved naming of operation/components in API schema * reused Person schema component * added serializers_rpc.py * chore: RpcPersonSerializer -> PersonSerializer Better matches the hand-written schema. * fix: search for entire term, not word-by-word * fix: only look at name/plain in search Including ascii / ascii_short might be useful eventually, but since we only show plain_name in the response it can cause confusing results. By the same reasoning we could remove email__address as well, but that's useful and I expect we'll include email addresses in our response soon anyway.
chore: merge main into feat/rpc-api
chore: merge main into feat/rpc-api
* refactor: rpc_person -> PersonViewSet * refactor: rpc_subject_person -> SubjectPersonView * refactor: rpc_persons -> RpcPersonsView * refactor: move get_persons into PersonViewSet Changes the interface to return a list of Persons instead of a map from ID to name. * refactor: rpc_draft -> DraftViewSet * refactor: drafts_by_names -> DraftsByNameView * refactor: submitted_to_rpc -> DraftViewSet * refactor: rfc_original_stream -> RfcViewSet * refactor: rpc demo APIs -> viewset * refactor: get_draft_refs -> DraftViewSet * refactor: persons_by_email -> PersonViewSet * refactor: rfc_authors -> RfcViewSet * refactor: draft_authors -> DraftViewSet * refactor: avoid \x00 in regex validator Gets turned into a literal nul somewhere in the process of generating a schema and building a Python client for purple. This has the same effect but avoids the nul. * fix: missing arg on references() action * style: ruff, remove unused imports * style: ruff ruff * chore: remove rpcapi.yaml * refactor: move API to /api/purple Side effect is that the purple API client is named PurpleApi instead of RpcApi. * fix: get_draft_authors returns DraftWithAuthors * fix: distinguish CharField flavors * fix: no serializer validators for draft name/title This prevents at least one existing draft from being looked up. * fix: get_draft_authors works with str, not int * Revert "refactor: avoid \x00 in regex validator" This reverts commit 63f40cf * Revert "Revert "refactor: avoid \x00 in regex validator"" (#9111) This reverts commit d8656f4.
chore: merge main into feat/rpc-api
# Conflicts: # requirements.txt
feat: expose consensus in submission api
* refactor: central def of subseries doc types * feat: subseries doc API * refactor: optimize queries via prefetch Reduced 4500 to 18 queries * chore: remove debug * fix: fix serialization of draft field * refactor: clean up prefetch a bit * feat: filter by subseries type * fix: restore max_limit for RFC pagination
* feat: add subseries to RfcMetadataSerializer * feat: titlepage_name for RfcAuthorSerializer Always blank for now * chore: update copyrights * refactor: use py3.12 typing syntax
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.
First pass inspecting "can this safely come into main".
I haven't done the "are the apis all sufficiently access guarded" read yet.
APP_API_TOKENS = { | ||
"ietf.api.views.ingest_email_test": ["ingestion-test-token"] | ||
"ietf.api.views.ingest_email_test": ["ingestion-test-token"], # Not a real secret | ||
"ietf.api.views_rpc" : ["devtoken"], # For RPC dev work only, remove before merging to main!!! |
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.
Replace this with "not a real secret"?
} | ||
|
||
APP_API_TOKENS = { | ||
"ietf.api.views_rpc" : ["devtoken"], |
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.
not a real secret?
] | ||
|
||
# add routers at the end so individual routes can steal parts of their address | ||
# space (specifically, ^person/ routes so far) |
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.
verify that this is current?
@@ -0,0 +1,98 @@ | |||
# Copyright The IETF Trust 2023-2025, All Rights Reserved |
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.
Should this capability come to main? I'm thinking it shouldn't.
def part_of(self): | ||
return self.related_that("contains") | ||
|
||
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.
whitespace
return self.docevent_set.filter(type="iesg_approved").order_by("-time").first() | ||
elif self.stream_id in ["iab", "irtf", "ise"]: | ||
return self.docevent_set.filter(type="requested_publication").order_by("-time").first() | ||
#elif self.stream_id == "editorial": #TODO |
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.
we have one now to look at and then add this branch to the logic
feat: add consensus on FullDraftSerializer
No description provided.