-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
elevenlabs analyzer #3850
base: main
Are you sure you want to change the base?
elevenlabs analyzer #3850
Conversation
If write permission API calls was not as expected than only we make read permission API calls | ||
This we only do for those API calls which does not add any resources to secretInfo | ||
*/ | ||
func getResources(client *http.Client, key string, secretInfo *SecretInfo) error { |
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.
Points to Consider for Implementation while getting resource:
-
Aggregate Errors:
Instead of failing on the first error, collect all errors encountered during the process and return them as a single aggregated error at the end. This ensures that users get a complete picture of what went wrong, rather than having to address issues one at a time. -
Graceful Error Handling in CLI:
For the CLI, log errors when checking a specific scope or fetching resource fails, but continue processing other tasks. Improving the user experience and allowing for partial success. -
Concurrent API Calls:
Use Go routines to call APIs concurrently. This will significantly improve performance by reducing the total time spent waiting for API responses.
Let me know your thoughts on these points.
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.
My vote will be for concurrent API calls with error handling for each permission.
If write permission API calls was not as expected than only we make read permission API calls | ||
This we only do for those API calls which does not add any resources to secretInfo | ||
*/ | ||
func getResources(client *http.Client, key string, secretInfo *SecretInfo) error { |
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.
My vote will be for concurrent API calls with error handling for each permission.
3ba85a9
to
4975781
Compare
pkg/analyzer/analyzers/analyzers.go
Outdated
@@ -65,6 +65,7 @@ const ( | |||
AnalyzerTypeAsana | |||
AnalyzerTypeBitbucket | |||
AnalyzerTypeDockerHub | |||
AnalyzerTypeElevenLabs |
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.
nit: indentation
pkg/analyzer/analyzers/analyzers.go
Outdated
@@ -95,6 +96,7 @@ var analyzerTypeStrings = map[AnalyzerType]string{ | |||
AnalyzerTypeAsana: "Asana", | |||
AnalyzerTypeBitbucket: "Bitbucket", | |||
AnalyzerTypeDockerHub: "DockerHub", | |||
AnalyzerTypeElevenLabs: "ElevenLabs", |
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.
nit: indentation
Description:
This Pull requests add a new analyzer for ElevenLabs
Test Cases:
Checklist:
make test-community
)?make lint
this requires golangci-lint)?