diff --git a/hack/ccp/hack/transfer.sh b/hack/ccp/hack/transfer.sh index df8af78a6..265a7246f 100755 --- a/hack/ccp/hack/transfer.sh +++ b/hack/ccp/hack/transfer.sh @@ -4,4 +4,5 @@ set -x transfer=$(mktemp -d) touch $transfer/hello.txt +touch $transfer/bye.txt mv $transfer ~/.ccp/am-pipeline-data/watchedDirectories/activeTransfers/standardTransfer/ diff --git a/hack/ccp/internal/controller/jobs.go b/hack/ccp/internal/controller/jobs.go index 52f4366ac..9d7e1772b 100644 --- a/hack/ccp/internal/controller/jobs.go +++ b/hack/ccp/internal/controller/jobs.go @@ -562,7 +562,7 @@ func (l *getUnitVarLinkJob) exec(ctx context.Context) (uuid.UUID, error) { } linkID, err := l.j.pkg.store.ReadUnitLinkID(ctx, l.j.pkg.id, l.j.pkg.packageType(), l.config.Variable) - if err == sql.ErrNoRows { + if errors.Is(err, store.ErrNotFound) { return l.config.LinkID, nil } if err != nil { diff --git a/hack/ccp/internal/controller/package.go b/hack/ccp/internal/controller/package.go index 098843826..95e19463d 100644 --- a/hack/ccp/internal/controller/package.go +++ b/hack/ccp/internal/controller/package.go @@ -62,7 +62,7 @@ func NewPackage(ctx context.Context, logger logr.Logger, store store.Store, path store: store, path: path, isDir: fi.IsDir(), - sharedDir: sharedDir, + sharedDir: joinPath(sharedDir, ""), watchedAt: wd, } @@ -355,9 +355,9 @@ func (u *Transfer) replacements(filterSubdirPath string) replacementMapping { mapping := u.pkg.replacements() maps.Copy(mapping, baseReplacements(u.pkg)) maps.Copy(mapping, map[string]replacement{ - u.replacementPath(): replacement(u.pkg.Path()), - "%unitType%": replacement(u.packageType()), - "%processingConfiguration": replacement(u.processingConfiguration), + u.replacementPath(): replacement(u.pkg.Path()), + "%unitType%": replacement(u.packageType()), + "%processingConfiguration%": replacement(u.processingConfiguration), }) return mapping diff --git a/hack/ccp/internal/controller/submit.go b/hack/ccp/internal/controller/submit.go index 86d9e0a3d..dfe872b55 100644 --- a/hack/ccp/internal/controller/submit.go +++ b/hack/ccp/internal/controller/submit.go @@ -26,7 +26,7 @@ func submitJob(ctx context.Context, logger logr.Logger, gearman *gearmin.Server, return nil, fmt.Errorf("marshal tasks: %v", err) } - logger.V(2).Info("Submitting job to MCPClient.", "data", string(data)) + logger.V(2).Info("Submitting job to MCPClient.", "script", funcName, "data", string(data)) done := make(chan struct{}) res := &taskResults{}