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

Resource deploy status states #303

Closed
wants to merge 3 commits into from
Closed

Conversation

dturn
Copy link
Contributor

@dturn dturn commented Jun 22, 2018

Deploy statuses has been rather tricky to maintain. Currently a resource's status is not mutually exclusive, e.g. it could be failed, started, timed_out, and successful. While initially this might have been helpful (e.g. an resource was eventually successful, but not before the timeout hit), it has actually made writing the logging code difficult. This PR is an attempt to make make statuses mutually exclusive.

Resources now expose a single method: deploy_status which returns the status (currently as a string, could be a symbol) from a list of statuses in order of precedence. This ensures mutually exclusive states.

We also push the responsibility for the state of the deploy into the resource manager so that end users don't need to be concerned with checking each resource to determine the final state.

Part of the motivation for this PR is making changes like https://github.com/Shopify/kubernetes-deploy/pull/282/files much smaller.

Tests fail because I haven't updated the unit tests, I wanted 👀 before going all the way.

@dturn
Copy link
Contributor Author

dturn commented Jun 25, 2018

@KnVerey / @klautcomputing this is ready for high level thoughts

@dturn dturn force-pushed the resource-deploy-status-states branch from 39f1c44 to e8acf47 Compare June 25, 2018 19:51
@KnVerey
Copy link
Contributor

KnVerey commented Aug 8, 2018

Note from #325: There is probably an additional state along the lines of "unobserved", where we've deployed the resource but its status is state, so we cannot yet make a determination.

@dturn
Copy link
Contributor Author

dturn commented Nov 22, 2019

Closing since this is over a year old

@dturn dturn closed this Nov 22, 2019
@dturn dturn deleted the resource-deploy-status-states branch November 22, 2019 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants