-
Notifications
You must be signed in to change notification settings - Fork 712
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
[Power Support] Enable weaveworks scope on Power. #3231
Conversation
There are some build changes as well, which should fix these error. Another PR is in-progress for the build fixes. |
Note there is a lint failure in this PR. |
Yes, @bboreham , I am looking into this. I am expecting my build-changes should get this resolved. |
probe/process/walker_linux_test.go
Outdated
@@ -8,6 +8,7 @@ import ( | |||
"github.com/weaveworks/common/test" | |||
"github.com/weaveworks/common/test/fs" | |||
"github.com/weaveworks/scope/probe/process" | |||
"os" |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Not sure we're talking about the same thing. The error is:
|
@meghalidhoble Please run |
@@ -1,4 +1,4 @@ | |||
FROM node:8.4.0 | |||
FROM node:8.11 |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -0,0 +1,284 @@ | |||
package endpoint |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Please run |
Thanks @bboreham , your suggestion helped to resolve the failure. |
backend/Dockerfile
Outdated
go install -race -tags netgo std; \ | ||
fi | ||
RUN export arch_val="$(dpkg --print-architecture)"; \ | ||
if [ "$arch_val" != "ppc64el" ]; then \ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@@ -1,14 +1,32 @@ | |||
FROM golang:1.10.2-stretch | |||
FROM golang:1.10.2 |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Please put into each commit message a description of the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much cleaner; I have some queries in the detail.
More generally, we still need to have every change described in commit messages - people will look back in a year and want to know why a line changed.
probe/endpoint/dns_snooper.go
Outdated
@@ -1,3 +1,7 @@ | |||
// +build linux,amd64 ppc64le |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
backend/Dockerfile
Outdated
RUN apt-get update && \ | ||
RUN set -eux; \ | ||
export arch_val="$(dpkg --print-architecture)"; \ | ||
if [ "$arch_val" != "ppc64el" ]; then \ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
chmod +x shfmt && \ | ||
mv shfmt /usr/bin | ||
export arch_val="$(dpkg --print-architecture)"; \ | ||
if [ "$arch_val" != "ppc64el" ]; then \ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
backend/Dockerfile
Outdated
chmod +x shfmt && \ | ||
mv shfmt /usr/bin; \ | ||
else \ | ||
go get -u mvdan.cc/sh/cmd/shfmt && \ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
probe/endpoint/dns_snooper.go
Outdated
@@ -1,4 +1,5 @@ | |||
// +build linux,amd64 ppc64le | |||
// +build linux | |||
// +build amd64 ppc64le |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
backend/Dockerfile file - Minor if conditional changes to have cross-compile on amd64 only. Also removed the sh-lint support (shfmt installation) for ppc64le completely, as the older version of shfmt is not supported for ppc and newer version doesn't go well with application. tools/lint file - Added conditional to not run "sh lint" (make lint) for ppc64le. Fixes PR weaveworks#3231
…syntax corrections. Hence pushing the change according to the shfmt run from x86 setup. This change was to skip the sh-lint run on powerpc. PR weaveworks#3231
Hi @bboreham , |
@meghalidhoble please can you squash the commits into a smaller number so we don't have dead-ends and back-tracking in the history. Leave each commit explaining what it does. |
…ppc64le) 1)backend/Dockerfile 2) probe/endpoint/dns_snooper.go 3) client/Dockerfile 4) docker/Dockerfile.cloud-agent 5) probe/process/walker_linux_test.go & 6) tools/lint 1)'backend/Dockerfile' : Conditional added so that the cross-compiling should be done on amd64. Also removed support for sh-lint for ppc64le for now. As the version for shfmt mentioned in the dockerfile is not available for ppc64le and the later version does't work fine with existing application. 2)'probe/endpoint/dns_snooper.go' : Renamed this file so as to reuse for ppc64le and added a build-constraint. Now this file will be build for amd64 on linux and ppc64le on linux. 3)'client/Dockerfile' : Modified the version of the base image for node from 8.4.0 to 8.11, as this version supports multiarch. 4)'docker/Dockerfile.cloud-agent' : Modified the version of the base image for golang from 1.10.2-strech to 1.10.2, which supports multiarch. 5) 'probe/process/walker_linux_test.go' : Test fixed to run for ppc64le, modified the code to accept RSSBytes based on pageSize value per architecture, instead of hard-coded values. 6)'tools/lint' : Modified the file to skip the sh-lint implementation for ppc64le. PR weaveworks#3231
Hi @bboreham , squashed all the commits to a single commit, with all the implementation details for each file being modified. Please take a look. |
Sadly, it is inappropriate to directly modify anything in the I'm sure this is maddening. I might just change it to do nothing if it can't find |
…heck. Why the change : Need to skip the shfmt validation, for ppc64le as shfmt specified version is not available. Hence added a check to run shfmt if the binary found, else skip the validation completely. PR weaveworks#3231
Why the change : make lint fails while sh-lint is being executed. PR weaveworks#3231
Why : Corrected comment and re-formatted as per guidelines PR weaveworks#3231
Hi @bboreham , |
Multiple commits is fine as long as they all form a progression and are all self-explanatory. However the issue is that to change a file under the |
Hi @bboreham , I have raised a pull request at build-tools repo with the lint changes, once those changes are approved, I will run git subtree to update the directory in this repo. |
…ppc64le) 1)backend/Dockerfile 2) probe/endpoint/dns_snooper.go 3) client/Dockerfile 4) docker/Dockerfile.cloud-agent 5) probe/process/walker_linux_test.go & 6) tools/lint 1)'backend/Dockerfile' : Conditional added so that the cross-compiling should be done on amd64. Also removed support for sh-lint for ppc64le for now. As the version for shfmt mentioned in the dockerfile is not available for ppc64le and the later version does't work fine with existing application. 2)'probe/endpoint/dns_snooper.go' : Renamed this file so as to reuse for ppc64le and added a build-constraint. Now this file will be build for amd64 on linux and ppc64le on linux. 3)'client/Dockerfile' : Modified the version of the base image for node from 8.4.0 to 8.11, as this version supports multiarch. 4)'docker/Dockerfile.cloud-agent' : Modified the version of the base image for golang from 1.10.2-strech to 1.10.2, which supports multiarch. 5) 'probe/process/walker_linux_test.go' : Test fixed to run for ppc64le, modified the code to accept RSSBytes based on pageSize value per architecture, instead of hard-coded values. 6)'tools/lint' : Modified the file to skip the sh-lint implementation for ppc64le. PR weaveworks#3231
Thanks! |
Observed this particular test was failing on ppc64le architecture. Added the test failure log below,
walker_linux_test.go:97:
Hence modified the value for RSSBytes to accept variable value which is computed based on pageSize instead of hard-coded values, as suggested by Adam Harrison over slack channel.
I have verified this patch on x86 setup as well and all the tests pass there. Please provide your comments/suggestions on this.
Thanks,
Meghali