MCPcopy
hub / github.com/argoproj/argo-workflows / Save

Method Save

workflow/artifacts/plugin/plugin.go:198–211  ·  view source on GitHub ↗

Save implements ArtifactDriver.Save by calling the plugin service

(ctx context.Context, path string, outputArtifact *wfv1.Artifact)

Source from the content-addressed store, hash-verified

196
197// Save implements ArtifactDriver.Save by calling the plugin service
198func (d *Driver) Save(ctx context.Context, path string, outputArtifact *wfv1.Artifact) error {
199 grpcArtifact := convertToGRPC(outputArtifact)
200 resp, err := d.client.Save(ctx, &artifact.SaveArtifactRequest{
201 Path: path,
202 OutputArtifact: grpcArtifact,
203 })
204 if err != nil {
205 return fmt.Errorf("plugin %s save failed: %w", d.pluginName, err)
206 }
207 if !resp.Success {
208 return fmt.Errorf("plugin %s save failed: %s", d.pluginName, resp.Error)
209 }
210 return nil
211}
212
213// Delete implements ArtifactDriver.Delete by calling the plugin service
214func (d *Driver) Delete(ctx context.Context, artifactRef *wfv1.Artifact) error {

Callers

nothing calls this directly

Calls 2

convertToGRPCFunction · 0.85
SaveMethod · 0.65

Tested by

no test coverage detected