Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add a canary (qa) deployment for TW #8806

Closed
belforte opened this issue Nov 21, 2024 · 2 comments
Closed

add a canary (qa) deployment for TW #8806

belforte opened this issue Nov 21, 2024 · 2 comments
Assignees

Comments

@belforte
Copy link
Member

belforte commented Nov 21, 2024

with ref to #8650

@aspiringmind-code and @belforte had a chat today. Here's notes to guide development:

De# words

At very high level we decide which TW is master and which canary and the fraction to be sent. This goes in the conifg. And everything else is “implementation”

Master(primary) TW does scheduling and marks some tasks (up to 2*Nslaves at every poll cycle) with status HOLDING and its TWNAME. We want to change so that X% of those tasks end up with the canary TW name instead.

Implementation guidelines

Configuration params:

  • I am the master TW (could be the default)
  • I am a canary (qa) TW (call it secondary or slave) (default is no)
  • If I am master:
    • A param has the name of the canary
    • A param has the fraction to send to the canary

MasterWorker changes:

  • If I am master:
    • _selectWork (move tasks from WAIT to NEW)
    • _lockWork (change to HOLDING and put TWname in DB) changes (1)
    • New step (if we decide to add) (2)
    • _getWork (3) (picks tasks in HOLDING with my TW name in the DB)
    • One of (1) (2) (3) needs to be changed to send X% of tasks to the canary by setting status HOLDING and canary TW name
  • If I am Canary:
    • Skip _selectWork and _lockWork. Only do _getWork and following steps

Extra niceties

  • keep track in DB task table if this task was processed by the primary or the canary TW ? Where does it help ? we already have the TW name
  • keep track in DB task table of the version of the TW used to process this task ? still some work.. is it useful ?
  • the I-am-master and I-am-slave params are mutually exclusive, can (should?) easily check in TW code, but do we also want something puppet-side to make sure that we do not run two master at same time ? Do we need it ?
@aspiringmind-code
Copy link
Contributor

Configuration and implementation can be seen here and here

@belforte
Copy link
Member Author

belforte commented Dec 6, 2024

done and deployed

@belforte belforte closed this as completed Dec 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants