AIFeed

Workflow SDK 支持按需删除运行数据

AI summary

Workflow SDK 现在支持按需删除已完成运行所存储的数据,便于在需要清除敏感数据时快速满足合规与安全要求。删除运行的输入、输出、hook 负载和错误轨迹等内容时,不会删除运行的元数据,该运行仍会显示在可观测性中。该功能仅适用于已完成的运行,需要升级到 [email protected] 或更高版本。

Translation(model translation, not the source's own text)

文章标题:在 Workflow SDK 中按需删除一次运行的数据

正文: Workflow SDK 现在支持按需删除已结束运行所存储的数据。当需要从运行负载中清除敏感数据时,该功能让你能够快速满足合规与安全要求。

删除一次运行的数据会删除该运行及其相关实体的任何输入、输出、hook 负载和错误追踪。这不会删除运行的元数据:该运行仍会在可观测性中列出。步骤和事件的属性、hook 令牌和时序仍可查看。

你可以从 Vercel Dashboard 删除一次运行的数据,也可以通过 CLI:


        # Locallypnpx workflow delete <runId># For runs on Vercelpnpx workflow delete <runId> --backend vercel --env preview
      

你也可以在代码中以编程方式删除一次运行的数据:


        import { deleteRuns, getRun } from 'workflow/api';
await getRun(runId).delete();       // one runawait deleteRuns([runIdA, runIdB]); // up to 100 runs
      

删除仅适用于已结束的运行,因此仍在进行的运行会被跳过并继续运行。如果你想在运行一结束就删除其负载,请改用保留设置。

升级到 [email protected] 或更高版本即可使用此功能。在 deleteRuns() 参考文档中了解更多。

Only about 675 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.

Published by Vercel Blog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗