-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Misc sdk changes #6018
Misc sdk changes #6018
Conversation
WalkthroughThe pull request introduces modifications across five different files: Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
pkg/protocols/offlinehttp/request.go (1)
134-139
: Consider adding URL validation.While the URL construction is correct, adding validation could prevent potential issues with malformed URLs.
Consider enhancing the function:
func getURLFromRequest(req *http.Request) string { + if req == nil || req.URL == nil { + return "" + } if req.URL.Scheme == "" { req.URL.Scheme = "https" } - return fmt.Sprintf("%s://%s%s", req.URL.Scheme, req.Host, req.URL.Path) + url := fmt.Sprintf("%s://%s%s", req.URL.Scheme, req.Host, req.URL.Path) + if _, err := http.ParseRequestURI(url); err != nil { + return "" + } + return url }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cmd/integration-test/ssl.go
(1 hunks)pkg/protocols/offlinehttp/request.go
(6 hunks)pkg/templates/parser.go
(1 hunks)
🧰 Additional context used
🪛 GitHub Check: Lint
cmd/integration-test/ssl.go
[failure] 127-127:
SA1019: tls.VersionSSL30 has been deprecated since Go 1.13 because it shouldn't be used: SSLv3 is cryptographically broken, and is no longer supported by this package. See golang.org/issue/32716. (staticcheck)
🪛 golangci-lint (1.62.2)
cmd/integration-test/ssl.go
127-127: SA1019: tls.VersionSSL30 has been deprecated since Go 1.13 because it shouldn't be used: SSLv3 is cryptographically broken, and is no longer supported by this package. See golang.org/issue/32716.
(staticcheck)
🪛 GitHub Actions: 🔨 Tests
cmd/integration-test/ssl.go
[error] 127-127: tls.VersionSSL30 has been deprecated since Go 1.13 because it shouldn't be used: SSLv3 is cryptographically broken, and is no longer supported by this package. See golang.org/issue/32716
🔇 Additional comments (2)
pkg/templates/parser.go (1)
36-41
: LGTM! Well-structured constructor function.The new constructor function enhances flexibility by allowing cache reuse while maintaining clean separation of concerns.
pkg/protocols/offlinehttp/request.go (1)
95-95
: LGTM! Enhanced URL handling.The changes improve URL handling by separating input data from URL string and adding fallback URL construction.
Also applies to: 116-119
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
cmd/integration-test/integration-test.go (1)
118-121
: Consider enhancing the success message and making it platform-agnostic.While the changes improve CI feedback, consider these enhancements:
- Include the number of successful tests in the message for better visibility.
- Make the group markers conditional based on the CI platform to support other CI systems.
} else { - fmt.Println("::group::All tests passed") - fmt.Println("::endgroup::") + successMsg := fmt.Sprintf("All %d tests passed successfully", len(protocolTests)) + if ci.IsGitHubActions() { + fmt.Println("::group::" + successMsg) + fmt.Println("::endgroup::") + } else { + fmt.Println(successMsg) + } os.Exit(0) }
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.
Finally all test are passing!
Summary by CodeRabbit
Release Notes
New Features
Improvements
The release introduces subtle enhancements to testing, HTTP request handling, and template parsing mechanisms, providing more flexibility and control in various scenarios.