-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: aws integration: UI facing QS api for cloud account management #6771
base: main
Are you sure you want to change the base?
Conversation
202bc43
to
7d576aa
Compare
…enerate-connection-url
…get account status
…getting account status
… in list of connected accounts
…t list after agent check in
…ig after account config update
…n of connection url
7d576aa
to
5e1246b
Compare
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 to me! Reviewed everything up to 5e1246b in 1 minute and 53 seconds
More details
- Looked at
1390
lines of code in11
files - Skipped
0
files when reviewing. - Skipped posting
6
drafted comments based on config settings.
1. pkg/query-service/utils/testutils.go:19
- Draft comment:
Consider checking the error returned byos.Remove
in the cleanup function to ensure the temporary file is successfully deleted. This will help avoid leftover files in the system. - Reason this comment was not posted:
Confidence changes required:50%
The functionNewTestSqliteDB
creates a temporary SQLite database for testing purposes. However, it does not handle the case where the temporary file cannot be removed during cleanup. This could lead to leftover files in the system.
2. pkg/query-service/utils/testutils.go:33
- Draft comment:
The TODO comment suggests that passing the DB file path should not be necessary. Consider refactoring the code to eliminate the need for passing the DB file path todao.InitDao
anddashboards.InitDB
. - Reason this comment was not posted:
Confidence changes required:50%
TheNewQueryServiceDBForTests
function initializes the DAO and dashboards with the test database file path. However, the TODO comment suggests that passing the DB file path should not be necessary. This indicates a potential area for improvement in the codebase.
3. pkg/query-service/app/cloudintegrations/controller.go:1
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable in other files as well. - Reason this comment was not posted:
Comment was on unchanged code.
4. pkg/query-service/app/cloudintegrations/repo.go:1
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable in other files as well. - Reason this comment was not posted:
Marked as duplicate.
5. pkg/query-service/app/cloudintegrations/model.go:1
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable in other files as well. - Reason this comment was not posted:
Marked as duplicate.
6. pkg/query-service/app/cloudintegrations/controller_test.go:1
- Draft comment:
Avoid using thecomponent/index.tsx
file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable in other files as well. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_wjestgZYRSegDlj2
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
cloud_provider=? | ||
and id in (%s)`, | ||
strings.Join(idPlaceholders, ", "), |
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.
Can this be used https://jmoiron.github.io/sqlx/#inQueries?
return nil, model.WrapApiError(apiErr, "couldn't upsert cloud account") | ||
} | ||
|
||
// TODO(Raj): Add actual cloudformation template for AWS integration after it has been shipped. |
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.
Just to follow, can you help me understand what does this template do? Does it setup the base or does it do anything with the AWS services?
aH.Respond(w, resp) | ||
} | ||
|
||
func (aH *APIHandler) CloudIntegrationsAgentCheckIn( |
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.
I couldn't find info related to this. Can you share the flow for this? Is it going to be some agent running in cloud provider that invokes this endpoint?
).Methods(http.MethodPost) | ||
|
||
subRouter.HandleFunc( | ||
"/{cloudProvider}/accounts/{accountId}/disconnect", am.EditAccess(aH.CloudIntegrationsDisconnectAccount), |
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.
If I want to reconnect, is it going to be simple toggle, or do I have to start from beginning again?
} | ||
|
||
tsNow := time.Now() | ||
account, apiErr := c.repo.upsert( |
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.
For delete, wouldn't it make more sense to throw error if account doesn't exist rather than upsert?
Summary
Adds Query Service APIs for powering AWS integrations UI
Related Issues / PR's
Contributes to #6544
Important
Adds AWS cloud account management API to Query Service with lifecycle operations and integration tests.
CloudIntegrationsController
incloudintegrations/controller.go
for managing AWS cloud accounts.http_handler.go
for generating connection URLs, listing accounts, checking account status, updating config, and disconnecting accounts.cloudintegrations/repo.go
.AccountRecord
and related models incloudintegrations/model.go
.signoz_cloud_integrations_test.go
to validate AWS account lifecycle operations.server.go
to initializeCloudIntegrationsController
and register routes.This description was created by for 5e1246b. It will automatically update as commits are pushed.