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

status: Generation should be set by what the sync worker is doing #102

Merged
merged 3 commits into from
Jan 28, 2019

Conversation

smarterclayton
Copy link
Contributor

The primary mechanism where by a reconciling controller communicates to a client is its status, and the client has to wait until the controller observes its write before assuming the controller is ready.

When writing a client that is triggering an upgrade, we need to:

  1. Set desiredUpdate and read resulting generation
  2. Wait until status.generation == generation from 1
  3. Wait until the update that is marked partial in status history is complete

This fixes the sync worker to be the one who propagates generation, so that a client doesn't see 2 as true when syncing a previous generation.

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 25, 2019
@abhinavdahiya
Copy link
Contributor

8ea7884 is a good catch.

/approve

do you want to wait for https://github.com/openshift/api/pull/185/files and bring that in as vendor update ?

@smarterclayton
Copy link
Contributor Author

Yes (that's where I caught this)

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 27, 2019
The primary mechanism where by a reconciling controller communicates
to a client is its status, and the client has to wait until the
controller observes its write before assuming the controller is ready.

When writing a client that is triggering an upgrade, we need to:

1. Set desiredUpdate and read resulting generation
2. Wait until status.generation == generation from 1
3. Wait until the update that is marked partial in status history is complete

This fixes the sync worker to be the one who propagates generation, so
that a client doesn't see 2 above when syncing a previous generation.
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jan 28, 2019
@smarterclayton
Copy link
Contributor Author

Rebased and updated with new api

@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 28, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, smarterclayton

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [abhinavdahiya,smarterclayton]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 4c2d5e0 into openshift:master Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants