fix: Better Go build flags for plugins packaging#2415
Merged
kodiakhq[bot] merged 1 commit intomainfrom Feb 23, 2026
Merged
Conversation
disq
approved these changes
Feb 23, 2026
murarustefaan
approved these changes
Feb 23, 2026
There was a problem hiding this comment.
Pull request overview
This pull request improves the Go build configuration for plugin packaging by adding three standard build flags that enhance reproducibility and cache reusability.
Changes:
- Added
-trimpath,-buildvcs=false, and-mod=readonlyflags to the Go build command used for plugin packaging
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kodiakhq bot
pushed a commit
that referenced
this pull request
Feb 23, 2026
🤖 I have created a release *beep* *boop* --- ## [4.94.3](v4.94.2...v4.94.3) (2026-02-23) ### Bug Fixes * Better Go build flags for plugins packaging ([#2415](#2415)) ([934226b](934226b)) * **deps:** Update module github.com/cloudquery/codegen to v0.3.37 ([#2410](#2410)) ([c812b39](c812b39)) * **deps:** Update module github.com/cloudquery/plugin-pb-go to v1.27.7 ([#2414](#2414)) ([51f4d60](51f4d60)) * **deps:** Update module google.golang.org/grpc to v1.79.1 ([#2412](#2412)) ([f617806](f617806)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
trimpathandbuildvcsare better for cache re-usability and reproducible builds (we already include plugins versions inresources/plugin.Versionso we don't need the VCS data).Also
mod=readonlyensuresgo builddoesn't modifygo.modorgo.sumUse the following steps to ensure your PR is ready to be reviewed
go fmtto format your code 🖊golangci-lint run🚨 (install golangci-lint here)