Skip to content

Doc: fix utils.WithJitter Deprecation notice#2012

Open
patricios-space wants to merge 2 commits intomainfrom
doc/deprectated-WithJitter-go-fix-inline
Open

Doc: fix utils.WithJitter Deprecation notice#2012
patricios-space wants to merge 2 commits intomainfrom
doc/deprectated-WithJitter-go-fix-inline

Conversation

@patricios-space
Copy link
Copy Markdown

🥜 Update utils.WithJitter's deprecation notice so that linter picks up it is deprecated, with quick autofix for replacing it with timeutil.JitterPct. See https://go.dev/wiki/Deprecated .

In a snippet like this:

utils.WithJitter(duration)

go:fix replaces it with

timeutil.JitterPct(0.1).Apply(duration)

@patricios-space patricios-space force-pushed the doc/deprectated-WithJitter-go-fix-inline branch from efb84d8 to 075a97e Compare April 29, 2026 18:21
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

⚠️ API Diff Results - github.com/smartcontractkit/chainlink-common

⚠️ Breaking Changes (8)

package github (1)
  • com/smartcontractkit/chainlink-common/pkg/workflows/cmd/gen_owners — 🗑️ Removed
pkg/chains/evm.(*Receipt) (1)
  • GetL1_Fee — 🗑️ Removed
pkg/chains/evm.(*ReceiptGasInfo) (1)
  • GetL1_Fee — 🗑️ Removed
pkg/chains/evm.Receipt (1)
  • L1_Fee — 🗑️ Removed
pkg/chains/evm.ReceiptGasInfo (1)
  • L1_Fee — 🗑️ Removed
pkg/settings/cresettings.Workflows (1)
  • FeatureEVMWriteReportL1FeeActivePeriod — 🗑️ Removed
pkg/types/chains/evm.Receipt (1)
  • L1Fee — 🗑️ Removed
pkg/types/chains/evm.ReceiptGasInfo (1)
  • L1Fee — 🗑️ Removed

📄 View full apidiff report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the deprecation guidance for utils.WithJitter so Go tooling/lint can recognize it as deprecated and offer an automated rewrite toward timeutil.JitterPct.

Changes:

  • Refined WithJitter’s Deprecated: doc comment to point to the intended replacement usage.
  • Added a //go:fix inline directive to enable automatic inlining/rewrite of call sites.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/utils/utils.go Outdated
@patricios-space patricios-space marked this pull request as ready for review April 29, 2026 22:04
@patricios-space patricios-space requested a review from a team as a code owner April 29, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants