Skip to content

Commit

Permalink
fix: fix deal logs (#506)
Browse files Browse the repository at this point in the history
* fix: deal logs

* up

* Apply automatic changes

* add assert

* run all tests

* up

* up

* up

---------

Co-authored-by: shamsartem <[email protected]>
  • Loading branch information
shamsartem and shamsartem authored Sep 29, 2023
1 parent fec6fc1 commit 90a03e7
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 97 deletions.
64 changes: 32 additions & 32 deletions docs/commands/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ALIASES
$ fluence air b
```

_See code: [dist/commands/air/beautify.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/air/beautify.ts)_
_See code: [dist/commands/air/beautify.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/air/beautify.ts)_

## `fluence aqua`

Expand Down Expand Up @@ -95,7 +95,7 @@ EXAMPLES
$ fluence aqua
```

_See code: [dist/commands/aqua.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/aqua.ts)_
_See code: [dist/commands/aqua.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/aqua.ts)_

## `fluence aqua json [INPUT] [OUTPUT]`

Expand Down Expand Up @@ -123,7 +123,7 @@ DESCRIPTION
what they translate into
```

_See code: [dist/commands/aqua/json.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/aqua/json.ts)_
_See code: [dist/commands/aqua/json.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/aqua/json.ts)_

## `fluence aqua yml [INPUT] [OUTPUT]`

Expand Down Expand Up @@ -154,7 +154,7 @@ ALIASES
$ fluence aqua yaml
```

_See code: [dist/commands/aqua/yml.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/aqua/yml.ts)_
_See code: [dist/commands/aqua/yml.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/aqua/yml.ts)_

## `fluence autocomplete [SHELL]`

Expand Down Expand Up @@ -207,7 +207,7 @@ EXAMPLES
$ fluence build
```

_See code: [dist/commands/build.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/build.ts)_
_See code: [dist/commands/build.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/build.ts)_

## `fluence deal deploy [WORKER-NAMES]`

Expand Down Expand Up @@ -249,7 +249,7 @@ EXAMPLES
$ fluence deal deploy
```

_See code: [dist/commands/deal/deploy.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/deal/deploy.ts)_
_See code: [dist/commands/deal/deploy.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/deal/deploy.ts)_

## `fluence deal logs [WORKER-NAMES]`

Expand Down Expand Up @@ -282,7 +282,7 @@ EXAMPLES
$ fluence deal logs
```

_See code: [dist/commands/deal/logs.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/deal/logs.ts)_
_See code: [dist/commands/deal/logs.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/deal/logs.ts)_

## `fluence default peers [NETWORK]`

Expand All @@ -305,7 +305,7 @@ EXAMPLES
$ fluence default peers
```

_See code: [dist/commands/default/peers.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/default/peers.ts)_
_See code: [dist/commands/default/peers.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/default/peers.ts)_

## `fluence dependency cargo install [PACKAGE-NAME | PACKAGE-NAME@VERSION]`

Expand Down Expand Up @@ -343,7 +343,7 @@ EXAMPLES
$ fluence dependency cargo install
```

_See code: [dist/commands/dependency/cargo/install.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/dependency/cargo/install.ts)_
_See code: [dist/commands/dependency/cargo/install.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/dependency/cargo/install.ts)_

## `fluence dependency install`

Expand All @@ -368,7 +368,7 @@ EXAMPLES
$ fluence dependency install
```

_See code: [dist/commands/dependency/install.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/dependency/install.ts)_
_See code: [dist/commands/dependency/install.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/dependency/install.ts)_

## `fluence dependency npm install [PACKAGE-NAME | PACKAGE-NAME@VERSION]`

Expand Down Expand Up @@ -402,7 +402,7 @@ EXAMPLES
$ fluence dependency npm install
```

_See code: [dist/commands/dependency/npm/install.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/dependency/npm/install.ts)_
_See code: [dist/commands/dependency/npm/install.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/dependency/npm/install.ts)_

## `fluence dependency reset`

Expand All @@ -428,7 +428,7 @@ EXAMPLES
$ fluence dependency reset
```

_See code: [dist/commands/dependency/reset.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/dependency/reset.ts)_
_See code: [dist/commands/dependency/reset.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/dependency/reset.ts)_

## `fluence dependency versions`

Expand All @@ -455,7 +455,7 @@ EXAMPLES
$ fluence dependency versions
```

_See code: [dist/commands/dependency/versions.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/dependency/versions.ts)_
_See code: [dist/commands/dependency/versions.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/dependency/versions.ts)_

## `fluence help [COMMANDS]`

Expand Down Expand Up @@ -499,7 +499,7 @@ EXAMPLES
$ fluence init
```

_See code: [dist/commands/init.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/init.ts)_
_See code: [dist/commands/init.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/init.ts)_

## `fluence key default [NAME]`

Expand All @@ -523,7 +523,7 @@ EXAMPLES
$ fluence key default
```

_See code: [dist/commands/key/default.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/key/default.ts)_
_See code: [dist/commands/key/default.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/key/default.ts)_

## `fluence key new [NAME]`

Expand All @@ -548,7 +548,7 @@ EXAMPLES
$ fluence key new
```

_See code: [dist/commands/key/new.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/key/new.ts)_
_See code: [dist/commands/key/new.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/key/new.ts)_

## `fluence key remove [NAME]`

Expand All @@ -572,7 +572,7 @@ EXAMPLES
$ fluence key remove
```

_See code: [dist/commands/key/remove.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/key/remove.ts)_
_See code: [dist/commands/key/remove.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/key/remove.ts)_

## `fluence module add [PATH | URL]`

Expand All @@ -598,7 +598,7 @@ EXAMPLES
$ fluence module add
```

_See code: [dist/commands/module/add.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/module/add.ts)_
_See code: [dist/commands/module/add.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/module/add.ts)_

## `fluence module new [NAME]`

Expand All @@ -623,7 +623,7 @@ EXAMPLES
$ fluence module new
```

_See code: [dist/commands/module/new.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/module/new.ts)_
_See code: [dist/commands/module/new.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/module/new.ts)_

## `fluence module remove [NAME | PATH | URL]`

Expand All @@ -647,7 +647,7 @@ EXAMPLES
$ fluence module remove
```

_See code: [dist/commands/module/remove.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/module/remove.ts)_
_See code: [dist/commands/module/remove.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/module/remove.ts)_

## `fluence provider add-peer`

Expand All @@ -670,7 +670,7 @@ DESCRIPTION
Register specific nox instance as a Compute Peer
```

_See code: [dist/commands/provider/add-peer.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/provider/add-peer.ts)_
_See code: [dist/commands/provider/add-peer.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/provider/add-peer.ts)_

## `fluence provider register`

Expand All @@ -690,7 +690,7 @@ DESCRIPTION
Register in matching contract
```

_See code: [dist/commands/provider/register.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/provider/register.ts)_
_See code: [dist/commands/provider/register.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/provider/register.ts)_

## `fluence run`

Expand Down Expand Up @@ -737,7 +737,7 @@ EXAMPLES
$ fluence run
```

_See code: [dist/commands/run.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/run.ts)_
_See code: [dist/commands/run.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/run.ts)_

## `fluence service add [PATH | URL]`

Expand All @@ -764,7 +764,7 @@ EXAMPLES
$ fluence service add
```

_See code: [dist/commands/service/add.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/service/add.ts)_
_See code: [dist/commands/service/add.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/service/add.ts)_

## `fluence service new [NAME]`

Expand All @@ -788,7 +788,7 @@ EXAMPLES
$ fluence service new
```

_See code: [dist/commands/service/new.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/service/new.ts)_
_See code: [dist/commands/service/new.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/service/new.ts)_

## `fluence service remove [NAME | PATH | URL]`

Expand All @@ -811,7 +811,7 @@ EXAMPLES
$ fluence service remove
```

_See code: [dist/commands/service/remove.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/service/remove.ts)_
_See code: [dist/commands/service/remove.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/service/remove.ts)_

## `fluence service repl [NAME | PATH | URL]`

Expand All @@ -836,7 +836,7 @@ EXAMPLES
$ fluence service repl
```

_See code: [dist/commands/service/repl.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/service/repl.ts)_
_See code: [dist/commands/service/repl.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/service/repl.ts)_

## `fluence spell new [NAME]`

Expand All @@ -860,7 +860,7 @@ EXAMPLES
$ fluence spell new
```

_See code: [dist/commands/spell/new.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/spell/new.ts)_
_See code: [dist/commands/spell/new.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/spell/new.ts)_

## `fluence update [CHANNEL]`

Expand Down Expand Up @@ -936,7 +936,7 @@ EXAMPLES
$ fluence workers deploy
```

_See code: [dist/commands/workers/deploy.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/workers/deploy.ts)_
_See code: [dist/commands/workers/deploy.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/workers/deploy.ts)_

## `fluence workers logs [WORKER-NAMES]`

Expand Down Expand Up @@ -973,7 +973,7 @@ EXAMPLES
$ fluence workers logs
```

_See code: [dist/commands/workers/logs.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/workers/logs.ts)_
_See code: [dist/commands/workers/logs.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/workers/logs.ts)_

## `fluence workers remove [WORKER-NAMES]`

Expand Down Expand Up @@ -1007,7 +1007,7 @@ EXAMPLES
$ fluence workers remove
```

_See code: [dist/commands/workers/remove.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/workers/remove.ts)_
_See code: [dist/commands/workers/remove.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/workers/remove.ts)_

## `fluence workers upload [WORKER-NAMES]`

Expand Down Expand Up @@ -1045,5 +1045,5 @@ EXAMPLES
$ fluence workers upload
```

_See code: [dist/commands/workers/upload.ts](https://github.com/fluencelabs/cli/blob/v0.8.9/dist/commands/workers/upload.ts)_
_See code: [dist/commands/workers/upload.ts](https://github.com/fluencelabs/cli/blob/v0.9.0/dist/commands/workers/upload.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"yaml-diff-patch": "^2.0.0"
},
"devDependencies": {
"@fluencelabs/installation-spell": "0.5.22",
"@fluencelabs/installation-spell": "0.5.23",
"@total-typescript/ts-reset": "^0.5.1",
"@tsconfig/node18-strictest-esm": "^1.0.1",
"@types/debug": "^4.1.9",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/deal/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Logs extends BaseCommand<typeof Logs> {
);
}

commandObj.logToStderr(
commandObj.log(
logs
.map(({ host_id, logs, spell_id, deal_id }) => {
return `${color.yellow(
Expand Down
12 changes: 4 additions & 8 deletions test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,9 @@ describe("integration tests", () => {
);

fluenceConfig.deals[DEFAULT_WORKER_NAME].minWorkers = 3;

await fluenceConfig.$commit();

log(`config commit done`);

log(`will deploy deal`);

const dealDeploy = await fluence({
await fluence({
args: ["deal", "deploy"],
flags: {
"priv-key": PRIV_KEY,
Expand All @@ -510,8 +505,6 @@ describe("integration tests", () => {
cwd,
});

log(`deal deployed:`, dealDeploy);

let runDeployedServicesTimeoutReached = false;
let maybeRunDeployedError: unknown = null;

Expand Down Expand Up @@ -628,6 +621,9 @@ describe("integration tests", () => {
}),
`result of running showSubnet aqua function is expected to be an array of WorkerServices, but it is: ${showSubnetResult}`,
);

// check logs are working
assert((await fluence({ args: ["deal", "logs"], cwd })) !== "");
},
);
});
Expand Down
Loading

0 comments on commit 90a03e7

Please sign in to comment.