feat: add update methods for artifacts to support mid-flow updates#19994
Closed
majiayu000 wants to merge 1 commit intoPrefectHQ:mainfrom
Closed
feat: add update methods for artifacts to support mid-flow updates#19994majiayu000 wants to merge 1 commit intoPrefectHQ:mainfrom
majiayu000 wants to merge 1 commit intoPrefectHQ:mainfrom
Conversation
This adds the ability to update existing artifacts during a flow run, addressing the use case where users have long-running flows and want to update artifact data progressively rather than creating new versions. Changes: - Add `update()` and `aupdate()` methods to the `Artifact` base class - Add convenience functions for updating specific artifact types: - `update_markdown_artifact` / `aupdate_markdown_artifact` - `update_table_artifact` / `aupdate_table_artifact` - `update_link_artifact` / `aupdate_link_artifact` - `update_image_artifact` / `aupdate_image_artifact` These complement the existing `update_progress_artifact` function. Closes PrefectHQ#10955 Signed-off-by: majiayu000 <1835304752@qq.com>
CodSpeed Performance ReportMerging #19994 will not alter performanceComparing Summary
|
Contributor
|
This pull request is stale because it has been open 14 days with no activity. To keep this pull request open remove stale label or comment. |
Contributor
|
This pull request was closed because it has been stale for 14 days with no activity. If this pull request is important or you have more to add feel free to re-open it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #10955
This PR adds the ability to update existing artifacts during a flow run, addressing the use case where users have long-running flows and want to update artifact data progressively rather than creating new versions.
Changes:
update()andaupdate()methods to theArtifactbase classupdate_markdown_artifact/aupdate_markdown_artifactupdate_table_artifact/aupdate_table_artifactupdate_link_artifact/aupdate_link_artifactupdate_image_artifact/aupdate_image_artifactThese complement the existing
update_progress_artifactfunction.Example Usage
Test plan
update_markdown_artifactandupdate_table_artifactin flow contextSigned-off-by: majiayu000 1835304752@qq.com