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

Run chart releaser action from release branches only #859

Closed
wants to merge 1 commit into from

Conversation

wongma7
Copy link
Contributor

@wongma7 wongma7 commented Apr 28, 2021

Is this a bug fix or adding new feature? fixes #858

What is this PR about? / Why do we need it?

"What happened? This would enable us to branch helm chart releases (e.g. have a different chart for 0.10.x vs 0.9.x).

And it would reduce confusion in the release process. Currently you release the image to registries by pushing a tag on the release branch but you release a corresponding helm chart by pushing something to the master branch.

See efs fix for details: kubernetes-sigs/aws-efs-csi-driver#333"

fyi @ayberk @krmichel

What testing is done?

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 28, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wongma7

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:

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 28, 2021
@wongma7
Copy link
Contributor Author

wongma7 commented Apr 28, 2021

BTW, this is a double edged sword. because folks browsing master branch might expect the master branch chart to have been released: kubernetes-sigs/aws-efs-csi-driver#421

So I want others' input and careful consideration :D

@coveralls
Copy link

coveralls commented Apr 28, 2021

Pull Request Test Coverage Report for Build 1918

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 79.188%

Totals Coverage Status
Change from base Build 1917: 0.0%
Covered Lines: 1990
Relevant Lines: 2513

💛 - Coveralls

@wongma7 wongma7 force-pushed the chartreleaserbranch branch from 0ac0fe7 to 0aa3715 Compare April 28, 2021 22:54
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 28, 2021
docs/RELEASE.md Outdated
@@ -79,15 +79,14 @@ The new tag should trigger a new Github release. Verify that it has run by going
- Source code (zip)
- Source code (tar.gz)

## Verify the helm chart release
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I realize this means that the helm chart release will exist for x minutes before the image to which it is referring will exist in registries.

This is a problem we had in the past that this change would reintroduce.

I think the benefits outweigh it tho.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(still thinking outloud)
Actually let me edit the release process to account for this.

@ayberk
Copy link
Contributor

ayberk commented Apr 28, 2021

Hmm I can see the confusion around not having the latest chart released. My concern is that our chart hasn't been consistent enough to carry all the changes across release branches. Maybe we should do this after @krmichel's changes? When it's more stable?

@wongma7
Copy link
Contributor Author

wongma7 commented Apr 28, 2021

Maybe we should do this after @krmichel's changes? When it's more stable?

I'm okay with that.

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 28, 2021
@krmichel
Copy link
Contributor

I also wonder if there will be confusion about chart versions since they don't generally match the versions of the actual images they use. Will the helm chart be released only from the most current release branch or any release branch? Will there be some method other than human caution and observation that will keep the chart versions straight across branches? Like what if the chart version was 0.27.0 or 1.1.0 on the branch for the 0.11 release of the image. Would it go up a minor in the release branch for 0.12? If so, what would the version of the chart be in the 0.11 release branch if a new feature was added to the chart after 0.12 was released. 0.28.0 or 1.2.0 would already be taken and setting it to either 0.27.1/1.1.1 would not accurately represent the change content, and 0.29.0/1.3.0 would falsely imply that the changes from 0.28.0/1.2.0 would be included in that chart version. It seems like since the chart is a pseudo-autonomous piece of software if you want to release it from branches it should have its own release branches independent of the image releases. Maybe chart-release-* as a convention. That would allow for bug fixes to older versions without the complications I was mentioning earlier. Thoughts?

@wongma7
Copy link
Contributor Author

wongma7 commented Apr 29, 2021

@krmichel

Will the helm chart be released only from the most current release branch or any release branch?

Only the most recent release branch, because my main motivation is to protect the helm chart from changes in master branch, not to maintain multiple parallel branches of the helm chart. This thinking goes for the driver as well, because we have never accepted PRs to any branch but master and the most recent release branch. This might change in the future after GA depending on whether we want to maintain multiple minor version tracks in order to support older kubernetes version, but so far we haven't needed to. For example, with the CSIDriver object going from v1beta1 to v1, you are introducing some logic in the chart itself to check the k8s version, so there's no need to maintain different chart tracks for v1beta1 and v1. Anyway, if we assume that we will only ever make changes to the most current release branch, then it mostly avoids the scenarios you described.

Like what if the chart version was 0.27.0 or 1.1.0 on the branch for the 0.11 release of the image. Would it go up a minor in the release branch for 0.12? If so, what would the version of the chart be in the 0.11 release branch if a new feature was added to the chart after 0.12 was released.

Ideally we would never backport a feature to an old version of the chart, only bugfixes in rare cases, so that would sidestep this scenario. So far, I have been bumping the chart minor version along with the app version. And sometimes we bump the chart minor version independent of the app version. Strictly speaking, as I have mentioned before, I guess we have been abusing semver & helm versioning conventions, but, I really don't know a better way to signal changes to users. At the least, to cut down on confusion, we'll need to start maintaining a chart changelog (someone is working on this in EFS repo). So users will be able to look at chart version, app version, and the changelog for each.

It seems like since the chart is a pseudo-autonomous piece of software if you want to release it from branches it should have its own release branches independent of the image releases. Maybe chart-release-* as a convention.

It might be the case that branching the chart will be the cleanest solution but IMO probably will add more confusion & maintenance burden. The chart still is tied to image releases by appVersion like the obvious example is if the chart has a value for toggling a flag that only exists in appVersion> x.y. Then it's reasonable to host the chart in the image's release-x.y branch.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 30, 2021
@wongma7 wongma7 force-pushed the chartreleaserbranch branch from 0aa3715 to 170f037 Compare August 4, 2021 19:36
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 4, 2021
@wongma7
Copy link
Contributor Author

wongma7 commented Aug 4, 2021

/hold cancel

I want to bring this back, #995 updated the release process so that we release the kustomize template in release-* branch only after verifying images exist. Similarly, it would make sense to only release the helm chart in release-* branch only after verifying images exist. I think this model has worked OK in efs repo, it requires some additional work from maintainers to cherry-pick helm changes but it is more stable for users

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 4, 2021
@wongma7 wongma7 force-pushed the chartreleaserbranch branch from 170f037 to 59d8285 Compare August 5, 2021 18:11
@k8s-ci-robot
Copy link
Contributor

@wongma7: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 10, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 10, 2021
@k8s-ci-robot k8s-ci-robot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Dec 10, 2021
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run chart releaser from branches
6 participants