Skip to content
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

fix(crons): Pass correct event types, fix checkin_margin field, add example #674

Merged
merged 5 commits into from Jul 26, 2023

Conversation

tonyo
Copy link
Member

@tonyo tonyo commented Jul 25, 2023

Follow-up to #661 that fixes a few issues and also adds an E2E example.

@tonyo tonyo requested a review from cleptric July 25, 2023 14:08
@tonyo tonyo self-assigned this Jul 25, 2023
@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 95.83% and project coverage change: +0.04% 🎉

Comparison is base (4f72145) 80.51% compared to head (7c1d53c) 80.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #674      +/-   ##
==========================================
+ Coverage   80.51%   80.56%   +0.04%     
==========================================
  Files          43       44       +1     
  Lines        4450     4460      +10     
==========================================
+ Hits         3583     3593      +10     
- Misses        734      736       +2     
+ Partials      133      131       -2     
Files Changed Coverage Δ
check_in.go 73.33% <ø> (ø)
hub.go 84.53% <0.00%> (-1.97%) ⬇️
client.go 88.18% <100.00%> (+0.25%) ⬆️
transport.go 76.64% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -80,7 +80,7 @@ type MonitorConfig struct { //nolint: maligned // prefer readability over optima
Schedule MonitorSchedule `json:"schedule,omitempty"`
// The allowed margin of minutes after the expected check-in time that
// the monitor will not be considered missed for.
CheckInMargin int64 `json:"check_in_margin,omitempty"`
CheckInMargin int64 `json:"checkin_margin,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, this almost looks like a typo to me. Will raise with the Crons team.

MonitorSlug: monitorSlug,
Status: status,
},
nil,
Copy link
Member

Choose a reason for hiding this comment

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

I don't know if this causes issues. In Laravel, we sent the monitor config along for all check-ins.

Copy link
Member Author

Choose a reason for hiding this comment

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

It sorta feels natural to me: when the monitor already exists (guaranteed by the first check-in), we don't have to pass in the monitor config anymore.

@tonyo tonyo enabled auto-merge (squash) July 26, 2023 12:23
@tonyo tonyo merged commit b551438 into master Jul 26, 2023
14 checks passed
@tonyo tonyo deleted the tonyo/fix-crons-api-and-event-types-1 branch July 26, 2023 13:59
Sign up for free to 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.

None yet

2 participants