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

buildvcs=false must be added to a default build args #672

Closed
develar opened this issue Mar 27, 2022 · 4 comments
Closed

buildvcs=false must be added to a default build args #672

develar opened this issue Mar 27, 2022 · 4 comments

Comments

@develar
Copy link

develar commented Mar 27, 2022

Since Go 1.18

The go command now embeds version control information in binaries. It includes the currently checked-out revision, commit time, and a flag indicating whether edited or untracked files are present. Version control information is embedded if the go command is invoked in a directory within a Git, Mercurial, Fossil, or Bazaar repository, and the main package and its containing main module are in the same repository. This information may be omitted using the flag -buildvcs=false.

It means, that go binary maybe changed without actual changes, and also means that building on CI machine is failed (since no Git in path).

Workaround: prepend ko command with GOFLAGS="-buildvcs=false"

@imjasonh
Copy link
Member

It might make sense to add a -buildvcs flag to ko, but I think if there's a workaround it might not become a priority. We could document this better though, perhaps in an FAQ section in the readme.

@imjasonh imjasonh added good first issue Good for newcomers docs labels Mar 27, 2022
@blanet
Copy link

blanet commented Apr 7, 2022

Better add something like -buildvcs=auto as a default?

@imjasonh
Copy link
Member

imjasonh commented Apr 7, 2022

Better add something like -buildvcs=auto as a default?

I had to look this up myself. It looks like -buildvcs=auto is a new option being planned for the next Go 1.18 patch release: see golang/go#51798 and golang/go#51748

valyala added a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue May 11, 2022
… builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- #2508 (comment) ,
- ko-build/ko#672
- golang/go#49004
valyala added a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue May 11, 2022
… builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- #2508 (comment) ,
- ko-build/ko#672
- golang/go#49004
hagen1778 pushed a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue May 12, 2022
* deployment/docker: pass `-buildvs=false` to `go build` for production builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- #2508 (comment) ,
- ko-build/ko#672
- golang/go#49004

* lib/netutil: limit the number of concurrently established connections when calling ConnPool.Get()

This should reduce potential spikes in the number of established connections in the following cases:
- when the connection establishing procedure becomes temporarily slow
- after a temporary spike in the rate of ConnPool.Get() calls

See #2552

* docs/CHANGELOG.md: document c8af625

See #1322 (comment)

* docs/Cluster-VictoriaMetrics.md: typo fix: `by by` -> `by`

* docs: add `resource usage limits` docs, which describe fine-grained tuning for various resource usage limits

* docs/Cluster-VictoriaMetrics.md: the `/api/v1/label/.../values` query can take CPU and ram at both vmstorage and vmselect

* Update root Readme and root vmagent readme

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
valyala added a commit to VictoriaMetrics/VictoriaMetrics that referenced this issue May 13, 2022
* deployment/docker: pass `-buildvs=false` to `go build` for production builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- #2508 (comment) ,
- ko-build/ko#672
- golang/go#49004

* lib/netutil: limit the number of concurrently established connections when calling ConnPool.Get()

This should reduce potential spikes in the number of established connections in the following cases:
- when the connection establishing procedure becomes temporarily slow
- after a temporary spike in the rate of ConnPool.Get() calls

See #2552

* docs/CHANGELOG.md: document c8af625

See #1322 (comment)

* docs/Cluster-VictoriaMetrics.md: typo fix: `by by` -> `by`

* docs: add `resource usage limits` docs, which describe fine-grained tuning for various resource usage limits

* docs/Cluster-VictoriaMetrics.md: the `/api/v1/label/.../values` query can take CPU and ram at both vmstorage and vmselect

* Update root Readme and root vmagent readme

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
AndrewChubatiuk pushed a commit to AndrewChubatiuk/VictoriaMetrics that referenced this issue May 13, 2022
… builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- VictoriaMetrics#2508 (comment) ,
- ko-build/ko#672
- golang/go#49004
AndrewChubatiuk pushed a commit to AndrewChubatiuk/VictoriaMetrics that referenced this issue May 13, 2022
* deployment/docker: pass `-buildvs=false` to `go build` for production builds

This should resolve the `error obtaining VCS status: exit status 128` error
when the environment contains incorrect version of git or has incorrect access rights
to the directory with VictoriaMetrics source code.

See the following links for additional info:
- VictoriaMetrics#2508 (comment) ,
- ko-build/ko#672
- golang/go#49004

* lib/netutil: limit the number of concurrently established connections when calling ConnPool.Get()

This should reduce potential spikes in the number of established connections in the following cases:
- when the connection establishing procedure becomes temporarily slow
- after a temporary spike in the rate of ConnPool.Get() calls

See VictoriaMetrics#2552

* docs/CHANGELOG.md: document c8af625

See VictoriaMetrics#1322 (comment)

* docs/Cluster-VictoriaMetrics.md: typo fix: `by by` -> `by`

* docs: add `resource usage limits` docs, which describe fine-grained tuning for various resource usage limits

* docs/Cluster-VictoriaMetrics.md: the `/api/v1/label/.../values` query can take CPU and ram at both vmstorage and vmselect

* Update root Readme and root vmagent readme

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
@github-actions
Copy link

github-actions bot commented Jul 7, 2022

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Keep fresh with the 'lifecycle/frozen' label.

@github-actions github-actions bot closed this as completed Aug 6, 2022
rminnich added a commit to rminnich/gokvm that referenced this issue Aug 12, 2022
see: ko-build/ko#672

It changed in go1.18 and is breaking CI for others too.

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants