-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix: Swagger UI for indexer is a stub (#5051, #5228) #5160
Fix: Swagger UI for indexer is a stub (#5051, #5228) #5160
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #5160 +/- ##
===========================================
+ Coverage 84.35% 84.49% +0.13%
===========================================
Files 148 150 +2
Lines 18278 18449 +171
===========================================
+ Hits 15418 15588 +170
- Misses 2860 2861 +1
|
f37ad27
to
8e2f848
Compare
New spec is visible here |
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.
Nicely done!
74117a4
to
b8ff22d
Compare
src/azul/openapi/spec.py
Outdated
|
||
|
||
@attr.s(auto_attribs=True, frozen=True, kw_only=True) | ||
class AuxSpec: |
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.
class AuxSpec: | |
class CommonEndpointSpecs: |
src/azul/openapi/spec.py
Outdated
return { | ||
'method_spec': { | ||
|
||
'summary': 'Describe current version of the Azul service', |
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.
or indexer
src/azul/openapi/spec.py
Outdated
return { | ||
'method_spec': { | ||
|
||
'summary': 'Return OpenAPI specifications for this service', |
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.
'summary': 'Return OpenAPI specifications for this service', | |
'summary': 'Return OpenAPI specifications for this REST API', |
Please check if there are more of these cases, where documentation isn't general enough or needs to be parameterized.
'tags': ['Auxiliary'] | ||
} | ||
|
||
def full_health(self) -> JSON: |
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.
Many of these can be properties.
lambdas/indexer/app.py
Outdated
def basic_health(): | ||
return app.health_controller.basic_health() | ||
|
||
|
||
@app.route('/health/cached', methods=['GET'], cors=True) | ||
@app.route('/health/cached', methods=['GET'], cors=True, **aux_spec.cached_health()) |
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.
L here and in several other places.
lambdas/indexer/app.py
Outdated
@@ -103,14 +110,17 @@ def static_resource(file): | |||
return app.swagger_resource(file) | |||
|
|||
|
|||
@app.route('/openapi', methods=['GET'], cors=True) | |||
aux_spec = AuxSpec(app_name='indexer') |
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.
aux_spec = AuxSpec(app_name='indexer') | |
common_specs = AuxSpec(app_name='indexer') |
lambdas/indexer/app.py
Outdated
'description': 'Contents of the notification', | ||
'required': True, | ||
**json_content(schema.object( | ||
match=schema.object( |
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.
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.
That's correct. I'll avoid requesting concurrent reviews for these PRs to avoid conflicts.
@@ -151,7 +161,43 @@ def update_health_cache(_event: chalice.app.CloudWatchEvent): | |||
app.health_controller.update_cache() | |||
|
|||
|
|||
@app.route('/{catalog}/{action}', methods=['POST']) | |||
@app.route('/{catalog}/{action}', methods=['POST'], method_spec={ |
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.
This should mention the HMAC header and briefly explain how to compute it.
b8ff22d
to
0a01a03
Compare
0a01a03
to
d94c936
Compare
3db488f
to
ffabb56
Compare
Due to my changes, |
d55cf96
to
59b9011
Compare
59b9011
to
52f1a38
Compare
52f1a38
to
874f464
Compare
Connected issues: #5051 #5228
Checklist
Author
develop
issues/<GitHub handle of author>/<issue#>-<slug>
partial
label to PR or this PR completely resolves all connected issues1 when the issue title describes a problem, the corresponding PR
title is
Fix:
followed by the issue titleAuthor (reindex, API changes)
r
tag to commit title or this PR does not require reindexingreindex
label to PR or this PR does not require reindexinga
(compatible changes) orA
(incompatible ones) tag to commit title or this PR does not modify the Azul service APIAPI
label to connected issues or this PR does not modify the Azul service APIAuthor (chains)
base
label to the blocking PR or this PR is not chained to another PRchained
label to this PR or this PR is not chained to another PRAuthor (upgrading)
u
tag to commit title or this PR does not require upgradingupgrade
label to PR or this PR does not require upgradingAuthor (operator tasks)
Author (hotfixes)
F
tag to main commit title or this PR does not include permanent fix for a temporary hotfixprod
branch has no temporary hotfixes for any connected issuesAuthor (before every review)
develop
, squashed old fixupsmake requirements_update
or this PR does not touch requirements*.txt, common.mk, Makefile and DockerfileR
tag to commit title or this PR does not touch requirements*.txtreqs
label to PR or this PR does not touch requirements*.txtmake integration_test
passes in personal deployment or this PR does not touch functionality that could break the ITPeer reviewer (after requesting changes)
Uncheck the Author (before every review) checklists.
Peer reviewer (after approval)
Primary reviewer (after requesting changes)
Uncheck the before every review checklists. Update the
N reviews
label.Primary reviewer (after approval)
demo
orno demo
no demo
no sandbox
N reviews
label is accurateOperator (before pushing merge the commit)
reindex
label andr
commit title tagno demo
develop
dev
and addedsandbox
label or PR is labeledno sandbox
anvildev
or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
sandbox
deployment or PR is labeledno sandbox
anvilbox
deployment or PR is labeledno sandbox
sandbox
or this PR does not remove catalogs or otherwise causes unreferenced indicesanvilbox
or this PR does not remove catalogs or otherwise causes unreferenced indicessandbox
or this PR does not require reindexingsandbox
anvilbox
or this PR does not require reindexingsandbox
sandbox
or this PR does not require reindexingsandbox
anvilbox
or this PR does not require reindexingsandbox
Operator (after pushing the merge commit)
base
dev
or PR is labeledno sandbox
anvildev
or PR is labeledno sandbox
dev
1dev
1anvildev
1anvildev
1dev
anvildev
1 When pushing the merge commit is skipped due to the PR being
labelled
no sandbox
, the next build triggered by a PR whose merge commit ispushed determines this checklist item.
Operator (reindex)
dev
or this PR does not remove catalogs or otherwise causes unreferenced indicesanvildev
or this PR does not remove catalogs or otherwise causes unreferenced indicesdev
or this PR does not require reindexinganvildev
or this PR does not require reindexingdev
or this PR does not require reindexinganvildev
or this PR does not require reindexingdev
deployment or this PR does not require reindexinganvildev
deployment or this PR does not require reindexingOperator
Shorthand for review comments
L
line is too longW
line wrapping is wrongQ
bad quotesF
other formatting problem