-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixes broken local macOS build and completes migration to GH actions #160
Conversation
I use OS/X and verified this works now. It will be very much more productive for me when this is in, because formerly I had to rely on CI to tell if all tests pass or not.
|
@@ -32,42 +31,44 @@ import ( | |||
"github.com/tetratelabs/getenvoy/pkg/binary/envoytest" | |||
) | |||
|
|||
func TestMain(m *testing.M) { |
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.
I moved this into the test preconditions as it isn't necessary to do this for anything in the package
// In a normal macOS setup, you cannot write to /dev/stdout, which is the default path here. | ||
// While not Docker-specific, there are related notes here https://github.com/moby/moby/issues/31243 | ||
// Since this test doesn't read access logs anyway, the easier workaround is to disable access logging. | ||
args.MeshConfig.AccessLogFile = "" |
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.
Key fix for darwin is here, and when there's a better solution (than running as root or changing host perms), hopefully this comment explains enough.
require.NoError(t, err, "error stating %v", path) | ||
|
||
if runtime.GOOS == `darwin` { // process.OpenFiles in unsupported, so this feature won't work | ||
require.Empty(t, f.Size(), "file %v was not empty", path) |
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.
better to do a negative test than always fail osx builds
37e7961
to
49f81f9
Compare
circleci needs to be removed as a required check to merge this (we no longer use it) |
.github/workflows/commit.yaml
Outdated
strategy: | ||
matrix: | ||
runner: | ||
- os: macos-latest |
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.
in circleci, we only tested ubuntu. this also tests macos which saves devs like me who use it. if this fails, we can assume dev workflow is busted.
E2E failures are unrelated as this doesn't change anything E2E related. It appears we hit docker.io rate limits again #149 |
@codefromthecrypt The macos test has never succeeded, and I must see that pass before merging. |
looks like it's stuck somewhere in the tests. |
I reproduced the same hang of test in my local mac (with the latest docker for mac on Catalina 10.15.7). |
a10e3ee
to
06e6e8e
Compare
I have a hunch the hang is timeout related, our "unit tests" perform I/O, download envoy etc, it seems easy to get over 60s, especially in osx. I'll remove that for a job timeout especially until test migrations occur. |
even though the macos build is fixed for me locally, I think it isn't quite working in CI. I'll un-tag this from fixing OS/X even if it is fine local. At any rate, this is progress from before as before even local didn't work. Once we migrate completely off ginkgo, it should be easier to identify what's wrong as timeouts will be coherent then. |
6805284
to
a7144fe
Compare
not sure why GH actions fell of the checks, but this is the run https://github.com/tetratelabs/getenvoy/actions/runs/721808158 |
Most notably, we have no control over process.OpenFiles, so this avoids testing side-effects of that in Darwin, while mentioning the limitation. If a future version of go supports that, the test will break (in a good way!). Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Signed-off-by: Adrian Cole <adrian@tetrate.io>
a7144fe
to
894ff3e
Compare
@mathetake fyi there might be some cleanup in circleci so that builds aren't attempted anymore on any branch |
This fixes the broken macOS build and completes migration to GitHub
actions. This doesn't yet fix CI os/x build, as that will still be tracked in
#88.
Most notably, we have no control over process.OpenFiles, so this avoids
testing side-effects of that in Darwin, while mentioning the limitation.
If a future version of go supports that, the test will break (in a good
way!).
On the topic of CI, this moves the unit test and coverage part to GH
actions, and most importantly enables macOS matrix tests. This helps
give confidence for those not using macOS to review change such as
this.
See #88
Fixes #89
Fixes #100