youngoli commented on a change in pull request #14397:
URL: https://github.com/apache/beam/pull/14397#discussion_r606617381
##########
File path: sdks/go/pkg/beam/core/runtime/xlangx/namespace.go
##########
@@ -81,36 +76,18 @@ func addWindowingStrategyID(c *pipepb.Components, idMap
map[string]string, wid s
return idMap[wid]
}
-func addEnvironmentID(c *pipepb.Components, idMap map[string]string, eid
string, newID func(string) string) string {
- if _, exists := idMap[eid]; exists {
- return idMap[eid]
- }
-
- environment, exists := c.Environments[eid]
- if !exists {
- panic(errors.Errorf("attempted to add namespace to missing
windowing strategy id: %v not in %v", eid, c.Environments))
- }
-
- idMap[eid] = newID(eid)
-
- // Updating Environments map
- c.Environments[idMap[eid]] = environment
- delete(c.Environments, eid)
-
- return idMap[eid]
-}
-
func addNamespace(t *pipepb.PTransform, c *pipepb.Components, namespace
string) {
newID := func(id string) string {
return fmt.Sprintf("%v@%v", id, namespace)
}
idMap := make(map[string]string)
- // Update Environment ID of PTransform
- if t.EnvironmentId != "" {
- t.EnvironmentId = addEnvironmentID(c, idMap, t.EnvironmentId,
newID)
- }
+ // TODO: Currently environments are not namespaced. This works under the
Review comment:
Changed it to a "note". That makes more sense than making a JIRA for the
vague possibility of multiple Go environments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]