Repository navigation
Feature 4534 component tracking - #4583
Conversation
0e5b5cb to
6489761
Compare
ddadlani
left a comment
There was a problem hiding this comment.
Is there a danger of running into a scenario where one ATC is holding the lock for a component, but gets stuck doing something, and therefore no other ATC can run it? E.g. one ATC has the build tracker lock, but gets stuck running a build, and now no builds will run?
de35e9c to
517bc6f
Compare
|
|
517bc6f to
1cdbc07
Compare
|
@ddadlani so what I said in #4583 (comment) no longer applies. Things changed in 3ada330 in order to address @cirocosta concerns over race conditions. Each component now holds a lock before running. Technically this mostly just moves locks around, but it does also introduce a top level lock for the build tracker and resource checker. It shouldn't introduce any of the problems you listed, since the lock isn't held for the duration of the |
dde0b46 to
35d0ff7
Compare
vito
left a comment
There was a problem hiding this comment.
Overall 👍 - just a few nits/questions
|
|
||
| CREATE UNIQUE INDEX components_name_key ON components (name); | ||
|
|
||
| INSERT INTO components(name, interval) VALUES |
There was a problem hiding this comment.
Can/should we avoid this by turning the UpdateIntervals into an upsert/sync of all components? I didn't expect to maintain these as part of a migration. When we add a new migration would we need a migration to add the component?
| case <-signals: | ||
| return nil | ||
| } | ||
| ) *runner { |
There was a problem hiding this comment.
This seems to have a lot of overlap with the interval runner. Do we need both? Is the only difference that this doesn't use a channel to short-circuit? (No big deal either way I guess.)
| return | ||
| } | ||
|
|
||
| if component.Paused() { |
There was a problem hiding this comment.
lol gross but there's a reason we're eliminating the syncer 👍
Signed-off-by: Rui Yang <[email protected]> Co-authored-by: Joshua Winters <[email protected]>
Signed-off-by: Rui Yang <[email protected]> Co-authored-by: Joshua Winters <[email protected]>
atc: override components intervals based on ENV value Signed-off-by: Rui Yang <[email protected]> Co-authored-by: Joshua Winters <[email protected]>
Signed-off-by: Rui Yang <[email protected]> Co-authored-by: Joshua Winters <[email protected]>
Signed-off-by: Rui Yang <[email protected]> Co-authored-by: Joshua Winters <[email protected]>
Signed-off-by: Rui Yang <[email protected]>
Signed-off-by: Rui Yang <[email protected]>
Signed-off-by: Josh Winters <[email protected]>
Signed-off-by: Josh Winters <[email protected]>
Signed-off-by: Joshua Winters <[email protected]> Co-authored-by: Rui Yang <[email protected]>
Signed-off-by: Joshua Winters <[email protected]> Co-authored-by: Julia Pu <[email protected]> Co-authored-by: Clara Fu <[email protected]>
Signed-off-by: Joshua Winters <[email protected]>
12adf3b to
ef0fd22
Compare
vito
left a comment
There was a problem hiding this comment.
👍 - shall I wait to merge until we consolidate the runners?
Existing Issue
Fixes #4534
Changes proposed in this pull request
Added a table to track components last ran time and paused status. The interval of each component is seeded in DB during migration. While ATC starting up it will override those intervals with flag vars.
The runner (who runs the component) interval is default to 10s i.e. it will check if the component is paused every 10s. If component is unpaused it will proceed to check if the component run interval is reached.
Contributor Checklist
Reviewer Checklist