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

CI and PR template improvements #26

Merged
merged 6 commits into from
Jul 15, 2024
Merged

Conversation

bd-g
Copy link
Collaborator

@bd-g bd-g commented Jul 12, 2024

Proposed changes

This change improves the DevOps portion of this repo in the following ways:

  • Adds a standardized Pull Request template
  • Adds a CI check to ensure that the Helm chart appVersion is not updated without also bumping the chart Version
  • Adds a CI check to ensure that the chart changelog is updated if the chart is updated
  • Improves reliability of the publish GH action
    • The chart-releaser-action will attempt to run if git detects any changes at all in the chart directory.
    • This means if a change was merged, but we aren't yet cutting a release by bumping the version number, git will still detect changes and so chart-releaser-action will attempt to run.
    • It will create a tarball and attempt to create a release, but under the same version as the current/latest version. GitHub will return an error complaining that a release already exists under that name/version:
    Error: error creating GitHub release deepgram-self-hosted-0.2.2-beta: POST https://api.github.com/repos/deepgram/self-hosted-resources/releases: 422 Validation Failed [{Resource:Release Field:tag_name Code:already_exists Message:}]
    
    • So instead, this PR adds an explicit check to see if the Chart version has been bumped before taking the GH action

Types of changes

What types of changes does your code introduce to the Deepgram self-hosted resources?

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have tested my changes in my local self-hosted environment
    • I tested all GH action modifications locally using act.
  • I have added necessary documentation (if appropriate)

@bd-g bd-g requested a review from a team as a code owner July 12, 2024 05:41
@bd-g
Copy link
Collaborator Author

bd-g commented Jul 12, 2024

Need to add one more commit here to add a simple CI check that the chart CHANGELOG.md is updated whenever changes are made to the chart.

echo "Old appVersion: $OLD_APP_VERSION"
echo "New appVersion: $NEW_APP_VERSION"
echo "Chart version: $NEW_VERSION"
echo "Chart version should be bumped anytime the application version is bumped."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this bump done manually, or through helm-docs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Helm-docs just updates the README based on the contents of the Chart.yaml. Ultimately, the source of truth for the version is going to be the Chart.yaml, which needs to be manually edited.

Update scenarios for these versions could include:

  • No version bump. We are making changes that we don't want to release yet, but want to merge.
  • Bump only the chart version. This could include an update to the templates that doesn't bump the container tags (which map to the Deepgram self hosted release and is what we use for the appVersion)
  • Bump both the chart and app version for an update that includes changing the container tags.

Any other combination of version bump, like updating the app version but not chart version, shouldn't be allowed.

@bd-g bd-g marked this pull request as draft July 13, 2024 16:23
@bd-g bd-g force-pushed the brent-george/check-helm-version-bump branch from a391ca2 to 7b45d4e Compare July 13, 2024 21:46
@bd-g bd-g marked this pull request as ready for review July 13, 2024 21:49
@bd-g bd-g merged commit 6142d32 into main Jul 15, 2024
1 check passed
@bd-g bd-g deleted the brent-george/check-helm-version-bump branch July 15, 2024 14:52
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