Skip to content

instrument.go: let ExecInstrument2 return the exec error to avoid swallowing errors - #8

Merged
xgoffin merged 1 commit into
masterfrom
xg/execinstrument2
Jan 23, 2026
Merged

instrument.go: let ExecInstrument2 return the exec error to avoid swallowing errors#8
xgoffin merged 1 commit into
masterfrom
xg/execinstrument2

Conversation

@xgoffin

Copy link
Copy Markdown
Contributor

What does this PR do?

Related to : #

What are the observable changes?

Good PR checklist

  • Title makes sense
  • Is against the correct branch
  • Only addresses one issue
  • Properly assigned
  • Added/updated tests
  • Added/updated documentation
  • Properly labeled

Impacted components

  • CRM :
  • Mailings :
  • Workflow :
  • Search :
  • Side Panel :
  • Analytics :
  • Live Capture :
  • Payments :
  • Plugin :
  • Stores :
    • PG store :
    • ES store :
    • Cassandra store :
  • Harvest :
  • Infrastructure :
  • Other :
  • No impact

Additional Notes

@xgoffinxgoffin self-assigned this Jan 23, 2026
@xgoffin
xgoffin requested review from a team and AlexisMontagne as code ownersJanuary 23, 2026 11:01
@xgoffin
xgoffin requested review from lordteka and removed request for a teamJanuary 23, 2026 11:01
Comment threadinstrument.go
var res T

i.Exec(func() error {
return res, i.Exec(func() error {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚫 [golangci]reported by reviewdog 🐶
error returned from interface method should be wrapped: sig: func (github.com/upfluence/stats.Instrument).Exec(func() error) error (wrapcheck)

@SypheosSypheos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Won't that break a lot of upstream deps?

@xgoffin

Copy link
Copy Markdown
ContributorAuthor

Won't that break a lot of upstream deps?

Thankfully it's not used much

image

@xgoffin
xgoffin merged commit 78e5d43 into masterJan 23, 2026
1 check failed
@xgoffin
xgoffin deleted the xg/execinstrument2 branch January 23, 2026 15:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@xgoffin@tgallice@AlexisMontagne@Sypheos@upfluence-bot