TykTechnologies / tyk

Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
Other
9.76k stars 1.09k forks source link

[TT-12879] Replace Benthos with Bento #6512

Closed buraksezer closed 2 months ago

buraksezer commented 2 months ago

User description

Replaces github.com/TykTechnologies/benthos with github.com/warpstreamlabs/bento

See TT-12879 for details


PR Type

enhancement, dependencies


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
manager.go
Update import paths to use Bento instead of Benthos           

internal/streaming/manager.go - Replaced import paths from Benthos to Bento.
+2/-2     
portal_output.go
Update import paths to use Bento instead of Benthos           

internal/portal/portal_output.go - Replaced import paths from Benthos to Bento.
+2/-2     
portal_output_test.go
Update test import path to use Bento                                         

internal/portal/portal_output_test.go - Replaced import path from Benthos to Bento in test file.
+1/-1     
Dependencies
go.mod
Replace Benthos with Bento and update dependencies             

go.mod
  • Removed Benthos dependency.
  • Added Bento dependency.
  • Updated several other dependencies to newer versions.
  • +20/-17 
    Additional files (token-limit)
    go.sum
    ...                                                                                                           

    go.sum ...
    +251/-39

    ๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    github-actions[bot] commented 2 months ago

    PR Reviewer Guide ๐Ÿ”

    โฑ๏ธ Estimated effort to review: 3 ๐Ÿ”ต๐Ÿ”ต๐Ÿ”ตโšชโšช
    ๐Ÿงช No relevant tests
    ๐Ÿ”’ No security concerns identified
    โšก Key issues to review

    Dependency Import
    Ensure that the new dependency 'github.com/warpstreamlabs/bento' is compatible and does not introduce breaking changes or deprecated functionalities that could affect the system's stability. Dependency Management
    Review the updated and newly added dependencies in the 'go.mod' file for compatibility issues, licensing, and potential security vulnerabilities.
    github-actions[bot] commented 2 months ago

    PR Code Suggestions โœจ

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Replace the blank import with a named import to avoid potential side-effects ___ **Replace the blank import of "github.com/warpstreamlabs/bento/public/components/pure"
    with a named import or remove it if it's not needed. Blank imports should be used
    carefully as they can lead to side-effects that are hard to track.** [internal/portal/portal_output.go [11]](https://github.com/TykTechnologies/tyk/pull/6512/files#diff-5225b7c3a3d3677eed2edb98be754e5cc70a124b0af26485511a0528f535048bR11-R11) ```diff -_ "github.com/warpstreamlabs/bento/public/components/pure" +"github.com/warpstreamlabs/bento/public/components/pure" ```
    Suggestion importance[1-10]: 8 Why: The suggestion correctly identifies a potential issue with using blank imports, which can lead to unintended side-effects. Replacing it with a named import or removing it if unnecessary improves code clarity and maintainability.
    8
    Replace the blank import with a named import to enhance code clarity ___ **Similar to the previous suggestion, consider replacing the blank import of
    "github.com/warpstreamlabs/bento/public/components/all" with a named import or
    remove it if it's unnecessary. This will improve clarity and maintainability of the
    code.** [internal/streaming/manager.go [14]](https://github.com/TykTechnologies/tyk/pull/6512/files#diff-8cda02479026085d17a6c5559a15bf59638174d16fb5f3ad65bebcecb25ad8d8R14-R14) ```diff -_ "github.com/warpstreamlabs/bento/public/components/all" +"github.com/warpstreamlabs/bento/public/components/all" ```
    Suggestion importance[1-10]: 8 Why: This suggestion is valid as it addresses the same issue of blank imports, which can obscure code functionality and lead to maintenance challenges. Replacing or removing the blank import enhances code clarity.
    8
    Maintainability
    Review and justify the addition of new dependencies for compatibility and necessity ___ **Ensure that the new dependencies added, such as "github.com/warpstreamlabs/bento",
    are necessary and review their licenses to ensure they are compatible with your
    project's license. Adding unnecessary dependencies can increase the build time and
    size of the binary.** [go.mod [100]](https://github.com/TykTechnologies/tyk/pull/6512/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R100-R100) ```diff -github.com/warpstreamlabs/bento v1.2.0 +# Ensure to review and justify the addition of new dependencies ```
    Suggestion importance[1-10]: 7 Why: The suggestion is reasonable as it encourages reviewing new dependencies for necessity and license compatibility, which is important for maintaining a lean and compliant codebase.
    7
    Possible issue
    Review version upgrades to ensure compatibility and stability ___ **Consider reviewing the version upgrades such as "golang.org/x/crypto v0.25.0" and
    "golang.org/x/net v0.27.0" to ensure they do not introduce breaking changes or
    remove features that your project relies on.** [go.mod [68-69]](https://github.com/TykTechnologies/tyk/pull/6512/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6R68-R69) ```diff -golang.org/x/crypto v0.25.0 -golang.org/x/net v0.27.0 +# Review the version upgrades for compatibility with existing code ```
    Suggestion importance[1-10]: 7 Why: This suggestion is sensible as it highlights the importance of verifying that version upgrades do not introduce breaking changes, which is crucial for maintaining code stability and functionality.
    7