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

feat: new job type for sync canary jobs #1370

Merged
merged 5 commits into from
Oct 30, 2023
Merged

feat: new job type for sync canary jobs #1370

merged 5 commits into from
Oct 30, 2023

Conversation

yashmehrotra
Copy link
Member

No description provided.

@yashmehrotra yashmehrotra force-pushed the job-context branch 4 times, most recently from 37434cc to 0df21fe Compare October 25, 2023 02:42
@yashmehrotra
Copy link
Member Author

image

@yashmehrotra yashmehrotra marked this pull request as ready for review October 25, 2023 12:36
if runner.IsCanaryIgnored(&job.Canary.ObjectMeta) {
return
func (j CanaryJob) Run(ctx dutyjob.JobRuntime) error {
ctx.GetSpan().SetAttributes(attribute.String("canary-id", j.DBCanary.ID.String()))
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 think we should be recording traces for canary runs - they are traced internally using check_status, not sure what pushing them to opentelemetry would add ? A slow canary is more likely due to a slow remote server than a slow canary checker db ?

Copy link
Member Author

@yashmehrotra yashmehrotra Oct 26, 2023

Choose a reason for hiding this comment

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

Did it for general observability, like record all transactions to have complete overview and have a general idea of how much time the checks run is taking compared to the other database calls in the job

@yashmehrotra yashmehrotra requested a review from moshloop October 26, 2023 14:36
pkg/db/canary.go Outdated
@@ -278,7 +279,7 @@ func FindCheck(canary pkg.Canary, name string) (*pkg.Check, error) {
return &model, nil
}

func FindDeletedChecksSince(ctx context.Context, since time.Time) ([]string, error) {
func FindDeletedChecksSince(ctx gocontext.Context, since time.Time) ([]string, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use duty's context for this as well

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍🏽

@moshloop moshloop merged commit cec05dc into master Oct 30, 2023
14 checks passed
@yashmehrotra yashmehrotra deleted the job-context branch October 30, 2023 07:49
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.

3 participants