diff --git a/pkg/requester/endpoint.go b/pkg/requester/endpoint.go index 8d4697be57..961ff5f92e 100644 --- a/pkg/requester/endpoint.go +++ b/pkg/requester/endpoint.go @@ -48,7 +48,6 @@ func NewBaseEndpoint(params *BaseEndpointParams) *BaseEndpoint { transforms := []jobtransform.Transformer{ jobtransform.NewTimeoutApplier(params.MinJobExecutionTimeout, params.DefaultJobExecutionTimeout), jobtransform.NewRequesterInfo(params.ID), - jobtransform.RepoExistsOnIPFS(params.StorageProviders), jobtransform.NewPublisherMigrator(params.DefaultPublisher), jobtransform.NewEngineMigrator(), // jobtransform.DockerImageDigest(), diff --git a/pkg/requester/jobtransform/repo_exists_on_ipfs.go b/pkg/requester/jobtransform/repo_exists_on_ipfs.go deleted file mode 100644 index 623ad11f05..0000000000 --- a/pkg/requester/jobtransform/repo_exists_on_ipfs.go +++ /dev/null @@ -1,43 +0,0 @@ -package jobtransform - -import ( - "context" - - "github.com/bacalhau-project/bacalhau/pkg/clone" - "github.com/bacalhau-project/bacalhau/pkg/model" - "github.com/bacalhau-project/bacalhau/pkg/storage" - "github.com/rs/zerolog/log" -) - -func RepoExistsOnIPFS(provider storage.StorageProvider) Transformer { - return func(ctx context.Context, j *model.Job) (modified bool, err error) { - inputs := j.Spec.Inputs - modificationCount := 0 - - for _, inputRepos := range inputs { - var repoArray []string - if inputRepos.StorageSource == model.StorageSourceRepoClone { - repoArray = append(repoArray, inputRepos.Repo) - } - for _, url := range repoArray { - repoCID, err := clone.RepoExistsOnIPFSGivenURL(ctx, url) - log.Ctx(ctx).Error().Err(err).Msg("error checking whether repo exists") - if err != nil { - continue - } - - inputs = clone.RemoveFromModelStorageSpec(inputs, url) - - inputs = append(inputs, model.StorageSpec{ - StorageSource: model.StorageSourceIPFS, - CID: repoCID, - Path: "/inputs", - }) - modificationCount++ - } - } - - j.Spec.Inputs = inputs - return modificationCount != 0, nil - } -}