-
Notifications
You must be signed in to change notification settings - Fork 0
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
[GH-1465] Specify TDR Polling Interval #542
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.
Thank you for addressing this! Two additional pieces of feedback:
pollingInterval
/polling_interval
without the unit of measurement is ambiguous. My preference is to make explicit reference in naming so that there's no question of how the value is interpreted, ex.pollingIntervalMinutes
/polling_interval_minutes
but this may be subjective.- Please also update the GitHub docs to reflect this new configuration.
api/src/wfl/source.clj
Outdated
|
||
(defn ^:private tdr-source-should-poll? | ||
"Return true if it's been at least `tdr-source-polling-interval-minutes` | ||
"Return true if it's been at least the specified `polling_interval` or, if unspecified, `tdr-source-default-polling-interval-minutes` |
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.
Nit: easier to read if broken up with max 80 chars per line. Ex.
"Return true if it's been at least the specified `polling_interval`
or, if unspecified, `tdr-source-default-polling-interval-minutes`
since `last_checked` -- when we last checked for new rows in the TDR."
runInTransaction="false"> | ||
<comment> | ||
We want to be able to allow each terra data repo source to be able to specify | ||
the rate in which they poll for a new snapshot. The new column added to TerraDataRepoSource |
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.
Suggest rewording:
"the rate in which they poll for a new snapshot"
To:
"the rate at which they poll TDR for new rows to snapshot"
api/src/wfl/source.clj
Outdated
(let [checked (timestamp-to-offsetdatetime last_checked) | ||
minutes-since-poll (.between ChronoUnit/MINUTES checked utc-now)] | ||
minutes-since-poll (.between ChronoUnit/MINUTES checked utc-now) | ||
polling-interval (or pollingInterval tdr-source-default-polling-interval-minutes)] |
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.
Style nit: it's a bit easier to read when we align the assignments.
(let [checked (timestamp-to-offsetdatetime last_checked)
minutes-since-poll (.between ChronoUnit/MINUTES checked utc-now)
polling-interval (or pollingInterval
tdr-source-default-polling-interval-minutes)]
@@ -95,6 +97,11 @@ The email addresses of those whom should be "readers" of all snapshots created | |||
by workflow-launcher in this workload. You can specify individual users and/or | |||
Terra/Firecloud groups. | |||
|
|||
#### `pollingIntervalMinutes` |
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.
Thanks for adding this!
You may also be able to remove this block higher up.
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.
Sorry for the delay in approval, I thought I had done so already.
Purpose
Currently the polling interval for a Terra DataRepo Source is 20 minutes. This could be too long for some cases and certainly makes the system tests run long. This PR allows the workload creator to specify a polling interval and defaults to 20 minutes if it is not provided.
https://broadinstitute.atlassian.net/browse/GH-1465
Changes
Review Instructions
Run the system test for
test-workload-sink-outputs-to-tdr