feat: blast radious api #4355
Closed
ulemons wants to merge 1 commit into
Closed
Conversation
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
Contributor
There was a problem hiding this comment.
PR titles must follow Conventional Commits. Love from, Your reviewers ❤️.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds authenticated Blast Radius API stubs that validate requests before returning 501 NOT_IMPLEMENTED.
Changes:
- Adds submit/poll routes and Zod validation.
- Adds a shared
NotImplementedError. - Documents endpoints in OpenAPI.
Review findings: poll documentation omits its possible 400 response and contradicts validation behavior. The PR title also misspells “radius” and lacks the required JIRA key.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
services/libs/common/src/index.ts |
Exports the new error. |
services/libs/common/src/errors/http.ts |
Defines the 501 error. |
backend/src/api/public/v1/packages/getAkritesExternalBlastRadiusSubmit.ts |
Implements the submit stub. |
backend/src/api/public/v1/packages/getAkritesExternalBlastRadiusPoll.ts |
Implements the poll stub. |
backend/src/api/public/v1/packages/blastRadius.ts |
Defines request schemas. |
backend/src/api/public/v1/akrites-external/openapi.yaml |
Documents the API contract. |
backend/src/api/public/v1/akrites-external/index.ts |
Registers scoped routes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+43
to
+45
| // Same read:advisories scope as Advisories above (see the contract's Blast Radius | ||
| // tag). The reachability pipeline isn't built yet, so every request 501s — see | ||
| // getAkritesExternalBlastRadiusSubmit/Poll — but the route/scope wiring is real. |
Comment on lines
+965
to
+966
| Not implemented — always responds 501, regardless of analysisId. See | ||
| the Blast Radius tag. |
Comment on lines
+977
to
+983
| responses: | ||
| '501': | ||
| description: Not implemented yet. | ||
| content: | ||
| application/json: | ||
| schema: | ||
| $ref: '#/components/schemas/Error' |
Comment on lines
+9
to
+10
| // No jobs are ever created (see submitAkritesExternalBlastRadiusJob), so there is | ||
| // nothing to poll yet — always 501, regardless of analysisId. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Type of change
JIRA ticket