-
Notifications
You must be signed in to change notification settings - Fork 584
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
backend: simplify insert
in completed_job
#4999
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Reviewed everything up to d723c0c in 20 seconds
More details
- Looked at
244
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-queue/src/jobs.rs:588
- Draft comment:
Ensure that the logic for determining thecanceled
status is consistent. The use ofCOALESCE($7, queue.canceled_by) IS NOT NULL
might not correctly reflect the cancellation status ifcanceled_by
isNone
butqueue.canceled_by
is not. Consider revising this logic to ensure accuracy. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_qCI5Wjd903hoR66x
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
tested but not fully tested |
d723c0c
to
afb0a55
Compare
Deploying windmill with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on afb0a55 in 17 seconds
More details
- Looked at
286
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-queue/src/jobs.rs:524
- Draft comment:
Thecanceled
variable is introduced here but ensure its usage is consistent throughout the function. Double-check that all logic depending oncanceled
is correctly updated to use this variable. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new variablecanceled
to track the cancellation status of a job. This variable is used in multiple places, but its initialization and usage should be consistent and clear. The current implementation initializescanceled
using a SQL query result, which is fine, but the logic around its usage should be double-checked for consistency and correctness.
Workflow ID: wflow_MZG9p9U69UgrOnq6
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
afb0a55
to
d5dab8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on d5dab8b in 18 seconds
More details
- Looked at
361
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-queue/src/jobs.rs:524
- Draft comment:
Thecanceled
variable is introduced to track the cancellation status of a job. Ensure that this variable is consistently set and used throughout the function to avoid incorrect cancellation status. - Reason this comment was not posted:
Confidence changes required:50%
The PR introduces a new variablecanceled
to track the cancellation status of a job. This variable is used in multiple places to determine if a job was canceled. However, the logic for setting this variable is not consistent with the previous logic, which could lead to incorrect cancellation status being recorded.
Workflow ID: wflow_vgkrOcsmQnHXakBM
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
d5dab8b
to
b2ebb6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks good to me! Incremental review on b2ebb6d in 22 seconds
More details
- Looked at
361
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. backend/windmill-queue/src/jobs.rs:587
- Draft comment:
Ensure that the logic for setting thecanceled
field correctly reflects the intended state of the job. If both$7
andqueue.canceled_by
areNULL
, thecanceled
field should not default toFALSE
if the job was previously canceled. Consider revising the logic to handle this case appropriately. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_ibYymL69jlHwUejJ
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
&& (queued_job.job_kind == JobKind::Script | ||
|| queued_job.job_kind == JobKind::Preview) | ||
{ | ||
if let Err(e) = sqlx::query!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rubenfiszel Removed this as after this change, completed_job.flow_status
should have the same value as q.flow_status
Important
Simplifies
insert
operation and streamlinescanceled
state handling inadd_completed_job
injobs.rs
.insert
operation inadd_completed_job
injobs.rs
using aSELECT
statement.canceled
state handling with a boolean flag.add_completed_job
to align with newcanceled
state handling.canceled
state handling.This description was created by for b2ebb6d. It will automatically update as commits are pushed.