Skip to content

Commit

Permalink
Fix small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sevein committed Apr 29, 2024
1 parent 11a5129 commit 9eda141
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions hack/ccp/hack/transfer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
2 changes: 1 addition & 1 deletion hack/ccp/internal/controller/jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions hack/ccp/internal/controller/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion hack/ccp/internal/controller/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 9eda141

Please sign in to comment.