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

Makefile: always use .go_version #4710

Merged
merged 1 commit into from
Feb 10, 2021
Merged

Conversation

axw
Copy link
Member

@axw axw commented Feb 10, 2021

Motivation/summary

The Makefile runs various Go commands as part of variable expansions, for example to identify the beats module and to determine $GOOS. This only works if Go is installed on the machine already.

To better support machines that do not have Go installed, and to avoid running builds with mixed versions of Go, run ./script/run_with_go_ver in the Makefile to force the use of the Go version defined in .go_version for all targets, shell invocations, and subprocesses. This ensures also ensures we can build on machines that do not have Go installed already.

How to test these changes

make, check apm-server is built with the appropriate version of Go

Related issues

None.

Run ./script/run_with_go_ver in the Makefile to force
the use of the Go version defined in .go_version for
all targets and subprocesses. This ensures also ensures
we can build on machines that do not have Go installed
already.
@apmmachine
Copy link
Contributor

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #4710 opened

  • Start Time: 2021-02-10T01:55:43.766+0000

  • Duration: 42 min 46 sec

  • Commit: 25ff618

Test stats 🧪

Test Results
Failed 0
Passed 4628
Skipped 124
Total 4752

Trends 🧪

Image of Build Times

Image of Tests

Steps errors 3

Expand to view the steps failures

Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage
Compress
  • Took 0 min 0 sec . View more details on here
  • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests
Test Sync
  • Took 3 min 24 sec . View more details on here
  • Description: ./.ci/scripts/sync.sh

@axw axw merged commit 9553a0a into elastic:master Feb 10, 2021
@axw axw deleted the makefile-goversion branch February 10, 2021 02:38
Copy link
Contributor

@simitt simitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@axw
Copy link
Member Author

axw commented Feb 10, 2021

Adding this to the test plan to verify that subsequent release-manager builds are built with the expected version of Go.

axw added a commit to axw/apm-server that referenced this pull request Feb 18, 2021
Run ./script/run_with_go_ver in the Makefile to force
the use of the Go version defined in .go_version for
all targets and subprocesses. This ensures also ensures
we can build on machines that do not have Go installed
already.
# Conflicts:
#	Makefile
axw added a commit that referenced this pull request Feb 18, 2021
Run ./script/run_with_go_ver in the Makefile to force
the use of the Go version defined in .go_version for
all targets and subprocesses. This ensures also ensures
we can build on machines that do not have Go installed
already.
# Conflicts:
#	Makefile
@jalvz jalvz self-assigned this Feb 23, 2021
@jalvz
Copy link
Contributor

jalvz commented Feb 23, 2021

Checked printing the runtime.BuildVersion is a delve debugging session, works as expected.

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.

4 participants