feat!: split trace/contrib integrations into individual Go modules #49
Open
Abhijeet Prasad (AbhiPrasad) wants to merge 2 commits intomainfrom
Open
feat!: split trace/contrib integrations into individual Go modules #49Abhijeet Prasad (AbhiPrasad) wants to merge 2 commits intomainfrom
Abhijeet Prasad (AbhiPrasad) wants to merge 2 commits intomainfrom
Conversation
e14849a to
23bd30d
Compare
|
|
||
| [hooks] | ||
| postinstall = "mise generate git-pre-commit --write --task=verify-fmt" | ||
| postinstall = "mise generate git-pre-commit --write" |
Contributor
There was a problem hiding this comment.
is this fast and quiet :) pre-commit hooks must be fast and silent if everything is fine
Contributor
Matt Perpick (clutchski)
left a comment
There was a problem hiding this comment.
I think i support this. we should also verify that we now depend on the lowest version of things we possibly can.
mise.toml
Outdated
| run = "./scripts/check_nested_modules.sh" | ||
|
|
||
| [tasks.pre-commit] | ||
| silent = true |
Contributor
There was a problem hiding this comment.
Note! This should only be silent if everything is fine. It can print output if it fails see verify-fmt
6f87506 to
bf2972e
Compare
- split trace and contrib integrations into individual Go modules - harden the multi-module release pipeline - apply review/test/version pin follow-ups from PR feedback
bf2972e to
b15d66f
Compare
Member
Author
|
okay this should be ready for review and merge now! Cleaned up a bunch from the initial implementation. I've also updated all the integrations to be pinned to the minimum possible version that needs to be supported. |
Contributor
|
Approved. Just make sure it's a clear upgrade path for users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI Summary
Split every
trace/contribintegration into its own Go module (mirroring the architecture of DataDog/dd-trace-go) and overhaul the release pipeline to correctly handle an arbitrary number of nested modules.Integration provider SDKs are no longer transitive dependencies of the root module. Users must now explicitly depend on the specific integration modules they use.
Before
This single dependency transitively pulled in every integration provider SDK
(OpenAI, Anthropic, Google GenAI, etc.), even if you only used one.
After
If you want every integration at once (previous behavior), use the
trace/contrib/allconvenience module:Available integration modules
trace/contrib/openaitrace/contrib/anthropictrace/contrib/genaitrace/contrib/genkittrace/contrib/adktrace/contrib/langchaingotrace/contrib/cloudwego/einotrace/contrib/github.com/sashabaranov/go-openaitrace/contrib/allNew release process
Releases are now fully automated via GitHub Actions across three stages.
Full details in
docs/PUBLISHING.md.How it works
Prepare (manual trigger) — run the "Prepare Release" workflow with a
version like
v1.2.3. It creates arelease/vX.Y.Zbranch, pins the rootmodule version and any nested-module interdependencies in every nested
go.mod, and opens a PR.Review & merge — the PR should only contain
go.mod/go.sumversion-pin updates. Merge through the normal protected-branch process.
Tag & publish (automatic) — merging triggers:
make cion the merge commit, then creates tagsfor the root module (
vX.Y.Z) and every nested module(
<module-path>/vX.Y.Z).goreleaserand warmsthe Go module proxy cache.
Key improvements in the release pipeline
internal/nestedmodules)topologically sorts nested modules so that a module is always tagged after any
other nested modules it depends on (e.g.,
trace/contrib/alldepends ontrace/contrib/openai, soopenaiis tagged first).git push --atomic,ensuring the publish workflow only fires after every tag exists on the remote.
This prevents partial-release races.
merge commit SHA (
github.event.pull_request.merge_commit_sha) instead ofmain, avoiding a race where a later commit lands between merge and tag.times with backoff instead of a fire-and-forget
curl.Adding a new integration
scripts/nested_modules.txt.replacedirective in itsgo.modpointing to the repo root.check-nested-modulesMake target will catch any manifest drift.