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

fix: helm chart deploy to open PRs to now-protected gh-pages branch #31155

Merged
merged 22 commits into from
Nov 26, 2024

Conversation

mistercrunch
Copy link
Member

@mistercrunch mistercrunch commented Nov 25, 2024

Cleaning up the mess I created by deleting the gh-pages branch by mistake while deleting hundreds of stale branches in the repo.

The changes here make it such that pushing a new helm chart version will now open a PR against the now-protected gh-pages branch, require a review and merge to be deployed.

Testing now with:

gh workflow run superset-helm-release.yml --ref helm_fix --field ref=master

Logs / iterations can be followed here -> https://github.com/apache/superset/actions/workflows/superset-helm-release.yml

The approach here is to:

  • define a working branch helm-publish-{SHA}
  • pull/push gh-pages onto that temp branch
  • tell chart-releaser-action that the branch we're working with is NOT gh-pages (protected, can't push there), but instead is a temporary branch
  • use a small script to open a PR from temp branch to gh-pages

Cleaning up the mess I created by deleting the `gh-pages` branch by mistake while deleting hundreds of stale branches in the repo.

The changes here make it such that pushing a new helm chart version will now open a PR against the now-protected `gh-pages` branch, require a review and merge to be deployed.
@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Nov 25, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 25, 2024
@pull-request-size pull-request-size bot added size/M and removed size/L labels Nov 26, 2024
@pull-request-size pull-request-size bot added size/L and removed size/M labels Nov 26, 2024
Copy link
Member

Choose a reason for hiding this comment

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

Huh... don't think I've seen it show this before. Neat!

@@ -1,4 +1,4 @@
name: Lint and Test Charts
name: "Helm: lint and test charts"
Copy link
Member

Choose a reason for hiding this comment

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

Nice improvement... I'll bet half the people that see this think it's eslint and dataviz charts :)

Copy link
Member Author

Choose a reason for hiding this comment

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

It's been bugging me for a moment. Making the repo a better place, one line at a time.

name: Release Charts
# This workflow automates the release process for Helm charts.
# The workflow creates a new branch for the release and opens a pull request against the 'gh-pages' branch,
# allowing the changes to be reviewed and merged manually.
Copy link
Member

Choose a reason for hiding this comment

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

We should probably expand the code owners for these reviews... maybe you want to be one?

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM. Don't see any risks here... like the approach, love the notes :D

@mistercrunch mistercrunch merged commit 97683ec into master Nov 26, 2024
61 of 62 checks passed
@rusackas rusackas deleted the helm_fix branch November 26, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deploy:helm github_actions Pull requests that update GitHub Actions code preset-io size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants