Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion en/cli/create-and-update-apps-from-dsl-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ To run these steps in a pipeline, also see [Use `difyctl` in CI and Automation](

For a Chatflow app, use `test console_app advanced_chat` instead.

A run that passes has `status: ended`. One that fails has `status: failed`, with the reason in `error.message`. Fix the workflow in the file or in the app you export it from, then start again from step 2.
A run that finishes has `status: ended`. One that fails has `status: failed`, with the reason in `error.message`. Fix the workflow in the file or in the app you export it from, then start again from step 2.

If a file with a newer DSL version doesn't run on this server, [restore the live version](#roll-back-an-update) into the draft instead. That version is already live, so you don't need to publish it.
</Step>
Expand All @@ -171,6 +171,11 @@ To run these steps in a pipeline, also see [Use `difyctl` in CI and Automation](

If `ready` is `false`, [follow its hints](/en/cli/find-and-run-commands#follow-hints) and check again.

If it stays `false` after you run the test again, a node failed during the test and its **Error Handling** setting let the run finish anyway. To find the node, [inspect the test run](/en/cli/run-apps#find-why-a-run-failed) by its `run_id`.

- If the node shouldn't have failed, fix it in the file or in the app you export it from, then start again from step 2.
- If the workflow is built to handle that failure, test with an input that no node fails on.

Before you publish, review `changes` for what differs from the published version.
</Step>
<Step title="Publish">
Expand Down
4 changes: 3 additions & 1 deletion en/cli/scripts-and-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ difyctl login --server https://dify.example.com --no-wait
{"status":"pending","verification_uri":"…","user_code":"…","expires_in":900}
```

Pass `verification_uri` and `user_code` to someone who can open the URL and approve the code within 15 minutes. Until you finish the sign-in, don't start another `login`: it discards this one, so approving its code no longer signs you in.
Pass `verification_uri` and `user_code` to someone who can open the URL and approve the code within 15 minutes.

Then finish the sign-in in the same config folder:

Expand All @@ -79,6 +79,8 @@ difyctl login --resume
- Once the code is approved, it prints the signed-in `account` instead, with no `status`.
- If the code is denied or expires first, it fails with exit code 4. Start over with `login --no-wait`.

If you start over before the old code expires, make sure no one approves it. Approving it after you've signed in with the new code signs you out.

For what to check before you approve a coding agent's code, see [Sign In](/en/cli/get-started#sign-in).

## Handle Failures
Expand Down
7 changes: 6 additions & 1 deletion ja/cli/create-and-update-apps-from-dsl-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ description: difyctl で DSL ファイルから Dify アプリを更新し、公

Chatflow アプリでは、代わりに `test console_app advanced_chat` を使います。

実行に成功すると `status: ended` に、失敗すると `status: failed` になります。失敗の理由は `error.message` で確認できます。ファイルかエクスポート元のアプリでワークフローを修正し、手順 2 からやり直します。
実行が完了すると `status: ended` に、失敗すると `status: failed` になります。失敗の理由は `error.message` で確認できます。ファイルかエクスポート元のアプリでワークフローを修正し、手順 2 からやり直します。

DSL バージョンの新しいファイルがこのサーバーで動作しない場合は、代わりに [公開中のバージョンをドラフトに復元](#更新のロールバック) します。そのバージョンはすでに公開中なので、公開する必要はありません。
</Step>
Expand All @@ -173,6 +173,11 @@ description: difyctl で DSL ファイルから Dify アプリを更新し、公

`ready` が `false` の場合は、[ヒントに従って](/ja/cli/find-and-run-commands#ヒントの活用) 対処し、もう一度確認します。

テストを再実行しても `ready` が `false` のままなら、テスト中にノードが失敗しています。そのノードの **例外処理** の設定により、実行はそのまま完了しています。失敗したノードを特定するには、`run_id` を使って [テストの実行を調査](/ja/cli/run-apps#実行が失敗した原因の調査) します。

- そのノードが本来失敗しないはずなら、ファイルかエクスポート元のアプリでノードを修正し、手順 2 からやり直します。
- その失敗を処理するようにワークフローを設計している場合は、どのノードも失敗しない入力でテストします。

公開する前に、`changes` で公開済みのバージョンとの違いを確認します。
</Step>
<Step title="公開">
Expand Down
4 changes: 3 additions & 1 deletion ja/cli/scripts-and-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ difyctl login --server https://dify.example.com --no-wait
{"status":"pending","verification_uri":"…","user_code":"…","expires_in":900}
```

`verification_uri` と `user_code` を、URL を開いて 15 分以内にコードを承認できる人に渡します。サインインを完了するまでは、別の `login` を開始しないでください。開始するとこのサインインが破棄され、そのコードを承認してもサインインできなくなります。
`verification_uri` と `user_code` を、URL を開いて 15 分以内にコードを承認できる人に渡します。

その後、同じ設定フォルダでサインインを完了します:

Expand All @@ -81,6 +81,8 @@ difyctl login --resume
- コードが承認されると、代わりにサインインした `account` を表示します。`status` は含まれません。
- 承認前にコードが拒否されるか期限切れになると、終了コード 4 で失敗します。その場合は `login --no-wait` からやり直します。

古いコードの期限が切れる前にやり直す場合は、誰もそのコードを承認しないようにしてください。新しいコードでサインインした後に誰かが古いコードを承認すると、サインアウトした状態になります。

コーディングエージェントのコードを承認する前に確認すべき点については、[サインイン](/ja/cli/get-started#サインイン) を参照してください。

## 失敗への対処
Expand Down
7 changes: 6 additions & 1 deletion zh/cli/create-and-update-apps-from-dsl-files.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ description: 用 difyctl 通过 DSL 文件更新 Dify 应用,再发布或回

Chatflow 应用改用 `test console_app advanced_chat`。

运行通过时,结果中为 `status: ended`;失败时为 `status: failed`,原因见 `error.message`。在文件中或导出文件的那个应用中修正工作流,再从第 2 步重新开始。
运行完成时,结果中为 `status: ended`;失败时为 `status: failed`,原因见 `error.message`。在文件中或导出文件的那个应用中修正工作流,再从第 2 步重新开始。

如果 DSL 版本较新的文件无法在这台服务器上运行,改为 [把线上版本恢复到草稿中](#回滚更新)。该版本已在线上,不必再发布。
</Step>
Expand All @@ -173,6 +173,11 @@ description: 用 difyctl 通过 DSL 文件更新 Dify 应用,再发布或回

如果 `ready` 为 `false`,[按结果中的提示操作](/zh/cli/find-and-run-commands#按提示运行后续命令),再检查一遍。

如果重新运行测试后 `ready` 仍为 `false`,说明测试中有节点失败,但该节点设置了 **异常处理**,运行照常完成。要找出这个节点,用 `run_id` 来 [查看这次测试运行](/zh/cli/run-apps#排查运行失败的原因)。

- 如果这个节点本不该失败,在文件中或导出文件的那个应用中修正它,再从第 2 步重新开始。
- 如果工作流本就设计为处理这种失败,换一组任何节点都不会失败的输入来测试。

发布前,查看 `changes`,了解草稿与已发布版本有哪些不同。
</Step>
<Step title="发布">
Expand Down
4 changes: 3 additions & 1 deletion zh/cli/scripts-and-ci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ difyctl login --server https://dify.example.com --no-wait
{"status":"pending","verification_uri":"…","user_code":"…","expires_in":900}
```

把 `verification_uri` 和 `user_code` 发给能在 15 分钟内打开该 URL 并批准验证码的人。完成这次登录之前,不要再发起 `login`:新的 `login` 会让这次登录作废,即使对方批准了这次的验证码,你也登录不了。
把 `verification_uri` 和 `user_code` 发给负责批准的人,对方要在 15 分钟内打开该 URL 并批准验证码。

然后在同一个配置目录中完成登录:

Expand All @@ -81,6 +81,8 @@ difyctl login --resume
- 验证码获批后,它改为打印已登录的 `account`,不再带有 `status`。
- 如果验证码被拒绝,或在获批前过期,命令会失败并返回退出码 4。这时用 `login --no-wait` 重新开始。

如果在旧验证码过期前就重新开始,要确保没有人批准它。你用新验证码登录后,一旦有人批准了旧验证码,你的登录就会失效。

批准编码 Agent 的验证码前要检查什么,详见 [登录](/zh/cli/get-started#登录)。

## 处理失败
Expand Down
Loading