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

helm: rename status conditional UpdateError to UpgradeError #3269

Merged
merged 2 commits into from
Jun 29, 2020
Merged

helm: rename status conditional UpdateError to UpgradeError #3269

merged 2 commits into from
Jun 29, 2020

Conversation

camilamacedo86
Copy link
Contributor

Description of the change:

  • helm: rename status conditional UpdateError to UpgradeError

Motivation for the change:

  • related to the changes done in the transition to using the new layout.

@camilamacedo86 camilamacedo86 added language/helm Issue is related to a Helm operator project kubebuilder-integration Relates to rewriting the SDK in Kubebuilder plugin form kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kubebuilder-integration Relates to rewriting the SDK in Kubebuilder plugin form labels Jun 22, 2020
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

Why is this change necessary? If it is, it is definitely a breaking change and need a deprecation strategy.

@camilamacedo86
Copy link
Contributor Author

camilamacedo86 commented Jun 24, 2020

Hi @estroz,

The fragment was updated with the info.

For Helm based-Operator be more aligned with Helm the `UpdateError` was renamed to `UpgradeError`.
Note that it is NOT a breaking change for the Helm based-Operators itself, however, if you have any
script or code implemented which is using this status to perform checks then, will be required replace
`UpdateError` for `UpgradeError` in this places.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @estroz,

What we are changing here is the status name which will appear in the CR.status to be aligned with helm ( part of the "new" helm-operator ). I agree that users might be checking it due to a script, for example, the status for tests and etc and then, it would be a breaking change for them but not for o Helm based-Operator itself.

My idea/suggestion is we do it before release 1.0.0 image for users is able to move smoothly.
@joelanford wdyt?

Comment on lines 5 to 6
The status conditional `UpdateError` was renamed to `UpgradeError` to better align with Helm nomenclature.
This change just affects Helm based-operators.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The status conditional `UpdateError` was renamed to `UpgradeError` to better align with Helm nomenclature.
This change just affects Helm based-operators.
In Helm-based operators, the `UpdateError` condition reason was renamed to `UpgradeError` to better align with Helm nomenclature.

# Migration can be defined to automatically add a section to
# the migration guide. This is required for breaking changes.
migration:
header: `UpdateError` status for Helm based-Operator was ranamed
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
header: `UpdateError` status for Helm based-Operator was ranamed
header: "Helm: rename condition reason `UpdateError` to `UpgradeError`"

Comment on lines 23 to 27
body: >
For Helm based-Operator be more aligned with Helm the `UpdateError` was renamed to `UpgradeError`.
Note that it is NOT a breaking change for the Helm based-Operators itself, however, if you have any
script or code implemented which is using this status to perform checks then, will be required replace
`UpdateError` for `UpgradeError` in this places.
Copy link
Member

Choose a reason for hiding this comment

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

Use the yaml | operator instead of > for the migration body so we can have separate paragraphs for easier readability. We should probably make this change in the fragment template.

Also some general grammar/syntax suggestions.

Suggested change
body: >
For Helm based-Operator be more aligned with Helm the `UpdateError` was renamed to `UpgradeError`.
Note that it is NOT a breaking change for the Helm based-Operators itself, however, if you have any
script or code implemented which is using this status to perform checks then, will be required replace
`UpdateError` for `UpgradeError` in this places.
body: |
For Helm-based operators to be more aligned with Helm, the `UpdateError` condition
reason was renamed to `UpgradeError` for the `ReleaseFailed` condition.
Note that this is **NOT** a breaking change for Helm-based operators themselves.
However, any script or code that is depending on this condition reason must be updated
to use `UpgradeError` instead of `UpdateError`.

@joelanford
Copy link
Member

@estroz This was an oversight from the very beginning. Helm has always used "upgrade" to refer to releases, not "update". I think this is a good time to get this in before 1.0.

I'm not sure how a deprecation for this would work without us basically duplicating the entire condition and also renaming the condition type from ReleaseFailed to something else.

@estroz
Copy link
Member

estroz commented Jun 24, 2020

@joelanford @camilamacedo86 I think we have to do a hard break.

@camilamacedo86 camilamacedo86 added this to the v0.19.0 milestone Jun 24, 2020
Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 24, 2020
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

/lgtm

@camilamacedo86 camilamacedo86 merged commit 9bf0dbf into operator-framework:master Jun 29, 2020
@camilamacedo86 camilamacedo86 deleted the helm-conditional-up branch June 29, 2020 17:25
@mikeshng
Copy link
Contributor

mikeshng commented Jul 6, 2020

@camilamacedo86

ReasonUpdateSuccessful    HelmAppConditionReason = "UpdateSuccessful"

Hi, is there a discussion on why we are leaving the reason as Update but not Upgrade? Thanks.

@camilamacedo86
Copy link
Contributor Author

Hi @mikeshng,

Good catcher, we should update the Reason as well. Really tks for the check. It passed. I am doing a pr for that.

camilamacedo86 added a commit that referenced this pull request Jul 6, 2020
…gradeSuccessful #3345

**Description of the change:**
- Follow-up of : #3269
- helm: rename status conditional UpdateSuccessful to UpgradeSuccessful
**Motivation for the change:**
related to the changes done in the transition to using the new layout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. language/helm Issue is related to a Helm operator project lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants