Skip to content

Conversation

oxzi
Copy link
Member

@oxzi oxzi commented Mar 22, 2024

When Go modules mature and their major version has exceeded one, the module path requires a version suffix, such as /v2. Unfortunately, the Dependabot is unable to detect such a Go module major version bump for suffixed major versions, resulting in stalling dependencies - dependabot/dependabot-core#2213.

By introducing another GitHub Actions Workflow utilizing gomajor, those major version updates for Go modules can be identified. As a scheduled workflow, running each Monday morning, it will either create or update an open GitHub issue with all currently available major version updates for referenced Go modules.

As a playground, I have forked this repository to another GitHub repository. Please feel free to take a look at its issue tracker. Issue oxzi/icingadb-go-mod-major-test#1, for example, shows how a new issue was first created and later re-used while it was still open. After it was closed, a new issue oxzi/icingadb-go-mod-major-test#2 was created and used afterwards, until this one was also closed.

An open issue will look like the following:

Go Module Major Version Updates

There are major version updates available for used Go modules.

Updates in .

  1. github.com/go-redis/redis/v8: v8.11.5 [latest v9.5.1]
  2. github.com/vbauerster/mpb/v6: v6.0.4 [latest v8.7.2]

Updates in tests

  1. github.com/go-redis/redis/v8: v8.11.5 [latest v9.5.1]

If this idea suits you, I can also submit this PR against our other Go projects.

@cla-bot cla-bot bot added the cla/signed label Mar 22, 2024
@oxzi oxzi force-pushed the github-actions-go-mod-major branch from c590ca4 to abc1cec Compare March 22, 2024 13:37
When Go modules mature and their major version has exceeded one, the
module path requires a version suffix, such as "/v2"[0]. Unfortunately,
the Dependabot is unable to detect such a Go module major version bump
for suffixed major versions[1], resulting in stalling dependencies.

By introducing another GitHub Actions Workflow utilizing gomajor[2],
those major version updates for Go modules can be identified. As a
scheduled workflow, running each Monday morning, it will either create
or update an open GitHub issue with all currently available major
version updates for referenced Go modules.

[0]: https://go.dev/ref/mod#major-version-suffixes
[1]: dependabot/dependabot-core#2213
[2]: https://github.com/icholy/gomajor
@oxzi oxzi force-pushed the github-actions-go-mod-major branch from abc1cec to f1812ad Compare March 22, 2024 13:48
@oxzi oxzi requested a review from julianbrost April 8, 2024 14:01
name: Go Module Major Update Check
on:
schedule:
- cron: '30 6 * * 1' # at 06:30 every Monday morning
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 used this trick myself and according to GH's eMails they're auto-suspending these jobs after the last code change and an mount of time I don't remember.

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

Successfully merging this pull request may close these issues.

2 participants