Skip to content
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

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

kashifkhan0771
Copy link
Contributor

@kashifkhan0771 kashifkhan0771 commented Jan 23, 2025

Description:

This Pull requests add a new analyzer for ElevenLabs

Test Cases:

Screenshot from 2025-01-28 11-38-10
Screenshot from 2025-01-28 12-36-36

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@kashifkhan0771 kashifkhan0771 marked this pull request as ready for review January 27, 2025 14:33
@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner January 27, 2025 14:33
@kashifkhan0771 kashifkhan0771 changed the title elevenlabs analyzer [WIP] elevenlabs analyzer Jan 27, 2025
@kashifkhan0771 kashifkhan0771 requested a review from a team as a code owner January 28, 2025 07:43
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 {
Copy link
Contributor Author

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:

  1. 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.

  2. 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.

  3. 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.

Copy link
Contributor

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.

pkg/analyzer/analyzers/elevenlabs/elevenlabs.go Outdated Show resolved Hide resolved
pkg/analyzer/analyzers/elevenlabs/elevenlabs.go Outdated Show resolved Hide resolved
pkg/analyzer/analyzers/elevenlabs/elevenlabs.go Outdated Show resolved Hide resolved
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 {
Copy link
Contributor

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.

@kashifkhan0771 kashifkhan0771 force-pushed the feat/oss-97-elevenlabs-analyzer branch from 3ba85a9 to 4975781 Compare January 29, 2025 14:04
@@ -65,6 +65,7 @@ const (
AnalyzerTypeAsana
AnalyzerTypeBitbucket
AnalyzerTypeDockerHub
AnalyzerTypeElevenLabs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indentation

@@ -95,6 +96,7 @@ var analyzerTypeStrings = map[AnalyzerType]string{
AnalyzerTypeAsana: "Asana",
AnalyzerTypeBitbucket: "Bitbucket",
AnalyzerTypeDockerHub: "DockerHub",
AnalyzerTypeElevenLabs: "ElevenLabs",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indentation

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants