Skip to content

Commit ef743fe

Browse files
committed
refactor(backend): Swap v1 and v2 artifact reading implementations
Signed-off-by: Helber Belmiro <[email protected]>
1 parent c11dbed commit ef743fe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

backend/src/apiserver/server/run_artifact_server.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ type RunArtifactServer struct {
3636
resourceManager *resource.ResourceManager
3737
}
3838

39-
// ReadArtifactV1 is an artifact reading endpoint that streams artifacts directly from object storage
39+
// ReadArtifact is an artifact reading endpoint that streams artifacts directly from object storage
4040
// to the HTTP response without buffering the entire content in memory.
4141
// No size limits are imposed - the streaming approach itself provides the security benefit.
42-
func (s *RunArtifactServer) ReadArtifactV1(response http.ResponseWriter, r *http.Request) {
43-
glog.Infof("Read artifact v1 called")
42+
func (s *RunArtifactServer) ReadArtifact(response http.ResponseWriter, r *http.Request) {
43+
glog.Infof("Read artifact v2 called")
4444

4545
vars := mux.Vars(r)
4646

@@ -111,10 +111,10 @@ func (s *RunArtifactServer) artifactFileExists(ctx context.Context, runID string
111111
return true, nil
112112
}
113113

114-
// ReadArtifact handles v2beta1 artifact reading (same implementation as v1)
115-
func (s *RunArtifactServer) ReadArtifact(w http.ResponseWriter, r *http.Request) {
116-
glog.Infof("Read artifact v2 called")
117-
s.ReadArtifactV1(w, r)
114+
// ReadArtifactV1 handles v1 artifact reading (delegates to v2 implementation)
115+
func (s *RunArtifactServer) ReadArtifactV1(w http.ResponseWriter, r *http.Request) {
116+
glog.Infof("Read artifact v1 called")
117+
s.ReadArtifact(w, r)
118118
}
119119

120120
func (s *RunArtifactServer) writeErrorToResponse(response http.ResponseWriter, code int, err error) {

0 commit comments

Comments
 (0)