feat: implement Azure connection CRUD endpoints - #317
Conversation
Preview EnvironmentA preview environment can be spun up on demand for this PR.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 941c46ee14
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| from fastapi import APIRouter | ||
| from app.api.v1 import ( | ||
| auth, | ||
| aws_connections, |
There was a problem hiding this comment.
Remove the nonexistent AWS router import
Importing app.api.v1.router now requires app.api.v1.aws_connections, but this commit does not add backend-api/app/api/v1/aws_connections.py and the repo has no such module. In any environment that starts the FastAPI app through this router, startup fails with an import error before the new Azure routes or any existing routes can be registered.
Useful? React with 👍 / 👎.
|
|
||
| # revision identifiers, used by Alembic. | ||
| revision: str = "l1m2n3o4p567" | ||
| down_revision: Union[str, Sequence[str], None] = "k1l2m3n4o567" |
There was a problem hiding this comment.
Point the migration at an existing revision
This down_revision references k1l2m3n4o567, but there is no revision with that ID in backend-api/alembic/versions or in this commit's tree; the existing chain currently reaches d87c3bb49953. Alembic cannot build the migration graph or run upgrades when a migration depends on a missing revision, so databases cannot apply the Azure connection schema change.
Useful? React with 👍 / 👎.
| aws_connections: Mapped[list["AWSConnection"]] = relationship( | ||
| back_populates="user" |
There was a problem hiding this comment.
Add the matching AWSConnection side before back-populating
This relationship declares back_populates="user", but AWSConnection is still the id-only stub and has no user relationship or user_id foreign key. Once SQLAlchemy configures mappers after importing the models, the unmatched back_populates raises an invalid mapper configuration error, breaking unrelated user/database paths until AWSConnection is implemented or this relationship is removed.
Useful? React with 👍 / 👎.
CI: Backend API
One or more checks failed. View logs |
…ched back_populates
|
Fixed: removed aws_connections router import , updated migration down_revision to chain from j2k3l4m5n678, removed unmatched aws_connections back_populates from user.py. The Bandit high severity issue in evidence.py:180 is pre-existing and not introduced by this PR |
Summary
Type of Change
Affected Components
/backend-api/frontend/engine(collectors / policies)/security/infrastructure/.github/workflows/docsMotivation
Testing Done
Security Considerations
Breaking Changes
Rollback Plan
Checklist
Screenshots