fix(scheduler): persist normalized URLs, expand tests, upgrade Go/tooling#25
fix(scheduler): persist normalized URLs, expand tests, upgrade Go/tooling#25
Conversation
…ling - Apply result.NormalizedURL back to request.URL and callback.URL so normalized values are used across scheduling, retries, and callbacks - Add //nolint:G704 where appropriate Tests - Introduce helpers for retrier, TLS scheduler, retry-then-success and callback payload handlers - Refactor TestRetrier_Validate to table-driven cases (valid, zero/invalid max retries, invalid backoff/interval/timeout, etc.) - Update retry/timeout expectations and add assertion/wait helpers Tooling/CI - Enable golangci-lint tests in .golangci.yaml - Bump Go to 1.26.0; update Makefile/.project-settings.env accordingly - Upgrade golangci-lint to v2.10.1 and buf to v1.65.0 - Update pre-commit hooks to v9.7.0 Deps - go.mod: go 1.26.0; github.com/hyp3rd/sectools v1.2.3; golang.org/x/net v0.50.0; golang.org/x/text v0.34.0 - Refresh go.sum
There was a problem hiding this comment.
Pull request overview
This pull request improves URL handling in the scheduler by persisting normalized URLs, refactors tests with helper functions and table-driven patterns, and upgrades tooling including Go 1.26.0, golangci-lint v2.10.1, and related dependencies. The changes ensure that URL normalization results from validation are consistently used across scheduling, retries, and callbacks.
Changes:
- Core functionality: Apply normalized URLs from validation results back to request.URL and callback.URL fields
- Testing improvements: Introduce reusable test helpers and refactor validation tests to table-driven format
- Tooling upgrades: Update Go to 1.26.0, golangci-lint to v2.10.1, buf to v1.65.0, and pre-commit hooks to v9.7.0
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/scheduler/scheduler.go | Apply NormalizedURL from validation results to request/callback URLs; add nolint directives for gosec |
| tests/scheduler_test.go | Extract test logic into reusable helpers (retrier, scheduler, handlers, assertions); improve test maintainability |
| tests/retrier_test.go | Convert validation tests to table-driven format with mutation functions; add timeout constants |
| go.mod | Update Go version to 1.26.0 and upgrade sectools, golang.org/x/net, golang.org/x/text dependencies |
| go.sum | Refresh checksums for updated dependencies |
| Makefile | Update tool versions to match project settings |
| .project-settings.env | Centralize tool version configuration |
| .pre-commit/unit-test-hook | Update Go toolchain version reference |
| .pre-commit/golangci-lint-hook | Update golangci-lint version reference |
| .pre-commit-config.yaml | Update cspell-cli pre-commit hook to v9.7.0 |
| .pre-commit-ci-config.yaml | Update cspell-cli pre-commit hook to v9.7.0 |
| .golangci.yaml | Enable linting for test files and update Go version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| return scheduler.CallbackPayload{} |
There was a problem hiding this comment.
The return statement after t.Fatal is unreachable code. The t.Fatal call will stop test execution immediately, so the subsequent return will never be executed. Consider removing this unreachable return statement.
| return scheduler.CallbackPayload{} |
…ling - Apply result.NormalizedURL back to request.URL and callback.URL so normalized values are used across scheduling, retries, and callbacks - Add //nolint:G704 where appropriate Tests - Introduce helpers for retrier, TLS scheduler, retry-then-success and callback payload handlers - Refactor TestRetrier_Validate to table-driven cases (valid, zero/invalid max retries, invalid backoff/interval/timeout, etc.) - Update retry/timeout expectations and add assertion/wait helpers Tooling/CI - Enable golangci-lint tests in .golangci.yaml - Bump Go to 1.26.0; update Makefile/.project-settings.env accordingly - Upgrade golangci-lint to v2.10.1 and buf to v1.65.0 - Update pre-commit hooks to v9.7.0 Deps - go.mod: go 1.26.0; github.com/hyp3rd/sectools v1.2.3; golang.org/x/net v0.50.0; golang.org/x/text v0.34.0 - Refresh go.sum
Tests
Tooling/CI
Deps