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

Fix detection of rootless Docker #68

Merged
merged 4 commits into from
Mar 4, 2021
Merged

Conversation

SanjayVas
Copy link
Member

This treats Docker Desktop for Mac as rootless as well as fixing rootless detection for Podman.

@SanjayVas SanjayVas requested a review from wangyaopw March 4, 2021 00:23
@SanjayVas SanjayVas enabled auto-merge (squash) March 4, 2021 00:23
@SanjayVas SanjayVas linked an issue Mar 4, 2021 that may be closed by this pull request
@SanjayVas SanjayVas force-pushed the sanjayvas-bazel-container branch from 145074c to 8e20b68 Compare March 4, 2021 01:34
@SanjayVas
Copy link
Member Author

Once this and #69 are in, I think #60 can be closed.

@wangyaopw
Copy link
Collaborator

oops, I accidentally clicked "pushed to origin" in the github desktop, and now this branch got several extra commits.

Is there a way to delete a remote commit?


Now my actual comment,

with this and #69,

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/cc/...

passes

but

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/kotlin/org/wfanet/measurement/common/grpc:TransportSecurityTest

is still failing with

ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: TreeArtifact imports/kotlin/io/grpc/health/v1/health_kt_jvm_grpc_DO_NOT_DEPEND_kt_grpc/ktgrpc was not created
ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: Generating Kotlin gRPC extensions for @io_grpc_grpc_proto//:health_proto failed: not all outputs were created or valid

@SanjayVas SanjayVas force-pushed the sanjayvas-bazel-container branch from 1c1f65b to 8e20b68 Compare March 4, 2021 19:01
@SanjayVas
Copy link
Member Author

oops, I accidentally clicked "pushed to origin" in the github desktop, and now this branch got several extra commits.

Is there a way to delete a remote commit?

Yes, force pushing. I went ahead and did this.

with this and #69,

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/cc/...

passes

but

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/kotlin/org/wfanet/measurement/common/grpc:TransportSecurityTest

is still failing with

ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: TreeArtifact imports/kotlin/io/grpc/health/v1/health_kt_jvm_grpc_DO_NOT_DEPEND_kt_grpc/ktgrpc was not created
ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: Generating Kotlin gRPC extensions for @io_grpc_grpc_proto//:health_proto failed: not all outputs were created or valid

Hmm, I'm surprised this fails to build for you on Docker Desktop for Mac. I was able to get this test to build and pass on Docker on Linux (both rootless and not). The only things that I can think of accounting for the differences are either the Linux VM that's a part of Docker Desktop for Mac, or some additional interaction with the host filesystem. Perhaps try running with --verbose_failures and see if it gives more details?

@wangyaopw
Copy link
Collaborator

wangyaopw commented Mar 4, 2021

oops, I accidentally clicked "pushed to origin" in the github desktop, and now this branch got several extra commits.
Is there a way to delete a remote commit?

Yes, force pushing. I went ahead and did this.

with this and #69,

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/cc/...

passes
but

DOCKER="$HOME/bin/docker-wrapper" tools/bazel-container test //src/test/kotlin/org/wfanet/measurement/common/grpc:TransportSecurityTest

is still failing with

ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: TreeArtifact imports/kotlin/io/grpc/health/v1/health_kt_jvm_grpc_DO_NOT_DEPEND_kt_grpc/ktgrpc was not created
ERROR: /Users/wangyaopw/Documents/GitHub/experimental/cross-media-measurement/imports/kotlin/io/grpc/health/v1/BUILD.bazel:5:20: Generating Kotlin gRPC extensions for @io_grpc_grpc_proto//:health_proto failed: not all outputs were created or valid

Hmm, I'm surprised this fails to build for you on Docker Desktop for Mac. I was able to get this test to build and pass on Docker on Linux (both rootless and not). The only things that I can think of accounting for the differences are either the Linux VM that's a part of Docker Desktop for Mac, or some additional interaction with the host filesystem. Perhaps try running with --verbose_failures and see if it gives more details?

--verbose_failures doesn't show anything additional.

I guess this is also related to bazelbuild/bazel#6393

We can merge in what we currently have I think.

@wangyaopw wangyaopw closed this Mar 4, 2021
auto-merge was automatically disabled March 4, 2021 20:12

Pull request was closed

@wangyaopw wangyaopw reopened this Mar 4, 2021
@SanjayVas SanjayVas merged commit e6519d1 into main Mar 4, 2021
@SanjayVas SanjayVas deleted the sanjayvas-bazel-container branch March 4, 2021 20:41
@SanjayVas
Copy link
Member Author

I guess this is also related to bazelbuild/bazel#6393

This isn't using remote execution. We're doing a local build inside of a Docker container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants