Skip to content

[Prism]: Support Docker in MacOS with transforms for Cross Language #35392

@nguymin4

Description

@nguymin4

What would you like to happen?

I tried to run the example of Go SDK - SQL locally with Prism Runner

  • Linux: ✅ - Succeeded
  • MacOS: ❌ - Failed

Issue

localhost is set and used in many places in Prism runner (Go), and thus this doesn't work on Mac as we should use host.docker.internal instead

Proposed changes

I now have a working solution for this issue locally.
Based on my testing, there are at least 2-3 places needs to be modified (depends on implementation)

Challenges

  1. We need to modify the GetProvisionInfo and dockerEnvironment at the same time. I found this ticket https://issues.apache.org/jira/browse/BEAM-8201
    => If I understand correctly, it still relies on the combination of the CLI args and the provisioning API. We probably want to consolidate this?

  2. In NewMultipleW actually I can only make this work if I replace localhost with the actual ipv4 address of host e.g. 192.168.x.x
    => And if we use the IP address, we don't need to modify func dockerEnvironment. But I'm open for advice and suggestion as I don't like using IP like this either.

  3. I saw a TODO in pkg/beam/runners/prism/internal/environments.go // TODO move environment handling to the worker package. but I don't know our current plan with this.

Summary

  • I have a working version in my local machine, tested on both Linux and MacOS.
    • However, as mentioned in the challenges section, before creating the PR, I hope we can discuss my implementation plan above.
  • I can contribute more to this beside my issue with Docker on MacOS

Issue Priority

Priority: 2 (default / most feature requests should be filed as P2)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions