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

Read live Job state for replaceUnready check #1578

Merged
merged 1 commit into from
May 14, 2021

Conversation

lblackstone
Copy link
Member

Proposed changes

The check added in de129e3 mistakenly did not check the
live status of the Job, but instead checked the user inputs.
This would lead to erroneous replacements for ready Jobs.

Related issues (optional)

The check added in de129e3 mistakenly did not check the
live status of the Job, but instead checked the user inputs.
This would lead to erroneous replacements for ready Jobs.
@lblackstone lblackstone requested a review from viveklak May 14, 2021 15:56
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

1 similar comment
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

hasChanges = pulumirpc.DiffResponse_DIFF_SOME
replaces = append(replaces, `.metadata.annotations["pulumi.com/replaceUnready"]`)
// Fetch current Job status and check point-in-time readiness. Errors are ignored.
if live, err := k.readLiveObject(newInputs); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extending from @lukehoban's comment here: #1575 (comment)
should we be more fail-fast with error handling in providers in general? We don't have very good means of surfacing "warning" type diagnostics to the CLI so I wonder if we should bubble up the errors here rather than swallow them and result in surprising behavior for the user?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this particular case, the fallback behavior is a regular update, which would fail in the usual manner in case of a persistent error. Since this is more conservative than replacing, I'm inclined to just ignore the error.

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.

None yet

2 participants