ihji commented on a change in pull request #16490:
URL: https://github.com/apache/beam/pull/16490#discussion_r798187874
##########
File path: sdks/go/pkg/beam/core/runtime/xlangx/resolve.go
##########
@@ -127,3 +127,46 @@ func ResolveArtifactsWithConfig(ctx context.Context, edges
[]*graph.MultiEdge, c
}
return paths, nil
}
+
+func UpdateArtifactTypeFromFileToUrl(edges []*graph.MultiEdge) {
+ for _, e := range edges {
+ if e.Op == graph.External && e.External != nil {
+ components, err :=
graphx.ExpandedComponents(e.External.Expanded)
+ if err != nil {
+ panic(errors.WithContextf(err,
+ "updating URL artifacts type for edge
%v", e.Name()))
+ }
+ envs := components.Environments
+ for _, env := range envs {
+ deps := env.GetDependencies()
+ var resolvedDeps []*pipepb.ArtifactInformation
+ for _, a := range deps {
+ path, sha256 :=
artifact.MustExtractFilePayload(a)
+ var typeUrn string
+ var typePayload []byte
+ if strings.Contains(path, "://") {
Review comment:
Updated (looks like we can directly update the fields).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]