TykTechnologies / tyk

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

TT-12306, addressed changes suggested in the tyk-docs PR #6377

Closed andrei-tyk closed 1 month ago

andrei-tyk commented 1 month ago

User description

Description

Related Issue

Motivation and Context

How This Has Been Tested

Screenshots (if appropriate)

Types of changes

Checklist


PR Type

enhancement, bug fix


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
event.go
Add nolint comments to alias declarations in event.go       

apidef/oas/event.go - Added `// nolint` comments to alias declarations.
+2/-0     
time.go
Add nolint comment to alias declaration in time.go             

apidef/oas/time.go - Added `// nolint` comment to alias declaration.
+1/-0     
Bug fix
rate_limit.go
Fix typos in rate limiter configuration comments                 

config/rate_limit.go - Corrected typos in comments for rate limiter configurations.
+2/-2     

๐Ÿ’ก 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 1 month ago

API Changes

--- prev.txt    2024-07-01 10:26:19.412996267 +0000
+++ current.txt 2024-07-01 10:26:16.217016286 +0000
@@ -5937,7 +5937,7 @@
    // EnableFixedWindow enables fixed window rate limiting.
    EnableFixedWindowRateLimiter bool `json:"enable_fixed_window_rate_limiter"`

-   // Redis based rate limiter with sliding log. Provides 100% rate limiting accuracy, but require two additional Redis roundtrip for each request.
+   // Redis based rate limiter with sliding log. Provides 100% rate limiting accuracy, but require two additional Redis roundtrips for each request.
    EnableRedisRollingLimiter bool `json:"enable_redis_rolling_limiter"`

    // To enable, set to `true`. The sentinel-based rate limiter delivers a smoother performance curve as rate-limit calculations happen off-thread, but a stricter time-out based cool-down for clients. For example, when a throttling action is triggered, they are required to cool-down for the period of the rate limit.
@@ -5946,7 +5946,7 @@
    // The standard rate limiter offers similar performance as the sentinel-based limiter. This is disabled by default.
    EnableSentinelRateLimiter bool `json:"enable_sentinel_rate_limiter"`

-   // EnableRateLimitSmoothing enables or disables rate smoothing. The rate smoothing is only supported on the
+   // EnableRateLimitSmoothing enables or disables rate limit smoothing. The rate smoothing is only supported on the
    // Redis Rate Limiter, or the Sentinel Rate Limiter, as both algorithms implement a sliding log.
    EnableRateLimitSmoothing bool `json:"enable_rate_limit_smoothing"`
github-actions[bot] commented 1 month ago

PR Reviewer Guide ๐Ÿ”

โฑ๏ธ Estimated effort to review [1-5] 2
๐Ÿงช Relevant tests No
๐Ÿ”’ Security concerns No
โšก Key issues to review Comment Consistency:
The comments added with // nolint in event.go and time.go should have an explanation as to why linting is being ignored. This helps maintain code quality and understandability.
Typographical Error:
In rate_limit.go, the comment correction from "rate smoothing" to "rate limit smoothing" might be unnecessary unless it aligns with internal documentation or naming conventions. It's important to ensure consistency in terminology across the project.
github-actions[bot] commented 1 month ago

Failed to generate code suggestions for PR

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud