[
https://issues.apache.org/jira/browse/BEAM-13813?focusedWorklogId=720543&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-720543
]
ASF GitHub Bot logged work on BEAM-13813:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Feb/22 00:13
Start Date: 04/Feb/22 00:13
Worklog Time Spent: 10m
Work Description: lostluck commented on a change in pull request #16710:
URL: https://github.com/apache/beam/pull/16710#discussion_r799067602
##########
File path: sdks/go/pkg/beam/artifact/materialize.go
##########
@@ -150,6 +158,12 @@ func extractStagingToPath(artifact
*pipepb.ArtifactInformation) (string, error)
return "", err
}
stagedName = generateId() + "-" + filepath.Base(ty.Path)
+ } else if artifact.TypeUrn == URNUrlArtifact {
Review comment:
I imaging the mixing of requesting TypeUrn and RoleUrn in this if/else
ladder is an artifact of legacy handling?
##########
File path: sdks/go/pkg/beam/artifact/materialize_test.go
##########
@@ -279,6 +360,8 @@ func (fake *fakeRetrievalService) ResolveArtifacts(ctx
context.Context, request
func (fake *fakeRetrievalService) GetArtifact(ctx context.Context, request
*jobpb.GetArtifactRequest, opts ...grpc.CallOption)
(jobpb.ArtifactRetrievalService_GetArtifactClient, error) {
if request.Artifact.TypeUrn == "resolved" {
return &fakeGetArtifactResponseStream{data:
request.Artifact.TypePayload}, nil
+ } else if request.Artifact.TypeUrn == URNFileArtifact ||
request.Artifact.TypeUrn == URNUrlArtifact {
+ return &fakeGetArtifactResponseStream{data:
request.Artifact.RolePayload}, nil
}
return nil, errors.Errorf("Unsupported artifact %v", request.Artifact)
Review comment:
```suggestion
switch request.Artifact.TypeUrn {
case "resolved":
return &fakeGetArtifactResponseStream{data:
request.Artifact.TypePayload}, nil
case URNFileArtifact, URNUrlArtifact:
return &fakeGetArtifactResponseStream{data:
request.Artifact.RolePayload}, nil
default:
return nil, errors.Errorf("Unsupported artifact %v",
request.Artifact)
}
```
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 720543)
Time Spent: 2.5h (was: 2h 20m)
> Add support for URL artifact to extractStagingToPath
> ----------------------------------------------------
>
> Key: BEAM-13813
> URL: https://issues.apache.org/jira/browse/BEAM-13813
> Project: Beam
> Issue Type: New Feature
> Components: cross-language
> Reporter: Heejong Lee
> Assignee: Heejong Lee
> Priority: P2
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> Add support for URL artifact to extractStagingToPath
--
This message was sent by Atlassian Jira
(v8.20.1#820001)