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

scheduler: DesiredCanaries can be set on every pass safely #8456

Merged
merged 2 commits into from
Jul 20, 2020

Commits on Jul 20, 2020

  1. refactor: make it clear where we're accessing dstate

    The field name `Deployment.TaskGroups` contains a map of `DeploymentState`,
    which makes it a little harder to follow state updates when combined with
    inconsistent naming conventions, particularly when we also have the state
    store or actual `TaskGroup`s in scope. This changeset changes all uses to
    `dstate` so as not to be confused with actual TaskGroups.
    tgross committed Jul 20, 2020
    Configuration menu
    Copy the full SHA
    7552fff View commit details
    Browse the repository at this point in the history
  2. scheduler: DesiredCanaries can be set on every pass safely

    The reconcile loop sets `DeploymentState.DesiredCanaries` only on the first
    pass through the loop and if the job is not paused/pending. In MRD,
    deployments will make one pass though the loop while "pending", and were not
    ever getting `DesiredCanaries` set. We can't set it in the initial
    `DeploymentState` constructor because the first pass through setting up
    canaries expects it's not there yet. However, this value is static for a given
    version of a job because it's coming from the update stanza, so it's safe to
    re-assign the value on subsequent passes.
    tgross committed Jul 20, 2020
    Configuration menu
    Copy the full SHA
    fa63c8f View commit details
    Browse the repository at this point in the history