chore(extension/alloyengine): Publish as independent Go module#5956
chore(extension/alloyengine): Publish as independent Go module#5956
Conversation
🔍 Dependency Reviewgithub.com/grafana/alloy v0.0.0-00010101000000-000000000000 -> v1.15.0 — ✅ SafeSummary:
Why this is safe:
Evidence (from the diff): --- collector/go.mod
-require (
- github.com/grafana/alloy v0.0.0-00010101000000-000000000000
+require (
+ github.com/grafana/alloy v1.15.0
github.com/grafana/alloy/extension/alloyengine v0.1.0
...Action needed:
Suggested verification:
Notes
|
|
yay! |
jharvey10
left a comment
There was a problem hiding this comment.
Even though we can version the alloyengine extension separately from base Alloy, I'd recommend we don't do that.
To me, it seems fair to have them always synchronized since the extension is pretty much just a wrapper around Alloy. The only potential "gotcha" with doing that is that if the extension's wrapper code itself needs an update (even if base Alloy doesn't need an update), we'd need to bump Alloy in order to do that as a BAU PR like for anything else Alloy-related.
Said differently: A merged change affecting just the alloyengine extension would create a normal changelog entry for base Alloy, which would get picked up as a change for the next "normal" Alloy release by the existing release-please process.
Given that approach, all we'd need to do is have a basic workflow which runs when new alloy release tags get published and reacts by pushing a corresponding tag for the extension, e.g. extension/alloyengine@v1.15.0.
The go.mod "sync" would be handled by release-please (via an "extra file") and the tagging would be a small workflow file. No separate release-please package needed. Since we're locally replacing the module, there's no go.sum update needed to go along with that either.
There's an extremely tiny gap between when the go.mod file gets updated with the new alloy version (when the PR gets merged) and when the tag actually gets created, but we're talking maybe 30 seconds, max, and none of the build artifacts would have started building until the tag exists anyway, so the risk is incredibly minimal.
|
I think that's all fair, our goal wasn't really to have a process to release it independently so keeping it a post process makes sense. I updated the PR accordingly. |
Brief description of Pull Request
Publishes
extension/alloyengineas an independently versioned Go module so it can be referenced from external OpenTelemetry Collector Builder distros.Pull Request Details
The
extension/alloyenginemodule has its owngo.modbut has never been tagged or tracked by release-please, making it impossible to reference from external OpenTelemetry Collector Builder distros.This adds
extension/alloyengineto release-please so it gets tagged alongside each Alloy release (e.g.extension/alloyengine/v1.15.0). It also updates therequireforgithub.com/grafana/alloyfrom the sentinel version (v0.0.0-00010101000000-000000000000) tov1.15.0so external consumers can resolve the transitive dependency from the module proxy — the existingreplacedirective continues to override this locally.Finally,
extension/alloyengine/go.modis added to the root package'sextra-filesso the require version stays in sync with the Alloy version on each future release.Issue(s) fixed by this Pull Request
Fixes #5823
Notes to the Reviewer
I'll create the
extension/alloyengine/v1.15.0tag manually after merging to backfill the current release. Future releases will be tagged automatically by release-please.