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

Add bump-go action #702

Closed
wants to merge 4 commits into from
Closed

Add bump-go action #702

wants to merge 4 commits into from

Conversation

eternal-flame-AD
Copy link
Member

@eternal-flame-AD eternal-flame-AD commented Oct 15, 2024

Rel: #699

Current logic:

If the stable Go version does not equal GO_VERSION on master and does not equal the version on the bump-go branch then create or update a PR.

Whether to go for a fully automated release I think let's wait and see for maybe 2 cycles and if minimal intervention is required then we can make this automated. I think this should have already taken off a large portion of wasted time for releases which is waiting for CI to finish..

For a fully automated workflow I think the general idea of what to do next is:

  • Pull in updates daily if master is updated but this branch is not.
  • Detect a review submission and after some sanity checks (no new pushes to master, etc), merge to master and generate a new tag automatically using the current release infrastructure.

Signed-off-by: eternal-flame-AD <[email protected]>
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (58084c8) to head (5b8da11).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #702   +/-   ##
=======================================
  Coverage   80.46%   80.46%           
=======================================
  Files          56       56           
  Lines        2191     2191           
=======================================
  Hits         1763     1763           
  Misses        337      337           
  Partials       91       91           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: eternal-flame-AD <[email protected]>
@eternal-flame-AD eternal-flame-AD marked this pull request as ready for review October 15, 2024 22:51
@eternal-flame-AD eternal-flame-AD requested a review from a team as a code owner October 15, 2024 22:51
@eternal-flame-AD
Copy link
Member Author

What do you think of this plan? @jmattheis

To test the current solution on actual GH actions, merge, close #701, delete the bump-go branch, then trigger the workflow by dispatch or cron.

Signed-off-by: eternal-flame-AD <[email protected]>
--body "This PR was automatically created by the bump-go action."
else
first_id=$(echo "$existing_prs" | sort -nr | head -n 1)
gh pr edit $first_id --title "$PR_KEYWORD Bump Go to $latest_version"
Copy link
Member

Choose a reason for hiding this comment

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

Have you considered using renovate / dependabot for this https://docs.renovatebot.com/modules/manager/regex/. I haven't used this specific feature of renovate, but renovate should provide the logic for opening PRs when there is a new version, and updating existing PRs with newer versions. I think the config could look like this

{
  "regexManagers": [
    {
      "fileMatch": ["^GO_VERSION$"],
      "matchStrings": ["^(?<currentValue>\\d+\\.\\d+\\.\\d+)$"],
      "datasourceTemplate": "docker",
      "depNameTemplate": "golang"
    }
  ]
}

We probably could reference the gotify/build image there, so that it would only create a PR when there is a newer gotify/build image. We could then also add renovate to gotify build to update when there are newer golang docker images.

Generally, I'd rather use these tools than custom scripts as they seem easier to maintain, and I think gotify could also benefit from automatic dep updates (at least for the backend).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah makes sense I support this, although you are in a better position to introduce a new tool like this (I think I don't even have the permission to do it).

Copy link
Member

Choose a reason for hiding this comment

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

I've added renovate to gotify/server and gotify/build. It needs configuration in the repo, there we probably have to only whitelist Go / docker, so that it doesn't update the js deps for now.

@eternal-flame-AD
Copy link
Member Author

Replaced by #706

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants