Skip to content

Commit

Permalink
refactor: rename task baseKey to key and key to id
Browse files Browse the repository at this point in the history
In short, baseKey is now called key, key is now called id, and id is now
called uid. The same applies to the corresponding getter methods on
BaseTask.

baseKey has always been a somewhat awkward term, and with some of the
recent changes to the events emitted by the TaskGraph, it had started to
become slightly confusing as well. The new terminology should be clearer
and more intuitive.
  • Loading branch information
thsig committed Apr 29, 2019
1 parent 986a897 commit f7cecce
Show file tree
Hide file tree
Showing 13 changed files with 156 additions and 157 deletions.
52 changes: 14 additions & 38 deletions garden-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion garden-service/src/commands/run/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class RunTaskCommand extends Command<Args, Opts> {
await garden.actions.prepareEnvironment({ log })

const taskTask = await TaskTask.factory({ garden, graph, task, log, force: true, forceBuild: opts["force-build"] })
const result = (await garden.processTasks([taskTask]))[taskTask.getBaseKey()]
const result = (await garden.processTasks([taskTask]))[taskTask.getKey()]

if (!result.error) {
log.info("")
Expand Down
4 changes: 2 additions & 2 deletions garden-service/src/logger/log-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export interface LogEntryMetadata { task?: TaskMetadata }

export interface TaskMetadata {
type: string,
baseKey: string,
key: string,
status: TaskLogStatus,
id: string,
uid: string,
versionString: string,
durationMs?: number,
}
Expand Down
2 changes: 1 addition & 1 deletion garden-service/src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export async function processModules(
await restartPromise

return {
taskResults: {}, // TODO: Return latest results for each task baseKey processed between restarts?
taskResults: {}, // TODO: Return latest results for each task key processed between restarts?
restartRequired: true,
}

Expand Down
Loading

0 comments on commit f7cecce

Please sign in to comment.