prefect 3.7.3.dev4__py3-none-any.whl → 3.7.3.dev5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- prefect/AGENTS.md +1 -0
- prefect/_build_info.py +3 -3
- prefect/_internal/result_records.py +9 -0
- prefect/cli/_server_utils.py +12 -0
- prefect/cli/server.py +9 -0
- prefect/results.py +4 -0
- prefect/runner/AGENTS.md +5 -1
- prefect/runner/_workspace_starter.py +4 -0
- prefect/server/AGENTS.md +1 -0
- prefect/server/__init__.py +20 -1
- prefect/server/api/__init__.py +86 -33
- prefect/server/schemas/__init__.py +32 -13
- prefect/server/services/scheduler.py +7 -2
- prefect/server/ui-v2/assets/{artifact._id-CZKgXEWB.js → artifact._id-B5o4IZAN.js} +2 -2
- prefect/server/ui-v2/assets/{artifact._id-CZKgXEWB.js.map → artifact._id-B5o4IZAN.js.map} +1 -1
- prefect/server/ui-v2/assets/{artifacts-DwYa9F9j.js → artifacts-Ctaild7x.js} +2 -2
- prefect/server/ui-v2/assets/{artifacts-DwYa9F9j.js.map → artifacts-Ctaild7x.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation-wizard-Co7sJL6C.js → automation-wizard-CwysCxB_.js} +2 -2
- prefect/server/ui-v2/assets/{automation-wizard-Co7sJL6C.js.map → automation-wizard-CwysCxB_.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation._id-CzAbz8OQ.js → automation._id-BF8uKyjS.js} +2 -2
- prefect/server/ui-v2/assets/{automation._id-CzAbz8OQ.js.map → automation._id-BF8uKyjS.js.map} +1 -1
- prefect/server/ui-v2/assets/{automation_._id.edit-C7B50KC9.js → automation_._id.edit-B4KXUFIU.js} +2 -2
- prefect/server/ui-v2/assets/{automation_._id.edit-C7B50KC9.js.map → automation_._id.edit-B4KXUFIU.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-DKLFqR-W.js → automations-ChO76GC4.js} +2 -2
- prefect/server/ui-v2/assets/{automations-DKLFqR-W.js.map → automations-ChO76GC4.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-C6FJGw7P.js → automations-DgzCc631.js} +2 -2
- prefect/server/ui-v2/assets/{automations-C6FJGw7P.js.map → automations-DgzCc631.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-header-BuKdnos3.js → automations-header-BR_w1Bhm.js} +2 -2
- prefect/server/ui-v2/assets/{automations-header-BuKdnos3.js.map → automations-header-BR_w1Bhm.js.map} +1 -1
- prefect/server/ui-v2/assets/{automations-wizard-5YbxdG3F.js → automations-wizard-Cc5PQ-m-.js} +2 -2
- prefect/server/ui-v2/assets/{automations-wizard-5YbxdG3F.js.map → automations-wizard-Cc5PQ-m-.js.map} +1 -1
- prefect/server/ui-v2/assets/{base-job-template-form-section-BRcgnkke.js → base-job-template-form-section-Bs8t71Mi.js} +2 -2
- prefect/server/ui-v2/assets/{base-job-template-form-section-BRcgnkke.js.map → base-job-template-form-section-Bs8t71Mi.js.map} +1 -1
- prefect/server/ui-v2/assets/{block-type-details-C_uCdUZa.js → block-type-details-Duek8VRa.js} +2 -2
- prefect/server/ui-v2/assets/{block-type-details-C_uCdUZa.js.map → block-type-details-Duek8VRa.js.map} +1 -1
- prefect/server/ui-v2/assets/{block._id-MmsBO1E0.js → block._id-CtPAbsBd.js} +2 -2
- prefect/server/ui-v2/assets/{block._id-MmsBO1E0.js.map → block._id-CtPAbsBd.js.map} +1 -1
- prefect/server/ui-v2/assets/{block_._id.edit-UsE5VhnE.js → block_._id.edit-CqBFmljM.js} +2 -2
- prefect/server/ui-v2/assets/{block_._id.edit-UsE5VhnE.js.map → block_._id.edit-CqBFmljM.js.map} +1 -1
- prefect/server/ui-v2/assets/{blocks-Y4tx1Z1C.js → blocks-CYWX8lHn.js} +2 -2
- prefect/server/ui-v2/assets/{blocks-Y4tx1Z1C.js.map → blocks-CYWX8lHn.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog-DXAxNW-w.js → catalog-D01rbOjr.js} +2 -2
- prefect/server/ui-v2/assets/{catalog-DXAxNW-w.js.map → catalog-D01rbOjr.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug-C3g_TnXA.js → catalog_._slug-CWcK6p_E.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug-C3g_TnXA.js.map → catalog_._slug-CWcK6p_E.js.map} +1 -1
- prefect/server/ui-v2/assets/{catalog_._slug_.create-_dCqBSi1.js → catalog_._slug_.create-BrDeutP_.js} +2 -2
- prefect/server/ui-v2/assets/{catalog_._slug_.create-_dCqBSi1.js.map → catalog_._slug_.create-BrDeutP_.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limit._id-Z8kY_5iu.js → concurrency-limit._id-v9uWcYLo.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limit._id-Z8kY_5iu.js.map → concurrency-limit._id-v9uWcYLo.js.map} +1 -1
- prefect/server/ui-v2/assets/{concurrency-limits-CIYS9zer.js → concurrency-limits--iQ4LePG.js} +2 -2
- prefect/server/ui-v2/assets/{concurrency-limits-CIYS9zer.js.map → concurrency-limits--iQ4LePG.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-Duz7u3aJ.js → create-BOLwAD8-.js} +2 -2
- prefect/server/ui-v2/assets/{create-Duz7u3aJ.js.map → create-BOLwAD8-.js.map} +1 -1
- prefect/server/ui-v2/assets/{create-CRMR6U_t.js → create-STic_dos.js} +2 -2
- prefect/server/ui-v2/assets/{create-CRMR6U_t.js.map → create-STic_dos.js.map} +1 -1
- prefect/server/ui-v2/assets/{data-table-DYXgBnS9.js → data-table-CnCIUIrK.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-DYXgBnS9.js.map → data-table-CnCIUIrK.js.map} +1 -1
- prefect/server/ui-v2/assets/{data-table-CxsVws4O.js → data-table-XB91Mv7x.js} +2 -2
- prefect/server/ui-v2/assets/{data-table-CxsVws4O.js.map → data-table-XB91Mv7x.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-form-CdtzHwSg.js → deployment-form-BkR3mHkN.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-form-CdtzHwSg.js.map → deployment-form-BkR3mHkN.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment-links-BEzQncME.js → deployment-links-BF-jQWq8.js} +2 -2
- prefect/server/ui-v2/assets/{deployment-links-BEzQncME.js.map → deployment-links-BF-jQWq8.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment._id-CGJLPiAU.js → deployment._id-Bu7e5nDn.js} +2 -2
- prefect/server/ui-v2/assets/{deployment._id-CGJLPiAU.js.map → deployment._id-Bu7e5nDn.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-C4fAvCua.js → deployment_._id.duplicate-CVUiK5xi.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.duplicate-C4fAvCua.js.map → deployment_._id.duplicate-CVUiK5xi.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.edit-DsGbk3kr.js → deployment_._id.edit-DQDuOF3-.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.edit-DsGbk3kr.js.map → deployment_._id.edit-DQDuOF3-.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployment_._id.run-DmQjQowN.js → deployment_._id.run-Bfb1JAMA.js} +2 -2
- prefect/server/ui-v2/assets/{deployment_._id.run-DmQjQowN.js.map → deployment_._id.run-Bfb1JAMA.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployments-BX4JGvv6.js → deployments-BAr8hYlF.js} +2 -2
- prefect/server/ui-v2/assets/{deployments-BX4JGvv6.js.map → deployments-BAr8hYlF.js.map} +1 -1
- prefect/server/ui-v2/assets/{deployments-BP5QdKL3.js → deployments-BCuQR-Rv.js} +2 -2
- prefect/server/ui-v2/assets/{deployments-BP5QdKL3.js.map → deployments-BCuQR-Rv.js.map} +1 -1
- prefect/server/ui-v2/assets/{event-resource-display-CU5MsqQH.js → event-resource-display-7RkqYS59.js} +2 -2
- prefect/server/ui-v2/assets/{event-resource-display-CU5MsqQH.js.map → event-resource-display-7RkqYS59.js.map} +1 -1
- prefect/server/ui-v2/assets/{event._eventDate._eventId-4IMEuU6B.js → event._eventDate._eventId-CIk5QcV_.js} +2 -2
- prefect/server/ui-v2/assets/{event._eventDate._eventId-4IMEuU6B.js.map → event._eventDate._eventId-CIk5QcV_.js.map} +1 -1
- prefect/server/ui-v2/assets/{events-D1Dc3zQ-.js → events-C46I_3_q.js} +2 -2
- prefect/server/ui-v2/assets/{events-D1Dc3zQ-.js.map → events-C46I_3_q.js.map} +1 -1
- prefect/server/ui-v2/assets/{events-timeline-Co9wTQgm.js → events-timeline-DpAjaSUA.js} +2 -2
- prefect/server/ui-v2/assets/{events-timeline-Co9wTQgm.js.map → events-timeline-DpAjaSUA.js.map} +1 -1
- prefect/server/ui-v2/assets/flow-run-graph-CwfW_BdI.js +2 -0
- prefect/server/ui-v2/assets/flow-run-graph-CwfW_BdI.js.map +1 -0
- prefect/server/ui-v2/assets/{flow-run._id-CoTv2cTD.js → flow-run._id-Dd7T5NGk.js} +3 -3
- prefect/server/ui-v2/assets/{flow-run._id-CoTv2cTD.js.map → flow-run._id-Dd7T5NGk.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow-run._id-DJeNWnOU.js → flow-run._id-sCOYzbkr.js} +2 -2
- prefect/server/ui-v2/assets/{flow-run._id-DJeNWnOU.js.map → flow-run._id-sCOYzbkr.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow._id-5--exJ1V.js → flow._id-C3nUTsZH.js} +2 -2
- prefect/server/ui-v2/assets/{flow._id-5--exJ1V.js.map → flow._id-C3nUTsZH.js.map} +1 -1
- prefect/server/ui-v2/assets/{flow._id-BUiXEl1F.js → flow._id-CjqyQAAC.js} +2 -2
- prefect/server/ui-v2/assets/{flow._id-BUiXEl1F.js.map → flow._id-CjqyQAAC.js.map} +1 -1
- prefect/server/ui-v2/assets/{flows-CK1dzMTf.js → flows-DCd3xo0Q.js} +2 -2
- prefect/server/ui-v2/assets/{flows-CK1dzMTf.js.map → flows-DCd3xo0Q.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DVeMEFGG.js → header-2itxDfFr.js} +2 -2
- prefect/server/ui-v2/assets/{header-DVeMEFGG.js.map → header-2itxDfFr.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-DUaFtREk.js → header-Ne8GjMqm.js} +2 -2
- prefect/server/ui-v2/assets/{header-DUaFtREk.js.map → header-Ne8GjMqm.js.map} +1 -1
- prefect/server/ui-v2/assets/{header-BsgfqCC8.js → header-vRsd55Bl.js} +2 -2
- prefect/server/ui-v2/assets/{header-BsgfqCC8.js.map → header-vRsd55Bl.js.map} +1 -1
- prefect/server/ui-v2/assets/{index--DOPlnGf.js → index-Bkwh5I57.js} +4 -4
- prefect/server/ui-v2/assets/{index--DOPlnGf.js.map → index-Bkwh5I57.js.map} +1 -1
- prefect/server/ui-v2/assets/{json-input-DT3KbxDZ.js → json-input-DYHPmDXw.js} +2 -2
- prefect/server/ui-v2/assets/{json-input-DT3KbxDZ.js.map → json-input-DYHPmDXw.js.map} +1 -1
- prefect/server/ui-v2/assets/{key._key-BgZBad2s.js → key._key-D9waqPVY.js} +2 -2
- prefect/server/ui-v2/assets/{key._key-BgZBad2s.js.map → key._key-D9waqPVY.js.map} +1 -1
- prefect/server/ui-v2/assets/{lazy-markdown-CjMJs81K.js → lazy-markdown-91RysaF6.js} +2 -2
- prefect/server/ui-v2/assets/{lazy-markdown-CjMJs81K.js.map → lazy-markdown-91RysaF6.js.map} +1 -1
- prefect/server/ui-v2/assets/{login-Cx1NrLpk.js → login-D7uyYnlK.js} +2 -2
- prefect/server/ui-v2/assets/{login-Cx1NrLpk.js.map → login-D7uyYnlK.js.map} +1 -1
- prefect/server/ui-v2/assets/{runs-Cr_7Tg39.js → runs-B5_rXYcG.js} +2 -2
- prefect/server/ui-v2/assets/{runs-Cr_7Tg39.js.map → runs-B5_rXYcG.js.map} +1 -1
- prefect/server/ui-v2/assets/{runs-DUrOYS1_.js → runs-GMnQbC9Q.js} +2 -2
- prefect/server/ui-v2/assets/{runs-DUrOYS1_.js.map → runs-GMnQbC9Q.js.map} +1 -1
- prefect/server/ui-v2/assets/{schedule-badge-Zhj77ROw.js → schedule-badge-Cd-fRm5K.js} +2 -2
- prefect/server/ui-v2/assets/{schedule-badge-Zhj77ROw.js.map → schedule-badge-Cd-fRm5K.js.map} +1 -1
- prefect/server/ui-v2/assets/{schema-form-Ccp8AU3g.js → schema-form-Cdy5q5ON.js} +2 -2
- prefect/server/ui-v2/assets/{schema-form-Ccp8AU3g.js.map → schema-form-Cdy5q5ON.js.map} +1 -1
- prefect/server/ui-v2/assets/{settings-CjNHvh7S.js → settings-BsGzqy6W.js} +2 -2
- prefect/server/ui-v2/assets/{settings-CjNHvh7S.js.map → settings-BsGzqy6W.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CJnrAkAF.js → task-run-concurrency-limits-reset-dialog-Cen4RETI.js} +2 -2
- prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-CJnrAkAF.js.map → task-run-concurrency-limits-reset-dialog-Cen4RETI.js.map} +1 -1
- prefect/server/ui-v2/assets/{task-run._id-Cvm_Plyh.js → task-run._id-bIhtj3BE.js} +2 -2
- prefect/server/ui-v2/assets/{task-run._id-Cvm_Plyh.js.map → task-run._id-bIhtj3BE.js.map} +1 -1
- prefect/server/ui-v2/assets/{timezone-select-Cp7XxZiY.js → timezone-select-rrYri33l.js} +2 -2
- prefect/server/ui-v2/assets/{timezone-select-Cp7XxZiY.js.map → timezone-select-rrYri33l.js.map} +1 -1
- prefect/server/ui-v2/assets/{toggle-group-DGZ0dcl7.js → toggle-group-C3LHGX7w.js} +2 -2
- prefect/server/ui-v2/assets/{toggle-group-DGZ0dcl7.js.map → toggle-group-C3LHGX7w.js.map} +1 -1
- prefect/server/ui-v2/assets/{trigger-details-BvMAAJrh.js → trigger-details-B5sEwXPp.js} +2 -2
- prefect/server/ui-v2/assets/{trigger-details-BvMAAJrh.js.map → trigger-details-B5sEwXPp.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-C4LY0Nzd.js → use-delete-automation-confirmation-dialog-Bd3dYDWc.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-C4LY0Nzd.js.map → use-delete-automation-confirmation-dialog-Bd3dYDWc.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CkaSA4HR.js → use-delete-block-document-confirmation-dialog-DgyKK2fk.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-CkaSA4HR.js.map → use-delete-block-document-confirmation-dialog-DgyKK2fk.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-delete-deployment-confirmation-dialog-cisnGao9.js → use-delete-deployment-confirmation-dialog-Co6qSSOK.js} +2 -2
- prefect/server/ui-v2/assets/{use-delete-deployment-confirmation-dialog-cisnGao9.js.map → use-delete-deployment-confirmation-dialog-Co6qSSOK.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BCK_2tbs.js → use-get-artifacts-flow-task-runs-BpN8dMPb.js} +2 -2
- prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BCK_2tbs.js.map → use-get-artifacts-flow-task-runs-BpN8dMPb.js.map} +1 -1
- prefect/server/ui-v2/assets/{use-resource-options-rV-5KQt6.js → use-resource-options-C00eBL9A.js} +2 -2
- prefect/server/ui-v2/assets/{use-resource-options-rV-5KQt6.js.map → use-resource-options-C00eBL9A.js.map} +1 -1
- prefect/server/ui-v2/assets/{variables-z-MiCawT.js → variables-CsKiip11.js} +2 -2
- prefect/server/ui-v2/assets/{variables-z-MiCawT.js.map → variables-CsKiip11.js.map} +1 -1
- prefect/server/ui-v2/assets/{variables-BabJ_hXE.js → variables-ViEl85wc.js} +2 -2
- prefect/server/ui-v2/assets/{variables-BabJ_hXE.js.map → variables-ViEl85wc.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-queue-form-BQp2FWMa.js → work-pool-queue-form-BOSESyN3.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-form-BQp2FWMa.js.map → work-pool-queue-form-BOSESyN3.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-DJp6MSwY.js → work-pool-queue-toggle-BFCWL6J2.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool-queue-toggle-DJp6MSwY.js.map → work-pool-queue-toggle-BFCWL6J2.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DL31uKjj.js → work-pool._workPoolName-DpYDD8xf.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool._workPoolName-DL31uKjj.js.map → work-pool._workPoolName-DpYDD8xf.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DDMAg-Oa.js → work-pool_._workPoolName.edit-D-ZS5N2n.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-DDMAg-Oa.js.map → work-pool_._workPoolName.edit-D-ZS5N2n.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DOowHyr0.js → work-pool_._workPoolName.queue._workQueueName-CS62Q2rZ.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-DOowHyr0.js.map → work-pool_._workPoolName.queue._workQueueName-CS62Q2rZ.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue.create-U8kXUs3q.js → work-pool_._workPoolName.queue.create-DtYMzrOL.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue.create-U8kXUs3q.js.map → work-pool_._workPoolName.queue.create-DtYMzrOL.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue_._workQueueName.edit-CR2SFGIl.js → work-pool_._workPoolName.queue_._workQueueName.edit-Dc9_k8ps.js} +2 -2
- prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue_._workQueueName.edit-CR2SFGIl.js.map → work-pool_._workPoolName.queue_._workQueueName.edit-Dc9_k8ps.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pools-DP8kBaS2.js → work-pools-C02bLafB.js} +2 -2
- prefect/server/ui-v2/assets/{work-pools-DP8kBaS2.js.map → work-pools-C02bLafB.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-pools-lxhnp-i4.js → work-pools-CSWGEVgG.js} +2 -2
- prefect/server/ui-v2/assets/{work-pools-lxhnp-i4.js.map → work-pools-CSWGEVgG.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-icon-text-BMp37wo6.js → work-queue-icon-text-D8VhfR7N.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-icon-text-BMp37wo6.js.map → work-queue-icon-text-D8VhfR7N.js.map} +1 -1
- prefect/server/ui-v2/assets/{work-queue-select-B7h2Ezjb.js → work-queue-select-qZ6poNqo.js} +2 -2
- prefect/server/ui-v2/assets/{work-queue-select-B7h2Ezjb.js.map → work-queue-select-qZ6poNqo.js.map} +1 -1
- prefect/server/ui-v2/index.html +1 -1
- prefect/server/worker_communication/__init__.py +3 -0
- prefect/server/worker_communication/cleanup_queue/__init__.py +284 -0
- prefect/server/worker_communication/cleanup_queue/memory.py +723 -0
- prefect/settings/_types.py +225 -0
- prefect/settings/context.py +9 -3
- prefect/settings/models/root.py +56 -11
- prefect/settings/models/runner.py +9 -0
- prefect/settings/models/server/api.py +10 -0
- prefect/settings/models/server/root.py +5 -0
- prefect/settings/models/server/worker_channel.py +54 -0
- prefect/states.py +5 -1
- {prefect-3.7.3.dev4.dist-info → prefect-3.7.3.dev5.dist-info}/METADATA +1 -1
- {prefect-3.7.3.dev4.dist-info → prefect-3.7.3.dev5.dist-info}/RECORD +184 -179
- prefect/server/ui-v2/assets/flow-run-graph-DjwzUq6H.js +0 -2
- prefect/server/ui-v2/assets/flow-run-graph-DjwzUq6H.js.map +0 -1
- {prefect-3.7.3.dev4.dist-info → prefect-3.7.3.dev5.dist-info}/WHEEL +0 -0
- {prefect-3.7.3.dev4.dist-info → prefect-3.7.3.dev5.dist-info}/entry_points.txt +0 -0
- {prefect-3.7.3.dev4.dist-info → prefect-3.7.3.dev5.dist-info}/licenses/LICENSE +0 -0
prefect/AGENTS.md
CHANGED
|
@@ -32,6 +32,7 @@ There is no formal public/private boundary beyond the `_` prefix convention. Mod
|
|
|
32
32
|
- **Nested task submissions on a bounded `ThreadPoolTaskRunner` can deadlock.** When a worker task submits children and blocks on `.result()` while all `max_workers` threads are busy, the pool starves. `_warn_if_nested_submit_would_deadlock` detects this and emits a one-time warning — preserve this detection when changing pool management.
|
|
33
33
|
- **Result storage resolves through three tiers, potentially making an API call.** `get_default_result_storage()` checks: (1) `PREFECT_DEFAULT_RESULT_STORAGE_BLOCK` setting, (2) server-configured default block (API call to the server's Configuration store), (3) local storage path. The API call is silently suppressed on any HTTP error. Engines use `_get_default_persist_result()` — not `should_persist_result()` — at context setup time to auto-enable persistence when a server default block is configured. Do not swap `_get_default_persist_result()` back to `should_persist_result()` in engine initialization paths; `should_persist_result()` does not consult the server default.
|
|
34
34
|
- **`ResultRecordMetadata` tolerates unknown serializer types.** When loading persisted metadata, an unrecognized serializer `type` is converted to an `UnknownSerializer` placeholder rather than raising `ValidationError`. This allows inspecting result metadata when the serializer implementation is unavailable in the current environment. However, known serializer types with invalid fields still raise `ValidationError`. `UnknownSerializer.dumps()` and `UnknownSerializer.loads()` raise `RuntimeError` — the tolerance is for inspection only, not actual serialization/deserialization.
|
|
35
|
+
- **`ResultRecord` must be marked persisted after every storage write.** `ResultStore` calls `mark_persisted()` on every record it writes; `to_state_create` in `states.py` consults `is_persisted` as a fallback when `should_persist_result()` returns `False` (e.g., after run context teardown). Any new sync or async persist path that omits `mark_persisted()` will silently drop state metadata for already-written results.
|
|
35
36
|
- **Flow-run suspension is enforced at orchestration boundaries.** Suspension is delivered via `FlowRunSuspensionRequest` and raised with `raise_if_flow_run_suspension_requested()`. When changing engines, futures, task runners, or generator execution, check before returning control to flow user code or proposing a flow state that could leave `Suspended`; keep sync/async paths aligned and avoid per-boundary API reads.
|
|
36
37
|
|
|
37
38
|
## Logging
|
prefect/_build_info.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Generated by versioningit
|
|
2
|
-
__version__ = "3.7.3.
|
|
3
|
-
__build_date__ = "2026-05-
|
|
4
|
-
__git_commit__ = "
|
|
2
|
+
__version__ = "3.7.3.dev5"
|
|
3
|
+
__build_date__ = "2026-05-28 09:25:13.582068+00:00"
|
|
4
|
+
__git_commit__ = "f7d76f21e9731cedf0462e3f9632133e1c23a439"
|
|
5
5
|
__dirty__ = False
|
|
@@ -16,6 +16,7 @@ from uuid import UUID
|
|
|
16
16
|
from pydantic import (
|
|
17
17
|
BaseModel,
|
|
18
18
|
Field,
|
|
19
|
+
PrivateAttr,
|
|
19
20
|
ValidationError,
|
|
20
21
|
field_validator,
|
|
21
22
|
model_validator,
|
|
@@ -105,6 +106,14 @@ class ResultRecord(BaseModel, Generic[R]):
|
|
|
105
106
|
|
|
106
107
|
metadata: ResultRecordMetadata
|
|
107
108
|
result: R
|
|
109
|
+
_persisted: bool = PrivateAttr(default=False)
|
|
110
|
+
|
|
111
|
+
@property
|
|
112
|
+
def is_persisted(self) -> bool:
|
|
113
|
+
return self._persisted
|
|
114
|
+
|
|
115
|
+
def mark_persisted(self) -> None:
|
|
116
|
+
self._persisted = True
|
|
108
117
|
|
|
109
118
|
@property
|
|
110
119
|
def expiration(self) -> DateTime | None:
|
prefect/cli/_server_utils.py
CHANGED
|
@@ -274,6 +274,9 @@ def _run_in_background(
|
|
|
274
274
|
keep_alive_timeout: int,
|
|
275
275
|
no_services: bool,
|
|
276
276
|
workers: int,
|
|
277
|
+
*,
|
|
278
|
+
ws_ping_interval: float = 20.0,
|
|
279
|
+
ws_ping_timeout: float = 20.0,
|
|
277
280
|
) -> None:
|
|
278
281
|
command = [
|
|
279
282
|
sys.executable,
|
|
@@ -292,6 +295,8 @@ def _run_in_background(
|
|
|
292
295
|
"--workers",
|
|
293
296
|
str(workers),
|
|
294
297
|
]
|
|
298
|
+
command.extend(["--ws-ping-interval", str(ws_ping_interval)])
|
|
299
|
+
command.extend(["--ws-ping-timeout", str(ws_ping_timeout)])
|
|
295
300
|
logger.debug("Opening server process with command: %s", shlex.join(command))
|
|
296
301
|
|
|
297
302
|
env = {**os.environ, **server_settings, "PREFECT__SERVER_FINAL": "1"}
|
|
@@ -322,6 +327,9 @@ def _run_in_foreground(
|
|
|
322
327
|
keep_alive_timeout: int,
|
|
323
328
|
no_services: bool,
|
|
324
329
|
workers: int,
|
|
330
|
+
*,
|
|
331
|
+
ws_ping_interval: float = 20.0,
|
|
332
|
+
ws_ping_timeout: float = 20.0,
|
|
325
333
|
) -> None:
|
|
326
334
|
from prefect.server.api.server import create_app
|
|
327
335
|
|
|
@@ -336,6 +344,8 @@ def _run_in_foreground(
|
|
|
336
344
|
host=host,
|
|
337
345
|
port=port,
|
|
338
346
|
timeout_keep_alive=keep_alive_timeout,
|
|
347
|
+
ws_ping_interval=ws_ping_interval,
|
|
348
|
+
ws_ping_timeout=ws_ping_timeout,
|
|
339
349
|
log_level=server_settings.get(
|
|
340
350
|
"PREFECT_SERVER_LOGGING_LEVEL", "info"
|
|
341
351
|
).lower(),
|
|
@@ -351,6 +361,8 @@ def _run_in_foreground(
|
|
|
351
361
|
host=host,
|
|
352
362
|
port=port,
|
|
353
363
|
timeout_keep_alive=keep_alive_timeout,
|
|
364
|
+
ws_ping_interval=ws_ping_interval,
|
|
365
|
+
ws_ping_timeout=ws_ping_timeout,
|
|
354
366
|
log_level=server_settings.get(
|
|
355
367
|
"PREFECT_SERVER_LOGGING_LEVEL", "info"
|
|
356
368
|
).lower(),
|
prefect/cli/server.py
CHANGED
|
@@ -133,6 +133,8 @@ def start(
|
|
|
133
133
|
PREFECT_SERVER_API_HOST,
|
|
134
134
|
PREFECT_SERVER_API_KEEPALIVE_TIMEOUT,
|
|
135
135
|
PREFECT_SERVER_API_PORT,
|
|
136
|
+
PREFECT_SERVER_API_WEBSOCKET_PING_INTERVAL,
|
|
137
|
+
PREFECT_SERVER_API_WEBSOCKET_PING_TIMEOUT,
|
|
136
138
|
PREFECT_SERVER_LOGGING_LEVEL,
|
|
137
139
|
PREFECT_UI_ENABLED,
|
|
138
140
|
)
|
|
@@ -146,6 +148,9 @@ def start(
|
|
|
146
148
|
keep_alive_timeout = PREFECT_SERVER_API_KEEPALIVE_TIMEOUT.value()
|
|
147
149
|
if log_level is None:
|
|
148
150
|
log_level = PREFECT_SERVER_LOGGING_LEVEL.value()
|
|
151
|
+
|
|
152
|
+
ws_ping_interval = PREFECT_SERVER_API_WEBSOCKET_PING_INTERVAL.value()
|
|
153
|
+
ws_ping_timeout = PREFECT_SERVER_API_WEBSOCKET_PING_TIMEOUT.value()
|
|
149
154
|
if analytics is None:
|
|
150
155
|
analytics = PREFECT_SERVER_ANALYTICS_ENABLED.value()
|
|
151
156
|
if scheduler is None:
|
|
@@ -229,6 +234,8 @@ def start(
|
|
|
229
234
|
keep_alive_timeout,
|
|
230
235
|
no_services,
|
|
231
236
|
workers,
|
|
237
|
+
ws_ping_interval=ws_ping_interval,
|
|
238
|
+
ws_ping_timeout=ws_ping_timeout,
|
|
232
239
|
)
|
|
233
240
|
else:
|
|
234
241
|
_run_in_foreground(
|
|
@@ -239,6 +246,8 @@ def start(
|
|
|
239
246
|
keep_alive_timeout,
|
|
240
247
|
no_services,
|
|
241
248
|
workers,
|
|
249
|
+
ws_ping_interval=ws_ping_interval,
|
|
250
|
+
ws_ping_timeout=ws_ping_timeout,
|
|
242
251
|
)
|
|
243
252
|
|
|
244
253
|
|
prefect/results.py
CHANGED
|
@@ -867,6 +867,7 @@ class ResultStore(BaseModel):
|
|
|
867
867
|
|
|
868
868
|
if self.cache_result_in_memory:
|
|
869
869
|
self.cache[resolved_key_path] = result_record
|
|
870
|
+
result_record.mark_persisted()
|
|
870
871
|
return result_record
|
|
871
872
|
|
|
872
873
|
def _read(self, key: str, holder: str) -> "ResultRecord[Any]":
|
|
@@ -936,6 +937,7 @@ class ResultStore(BaseModel):
|
|
|
936
937
|
|
|
937
938
|
if self.cache_result_in_memory:
|
|
938
939
|
self.cache[resolved_key_path] = result_record
|
|
940
|
+
result_record.mark_persisted()
|
|
939
941
|
return result_record
|
|
940
942
|
|
|
941
943
|
def read(
|
|
@@ -1122,6 +1124,7 @@ class ResultStore(BaseModel):
|
|
|
1122
1124
|
(result_record.metadata.storage_key,),
|
|
1123
1125
|
{"content": result_record.serialize()},
|
|
1124
1126
|
)
|
|
1127
|
+
result_record.mark_persisted()
|
|
1125
1128
|
if self.cache_result_in_memory:
|
|
1126
1129
|
self.cache[key] = result_record
|
|
1127
1130
|
|
|
@@ -1185,6 +1188,7 @@ class ResultStore(BaseModel):
|
|
|
1185
1188
|
(result_record.metadata.storage_key,),
|
|
1186
1189
|
{"content": result_record.serialize()},
|
|
1187
1190
|
)
|
|
1191
|
+
result_record.mark_persisted()
|
|
1188
1192
|
if self.cache_result_in_memory:
|
|
1189
1193
|
self.cache[key] = result_record
|
|
1190
1194
|
|
prefect/runner/AGENTS.md
CHANGED
|
@@ -138,7 +138,11 @@ These validations exist to prevent git argument injection. Do not bypass them wh
|
|
|
138
138
|
|
|
139
139
|
**Env/sys.path isolation:** `_prepared_workspace_context` mutates `os.environ` and `sys.path` in the caller process but does NOT change `os.getcwd()`. The parent working directory is preserved.
|
|
140
140
|
|
|
141
|
-
**
|
|
141
|
+
**Local path in-place execution:** When no pull steps are configured and the entrypoint file exists at `deployment.path` but not in the workspace root, `prepare_workspace` sets `working_directory` to the local path — not under `workspace_root`. The workspace directory is still created but is not the execution root. This is the "image-baked" pattern: code lives at a fixed local path (e.g., inside a container), not in object storage.
|
|
142
|
+
|
|
143
|
+
**Pull-step directory fallback:** When pull steps run but none produces a `directory` output or changes CWD, `_ensure_entrypoint_in_workspace` copies storage into the workspace root as a fallback. This handles setup-only pull steps (e.g., `run_shell_script` for environment prep) that do not control the working directory themselves.
|
|
144
|
+
|
|
145
|
+
**Automatic dependency installation:** By default, `WorkspaceResolvingEngineCommandStarter` does not install dependencies before starting a flow run. When no explicit command is passed and `PREFECT_RUNNER_AUTO_INSTALL_DEPENDENCIES` is true, it auto-selects `uv run --no-default-groups --project <project_root> -m prefect.flow_engine` — but only when all three conditions hold: `pyproject.toml` exists at `project_root`, the `project.dependencies` list includes `prefect`, and `uv` is found via the workspace's `PATH` env var (not the system PATH). If the setting is false or any condition fails, the command falls back to `None`. Explicit commands always take precedence.
|
|
142
146
|
|
|
143
147
|
## Reference
|
|
144
148
|
|
|
@@ -167,6 +167,9 @@ def _pyproject_declares_prefect_dependency(pyproject: Path) -> bool:
|
|
|
167
167
|
|
|
168
168
|
|
|
169
169
|
def _uv_run_command(workspace: PreparedWorkspace) -> str | None:
|
|
170
|
+
if not get_current_settings().runner.auto_install_dependencies:
|
|
171
|
+
return None
|
|
172
|
+
|
|
170
173
|
project_root = workspace.project_root
|
|
171
174
|
if project_root is None:
|
|
172
175
|
return None
|
|
@@ -188,6 +191,7 @@ def _uv_run_command(workspace: PreparedWorkspace) -> str | None:
|
|
|
188
191
|
[
|
|
189
192
|
uv_executable,
|
|
190
193
|
"run",
|
|
194
|
+
"--no-default-groups",
|
|
191
195
|
"--project",
|
|
192
196
|
str(project_root),
|
|
193
197
|
"-m",
|
prefect/server/AGENTS.md
CHANGED
|
@@ -66,6 +66,7 @@ Both V1 and V2 UI bundles are served simultaneously when available: V1 at `PREFE
|
|
|
66
66
|
- `events/` — Server-side event processing: trigger evaluation, action execution, messaging, streaming (see also `../events/` for client-side schemas)
|
|
67
67
|
- `concurrency/` — Server-side concurrency management
|
|
68
68
|
- `logs/` — Log storage and retrieval
|
|
69
|
+
- `worker_communication/` — Pluggable server-side messaging to workers: cleanup delivery queue for expired/cancelled flow run teardown. The abstract interface is in `cleanup_queue/__init__.py`; the default in-memory backend (`cleanup_queue/memory.py`) is a process-level singleton and is not restart-safe. Configure `PREFECT_SERVER_WORKER_CHANNEL_CLEANUP_QUEUE_STORAGE` to point to a module exposing a concrete `WorkerCleanupQueue` subclass for HA or Redis-backed deployments.
|
|
69
70
|
|
|
70
71
|
## Related
|
|
71
72
|
|
prefect/server/__init__.py
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
from
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from prefect.server import models, orchestration, schemas, services
|
|
2
8
|
|
|
3
9
|
__all__ = ["models", "orchestration", "schemas", "services"]
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def __getattr__(name: str) -> object:
|
|
13
|
+
module_name = f"{__name__}.{name}"
|
|
14
|
+
try:
|
|
15
|
+
module = importlib.import_module(module_name)
|
|
16
|
+
except ModuleNotFoundError as exc:
|
|
17
|
+
if exc.name != module_name:
|
|
18
|
+
raise
|
|
19
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
20
|
+
|
|
21
|
+
globals()[name] = module
|
|
22
|
+
return module
|
prefect/server/api/__init__.py
CHANGED
|
@@ -1,33 +1,86 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from prefect.server.api import (
|
|
8
|
+
admin,
|
|
9
|
+
artifacts,
|
|
10
|
+
automations,
|
|
11
|
+
block_capabilities,
|
|
12
|
+
block_documents,
|
|
13
|
+
block_schemas,
|
|
14
|
+
block_types,
|
|
15
|
+
collections,
|
|
16
|
+
concurrency_limits,
|
|
17
|
+
concurrency_limits_v2,
|
|
18
|
+
csrf_token,
|
|
19
|
+
dependencies,
|
|
20
|
+
deployments,
|
|
21
|
+
events,
|
|
22
|
+
flow_run_states,
|
|
23
|
+
flow_runs,
|
|
24
|
+
flows,
|
|
25
|
+
logs,
|
|
26
|
+
middleware,
|
|
27
|
+
root,
|
|
28
|
+
run_history,
|
|
29
|
+
saved_searches,
|
|
30
|
+
server,
|
|
31
|
+
task_run_states,
|
|
32
|
+
task_runs,
|
|
33
|
+
task_workers,
|
|
34
|
+
templates,
|
|
35
|
+
ui,
|
|
36
|
+
variables,
|
|
37
|
+
work_queues,
|
|
38
|
+
workers,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
__all__ = [
|
|
42
|
+
"admin",
|
|
43
|
+
"artifacts",
|
|
44
|
+
"automations",
|
|
45
|
+
"block_capabilities",
|
|
46
|
+
"block_documents",
|
|
47
|
+
"block_schemas",
|
|
48
|
+
"block_types",
|
|
49
|
+
"collections",
|
|
50
|
+
"concurrency_limits",
|
|
51
|
+
"concurrency_limits_v2",
|
|
52
|
+
"csrf_token",
|
|
53
|
+
"dependencies",
|
|
54
|
+
"deployments",
|
|
55
|
+
"events",
|
|
56
|
+
"flow_run_states",
|
|
57
|
+
"flow_runs",
|
|
58
|
+
"flows",
|
|
59
|
+
"logs",
|
|
60
|
+
"middleware",
|
|
61
|
+
"root",
|
|
62
|
+
"run_history",
|
|
63
|
+
"saved_searches",
|
|
64
|
+
"server",
|
|
65
|
+
"task_run_states",
|
|
66
|
+
"task_runs",
|
|
67
|
+
"task_workers",
|
|
68
|
+
"templates",
|
|
69
|
+
"ui",
|
|
70
|
+
"variables",
|
|
71
|
+
"work_queues",
|
|
72
|
+
"workers",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def __getattr__(name: str) -> object:
|
|
77
|
+
module_name = f"{__name__}.{name}"
|
|
78
|
+
try:
|
|
79
|
+
module = importlib.import_module(module_name)
|
|
80
|
+
except ModuleNotFoundError as exc:
|
|
81
|
+
if exc.name != module_name:
|
|
82
|
+
raise
|
|
83
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
84
|
+
|
|
85
|
+
globals()[name] = module
|
|
86
|
+
return module
|
|
@@ -1,25 +1,44 @@
|
|
|
1
|
-
from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import importlib
|
|
4
|
+
from typing import TYPE_CHECKING
|
|
5
|
+
|
|
6
|
+
if TYPE_CHECKING:
|
|
7
|
+
from prefect.server.schemas import (
|
|
8
|
+
actions,
|
|
9
|
+
core,
|
|
10
|
+
filters,
|
|
11
|
+
internal,
|
|
12
|
+
responses,
|
|
13
|
+
schedules,
|
|
14
|
+
sorting,
|
|
15
|
+
states,
|
|
16
|
+
statuses,
|
|
17
|
+
ui,
|
|
18
|
+
)
|
|
13
19
|
|
|
14
20
|
__all__ = [
|
|
15
21
|
"actions",
|
|
16
22
|
"core",
|
|
17
23
|
"filters",
|
|
24
|
+
"internal",
|
|
18
25
|
"responses",
|
|
19
26
|
"schedules",
|
|
20
27
|
"sorting",
|
|
21
28
|
"states",
|
|
22
29
|
"statuses",
|
|
23
|
-
"internal",
|
|
24
30
|
"ui",
|
|
25
31
|
]
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def __getattr__(name: str) -> object:
|
|
35
|
+
module_name = f"{__name__}.{name}"
|
|
36
|
+
try:
|
|
37
|
+
module = importlib.import_module(module_name)
|
|
38
|
+
except ModuleNotFoundError as exc:
|
|
39
|
+
if exc.name != module_name:
|
|
40
|
+
raise
|
|
41
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}") from None
|
|
42
|
+
|
|
43
|
+
globals()[name] = module
|
|
44
|
+
return module
|
|
@@ -74,7 +74,12 @@ def _get_select_deployments_to_schedule_query(
|
|
|
74
74
|
db.FlowRun.deployment_id == db.DeploymentSchedule.deployment_id,
|
|
75
75
|
db.FlowRun.state_type == StateType.SCHEDULED,
|
|
76
76
|
db.FlowRun.next_scheduled_start_time >= right_now,
|
|
77
|
-
|
|
77
|
+
# `== true` (not `.is_(True)`) so the predicate matches the
|
|
78
|
+
# `auto_scheduled = true` clause of the partial index
|
|
79
|
+
# `ix_flow_run__schedule_id_scheduler`. PostgreSQL's predicate
|
|
80
|
+
# implication prover does not treat `IS true` as implying
|
|
81
|
+
# `= true`, so `.is_(True)` silently disqualifies the index.
|
|
82
|
+
db.FlowRun.auto_scheduled == sa.true(),
|
|
78
83
|
schedule_id_match,
|
|
79
84
|
)
|
|
80
85
|
.correlate(db.DeploymentSchedule)
|
|
@@ -88,7 +93,7 @@ def _get_select_deployments_to_schedule_query(
|
|
|
88
93
|
db.FlowRun.deployment_id == db.DeploymentSchedule.deployment_id,
|
|
89
94
|
db.FlowRun.state_type == StateType.SCHEDULED,
|
|
90
95
|
db.FlowRun.next_scheduled_start_time >= right_now,
|
|
91
|
-
db.FlowRun.auto_scheduled.
|
|
96
|
+
db.FlowRun.auto_scheduled == sa.true(),
|
|
92
97
|
schedule_id_match,
|
|
93
98
|
)
|
|
94
99
|
.correlate(db.DeploymentSchedule)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t,o as n,r,s as i}from"./vendor-codemirror-B3tGe8Gh.js";import{_ as a,a as o,g as s,i as c,j as l,o as u,r as d}from"./vendor-tanstack-4U0A7zMo.js";import{g as f,h as p,t as m,u as h}from"./button-B1qHyd9c.js";import{n as g}from"./dist-jHPxXbiJ.js";import{n as _}from"./input-B5J9cihQ.js";import{t as v}from"./tag-badge-RtUnjBoH.js";import{Ar as y,Dr as b,Er as x,K as S,Ln as C,Or as w,Tr as T,cr as E,ir as D,jr as O,lr as k,m as A,or as j,sr as M}from"./index--DOPlnGf.js";import{t as N}from"./key-value-CVUITXjd.js";import{n as P}from"./use-get-artifacts-flow-task-runs-BCK_2tbs.js";import{t as F}from"./lazy-markdown-CjMJs81K.js";import{t as I}from"./data-table-CxsVws4O.js";var L=e(i(),1),R=n(),z=({artifact:e})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e.key?(0,R.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,R.jsx)(T,{className:`min-w-0`,children:(0,R.jsxs)(w,{className:`flex-nowrap`,children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/artifacts/key/$key`,params:{key:e.key},className:`text-xl font-semibold truncate block`,title:e.key,children:e.key})}),(0,R.jsx)(y,{}),(0,R.jsx)(x,{className:`text-xl font-semibold min-w-0`,children:(0,R.jsx)(`span`,{className:`font-mono truncate block`,title:e.id,children:e.id})})]})})}):(0,R.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,R.jsx)(T,{className:`min-w-0`,children:(0,R.jsxs)(w,{className:`flex-nowrap`,children:[e.flow_run&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/runs/flow-run/$id`,params:{id:e.flow_run_id??``},className:`text-xl font-semibold truncate block`,title:e.flow_run.name,children:e.flow_run.name})}),(0,R.jsx)(y,{})]}),e.task_run&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/runs/task-run/$id`,params:{id:e.task_run_id??``},className:`text-xl font-semibold truncate block`,title:e.task_run.name,children:e.task_run.name})}),(0,R.jsx)(y,{})]}),(0,R.jsx)(x,{className:`text-xl font-semibold min-w-0`,children:(0,R.jsx)(`span`,{className:`font-mono truncate block`,title:e.id,children:e.id})})]})})}),(0,R.jsx)(D,{id:`artifacts-guide`,label:`Documentation`})]}),e.description&&(0,R.jsx)(`div`,{className:`text-sm text-muted-foreground my-2`,children:(0,R.jsx)(F,{children:e.description})}),(0,R.jsx)(`hr`,{})]}),B=({artifact:e})=>{let[n,i]=(0,L.useState)(!1),a=()=>{i(e=>!e)},o=(0,L.useRef)(null),{setContainer:s}=r({container:o.current,extensions:[t.lineWrapping],value:String(e.data),indentWithTab:!1,editable:!0,basicSetup:{highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1}});(0,L.useEffect)(()=>{o.current&&s(o.current)},[s]);let c=e=>{g.success(`Copied to clipboard`),navigator.clipboard.writeText(e)};return(0,R.jsxs)(`div`,{className:`flex flex-col justify-center items-center`,children:[(0,R.jsxs)(m,{"data-testid":`show-raw-data-button`,variant:`outline`,onClick:a,className:`my-4`,children:[n?`Hide`:`Show`,` Raw Data`]}),(0,R.jsx)(`div`,{className:`rounded-md border shadow-xs focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative`,style:{display:n?`block`:`none`},ref:e=>{o.current=e},"data-testid":`raw-data-display`,children:(0,R.jsx)(m,{onClick:()=>c(e.data),variant:`ghost`,size:`icon`,className:`absolute top-0 right-0 z-10`,"aria-label":`copy`,children:(0,R.jsx)(f,{id:`Copy`,className:`size-2`})})})]})},ee=s(`/artifacts/artifact/$id`),V=({artifact:e,artifactContent:t,detailsContent:n})=>{let{tab:r}=ee.useSearch(),i=H(e,t,n);return(0,R.jsxs)(j,{defaultValue:`Artifact`,value:r,children:[(0,R.jsx)(E,{children:i.map(({value:e,hiddenOnDesktop:t,LinkComponent:n})=>(0,R.jsx)(n,{className:p(t&&`lg:hidden`)},e))}),i.map(({value:e,ViewComponent:t})=>(0,R.jsx)(t,{},e))]})};function H(e,t,n){return(0,L.useMemo)(()=>{let r=[];return r.push({value:`Artifact`,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Artifact`},children:(0,R.jsx)(k,{value:`Artifact`,className:e,children:`Artifact`})}),ViewComponent:()=>(0,R.jsxs)(M,{value:`Artifact`,children:[t,(0,R.jsx)(B,{artifact:e})]})}),r.push({value:`Details`,hiddenOnDesktop:!0,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Details`},children:(0,R.jsx)(k,{value:`Details`,className:e,children:`Details`})}),ViewComponent:()=>(0,R.jsx)(M,{value:`Details`,children:n})}),r.push({value:`Raw`,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Raw`},children:(0,R.jsx)(k,{value:`Raw`,className:e,children:`Raw`})}),ViewComponent:()=>(0,R.jsx)(M,{value:`Raw`,children:(0,R.jsx)(U,{artifact:e})})}),r},[e,t,n])}function U({artifact:e}){return(0,R.jsx)(`pre`,{className:`whitespace-pre-wrap break-words rounded-md border bg-muted p-4 text-sm`,children:typeof e.data==`string`?e.data:JSON.stringify(e.data,null,2)})}var W=({url:e})=>(0,R.jsxs)(`div`,{"data-testid":e,className:`prose dark:prose-invert mt-2`,children:[(0,R.jsx)(`img`,{"data-testid":`image-${e}`,src:e,alt:`artifact-image`,className:`w-full`}),(0,R.jsxs)(`p`,{className:`text-lg`,children:[`Image URL:`,` `,(0,R.jsx)(`a`,{className:`text-link hover:text-link-hover hover:underline`,target:`_blank`,href:e,rel:`noreferrer`,children:e})]})]}),G=({markdown:e})=>(0,R.jsx)(`div`,{"data-testid":`markdown-display`,className:`mt-4 prose dark:prose-invert`,children:(0,R.jsx)(F,{children:e})}),K=({progress:e})=>(0,R.jsxs)(`p`,{"data-testid":`progress-display`,className:`text-lg`,children:[`Progress: `,e,`%`]}),q=c(),J=({tableData:e})=>{let t=(0,L.useMemo)(()=>JSON.parse(e),[e]),n=(0,L.useMemo)(()=>Object.keys(t[0]??{}),[t]),[r,i]=(0,L.useState)(``),a=(0,L.useMemo)(()=>n.map(e=>q.display({id:e,header:()=>e,cell:({row:t})=>{let n=String(t.original[e]??``);return(0,R.jsx)(`span`,{className:`truncate block`,title:n,children:n})}})),[n]),s=d({data:(0,L.useMemo)(()=>r?t.filter(e=>Object.values(e).some(e=>String(e).toLowerCase().includes(r.toLowerCase()))):t,[r,t]),columns:a,getCoreRowModel:o(),getPaginationRowModel:u(),initialState:{pagination:{pageIndex:0,pageSize:10}}});return(0,R.jsxs)(`div`,{"data-testid":`table-display`,className:`mt-4`,children:[(0,R.jsx)(`div`,{className:`flex flex-row justify-end items-center mb-2`,children:(0,R.jsx)(_,{placeholder:`Search`,value:r,onChange:e=>i(e.target.value)})}),(0,R.jsx)(I,{table:s})]})},Y=({artifact:e})=>{let t=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-base font-semibold`,children:`Artifact`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Key`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.key??`None`})}),(0,R.jsx)(N,{label:`Type`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.type??`None`})}),(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{children:t??`None`})})]})]})},X=e(O(),1),Z=({flowRun:e})=>{let t=(0,L.useMemo)(()=>e.start_time?h(e.start_time,`dateTime`):null,[e.start_time]),n=(0,L.useMemo)(()=>e.estimated_run_time?(0,X.default)(Math.ceil(e.estimated_run_time)*1e3):null,[e.estimated_run_time]),r=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]),i=(0,L.useMemo)(()=>e.updated?h(e.updated,`dateTime`):null,[e.updated]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-lg font-bold`,children:`Flow Run`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Start time`,value:(0,R.jsxs)(`span`,{className:`font-mono flex items-center`,children:[(0,R.jsx)(f,{id:`Calendar`,className:`inline w-4 mr-2`}),t??`None`]})}),(0,R.jsx)(N,{label:`Duration`,value:(0,R.jsxs)(`span`,{className:`font-mono flex items-center`,children:[(0,R.jsx)(f,{id:`Clock`,className:`inline w-4 mr-2`}),n??`None`]})}),(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:r??`None`})}),(0,R.jsx)(N,{label:`Last Updated`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:i??`None`})}),(0,R.jsx)(N,{label:`Tags`,value:e.tags&&e.tags.length>0?(0,R.jsx)(`div`,{className:`flex flex-wrap`,children:e.tags.map(e=>(0,R.jsx)(v,{tag:e},e))}):(0,R.jsx)(`span`,{className:`font-mono`,children:`None`})}),(0,R.jsx)(N,{label:`State Message`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.state?.message??`None`})})]})]})},Q=({artifact:e})=>{let{flow_run:t,task_run:n}=e;return e.key||t||n?(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.key&&(0,R.jsx)(N,{label:`Artifact`,value:(0,R.jsx)(a,{to:`/artifacts/key/$key`,params:{key:e.key},className:`text-link hover:text-link-hover hover:underline`,children:e.key})}),t&&(0,R.jsx)(N,{label:`Flow Run`,value:(0,R.jsx)(a,{to:`/runs/flow-run/$id`,params:{id:t.id},className:`text-link hover:text-link-hover hover:underline`,children:t.name})}),n&&(0,R.jsx)(N,{label:`Task Run`,value:(0,R.jsx)(a,{to:`/runs/task-run/$id`,params:{id:n.id},className:`text-link hover:text-link-hover hover:underline`,children:n.name})}),(0,R.jsx)(`hr`,{className:`mt-2 border-border`})]}):null},$=({taskRun:e})=>{let t=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]),n=(0,L.useMemo)(()=>e.updated?h(e.updated,`dateTime`):null,[e.updated]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-lg font-bold`,children:`Task Run`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:t??`None`})}),(0,R.jsx)(N,{label:`Last Updated`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:n??`None`})}),(0,R.jsx)(N,{label:`Tags`,value:e.tags&&e.tags.length>0?(0,R.jsx)(`div`,{className:`flex flex-wrap`,children:e.tags.map(e=>(0,R.jsx)(v,{tag:e},e))}):(0,R.jsx)(`span`,{className:`font-mono`,children:`None`})})]})]})},te=({artifact:e})=>{let{flow_run:t,task_run:n}=e;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,R.jsx)(Q,{artifact:e}),(0,R.jsx)(Y,{artifact:e}),(t||n)&&(0,R.jsx)(`hr`,{className:`mt-4 border-border`}),t&&(0,R.jsx)(Z,{flowRun:t}),t&&n&&(0,R.jsx)(`hr`,{className:`mt-4 border-border`}),n&&(0,R.jsx)($,{taskRun:n})]})},ne=({artifact:e})=>{let t=(0,L.useMemo)(()=>{switch(e.type){case`markdown`:case`link`:return(0,R.jsx)(G,{markdown:e.data});case`image`:return(0,R.jsx)(W,{url:e.data});case`progress`:return(0,R.jsx)(K,{progress:e.data});case`table`:return(0,R.jsx)(J,{tableData:e.data});default:return(0,R.jsx)(`pre`,{children:JSON.stringify(e.data,null,2)})}},[e]),n=(0,R.jsx)(te,{artifact:e});return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(z,{artifact:e}),(0,R.jsxs)(`div`,{className:`flex flex-col lg:flex-row lg:gap-6`,children:[(0,R.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,R.jsx)(V,{artifact:e,artifactContent:t,detailsContent:n})}),(0,R.jsx)(C,{children:n})]})]})},re=function(){let{id:e}=A.useParams(),{data:t}=l(S(e));return(0,R.jsx)(ne,{artifact:P(e)??t})};export{re as component};
|
|
2
|
-
//# sourceMappingURL=artifact._id-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{a as t,o as n,r,s as i}from"./vendor-codemirror-B3tGe8Gh.js";import{_ as a,a as o,g as s,i as c,j as l,o as u,r as d}from"./vendor-tanstack-4U0A7zMo.js";import{g as f,h as p,t as m,u as h}from"./button-B1qHyd9c.js";import{n as g}from"./dist-jHPxXbiJ.js";import{n as _}from"./input-B5J9cihQ.js";import{t as v}from"./tag-badge-RtUnjBoH.js";import{Ar as y,Dr as b,Er as x,K as S,Ln as C,Or as w,Tr as T,cr as E,ir as D,jr as O,lr as k,m as A,or as j,sr as M}from"./index-Bkwh5I57.js";import{t as N}from"./key-value-CVUITXjd.js";import{n as P}from"./use-get-artifacts-flow-task-runs-BpN8dMPb.js";import{t as F}from"./lazy-markdown-91RysaF6.js";import{t as I}from"./data-table-XB91Mv7x.js";var L=e(i(),1),R=n(),z=({artifact:e})=>(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[e.key?(0,R.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,R.jsx)(T,{className:`min-w-0`,children:(0,R.jsxs)(w,{className:`flex-nowrap`,children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/artifacts/key/$key`,params:{key:e.key},className:`text-xl font-semibold truncate block`,title:e.key,children:e.key})}),(0,R.jsx)(y,{}),(0,R.jsx)(x,{className:`text-xl font-semibold min-w-0`,children:(0,R.jsx)(`span`,{className:`font-mono truncate block`,title:e.id,children:e.id})})]})})}):(0,R.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,R.jsx)(T,{className:`min-w-0`,children:(0,R.jsxs)(w,{className:`flex-nowrap`,children:[e.flow_run&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/runs/flow-run/$id`,params:{id:e.flow_run_id??``},className:`text-xl font-semibold truncate block`,title:e.flow_run.name,children:e.flow_run.name})}),(0,R.jsx)(y,{})]}),e.task_run&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(x,{className:`min-w-0`,children:(0,R.jsx)(b,{to:`/runs/task-run/$id`,params:{id:e.task_run_id??``},className:`text-xl font-semibold truncate block`,title:e.task_run.name,children:e.task_run.name})}),(0,R.jsx)(y,{})]}),(0,R.jsx)(x,{className:`text-xl font-semibold min-w-0`,children:(0,R.jsx)(`span`,{className:`font-mono truncate block`,title:e.id,children:e.id})})]})})}),(0,R.jsx)(D,{id:`artifacts-guide`,label:`Documentation`})]}),e.description&&(0,R.jsx)(`div`,{className:`text-sm text-muted-foreground my-2`,children:(0,R.jsx)(F,{children:e.description})}),(0,R.jsx)(`hr`,{})]}),B=({artifact:e})=>{let[n,i]=(0,L.useState)(!1),a=()=>{i(e=>!e)},o=(0,L.useRef)(null),{setContainer:s}=r({container:o.current,extensions:[t.lineWrapping],value:String(e.data),indentWithTab:!1,editable:!0,basicSetup:{highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1}});(0,L.useEffect)(()=>{o.current&&s(o.current)},[s]);let c=e=>{g.success(`Copied to clipboard`),navigator.clipboard.writeText(e)};return(0,R.jsxs)(`div`,{className:`flex flex-col justify-center items-center`,children:[(0,R.jsxs)(m,{"data-testid":`show-raw-data-button`,variant:`outline`,onClick:a,className:`my-4`,children:[n?`Hide`:`Show`,` Raw Data`]}),(0,R.jsx)(`div`,{className:`rounded-md border shadow-xs focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative`,style:{display:n?`block`:`none`},ref:e=>{o.current=e},"data-testid":`raw-data-display`,children:(0,R.jsx)(m,{onClick:()=>c(e.data),variant:`ghost`,size:`icon`,className:`absolute top-0 right-0 z-10`,"aria-label":`copy`,children:(0,R.jsx)(f,{id:`Copy`,className:`size-2`})})})]})},ee=s(`/artifacts/artifact/$id`),V=({artifact:e,artifactContent:t,detailsContent:n})=>{let{tab:r}=ee.useSearch(),i=H(e,t,n);return(0,R.jsxs)(j,{defaultValue:`Artifact`,value:r,children:[(0,R.jsx)(E,{children:i.map(({value:e,hiddenOnDesktop:t,LinkComponent:n})=>(0,R.jsx)(n,{className:p(t&&`lg:hidden`)},e))}),i.map(({value:e,ViewComponent:t})=>(0,R.jsx)(t,{},e))]})};function H(e,t,n){return(0,L.useMemo)(()=>{let r=[];return r.push({value:`Artifact`,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Artifact`},children:(0,R.jsx)(k,{value:`Artifact`,className:e,children:`Artifact`})}),ViewComponent:()=>(0,R.jsxs)(M,{value:`Artifact`,children:[t,(0,R.jsx)(B,{artifact:e})]})}),r.push({value:`Details`,hiddenOnDesktop:!0,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Details`},children:(0,R.jsx)(k,{value:`Details`,className:e,children:`Details`})}),ViewComponent:()=>(0,R.jsx)(M,{value:`Details`,children:n})}),r.push({value:`Raw`,LinkComponent:({className:e})=>(0,R.jsx)(a,{to:`.`,search:{tab:`Raw`},children:(0,R.jsx)(k,{value:`Raw`,className:e,children:`Raw`})}),ViewComponent:()=>(0,R.jsx)(M,{value:`Raw`,children:(0,R.jsx)(U,{artifact:e})})}),r},[e,t,n])}function U({artifact:e}){return(0,R.jsx)(`pre`,{className:`whitespace-pre-wrap break-words rounded-md border bg-muted p-4 text-sm`,children:typeof e.data==`string`?e.data:JSON.stringify(e.data,null,2)})}var W=({url:e})=>(0,R.jsxs)(`div`,{"data-testid":e,className:`prose dark:prose-invert mt-2`,children:[(0,R.jsx)(`img`,{"data-testid":`image-${e}`,src:e,alt:`artifact-image`,className:`w-full`}),(0,R.jsxs)(`p`,{className:`text-lg`,children:[`Image URL:`,` `,(0,R.jsx)(`a`,{className:`text-link hover:text-link-hover hover:underline`,target:`_blank`,href:e,rel:`noreferrer`,children:e})]})]}),G=({markdown:e})=>(0,R.jsx)(`div`,{"data-testid":`markdown-display`,className:`mt-4 prose dark:prose-invert`,children:(0,R.jsx)(F,{children:e})}),K=({progress:e})=>(0,R.jsxs)(`p`,{"data-testid":`progress-display`,className:`text-lg`,children:[`Progress: `,e,`%`]}),q=c(),J=({tableData:e})=>{let t=(0,L.useMemo)(()=>JSON.parse(e),[e]),n=(0,L.useMemo)(()=>Object.keys(t[0]??{}),[t]),[r,i]=(0,L.useState)(``),a=(0,L.useMemo)(()=>n.map(e=>q.display({id:e,header:()=>e,cell:({row:t})=>{let n=String(t.original[e]??``);return(0,R.jsx)(`span`,{className:`truncate block`,title:n,children:n})}})),[n]),s=d({data:(0,L.useMemo)(()=>r?t.filter(e=>Object.values(e).some(e=>String(e).toLowerCase().includes(r.toLowerCase()))):t,[r,t]),columns:a,getCoreRowModel:o(),getPaginationRowModel:u(),initialState:{pagination:{pageIndex:0,pageSize:10}}});return(0,R.jsxs)(`div`,{"data-testid":`table-display`,className:`mt-4`,children:[(0,R.jsx)(`div`,{className:`flex flex-row justify-end items-center mb-2`,children:(0,R.jsx)(_,{placeholder:`Search`,value:r,onChange:e=>i(e.target.value)})}),(0,R.jsx)(I,{table:s})]})},Y=({artifact:e})=>{let t=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-base font-semibold`,children:`Artifact`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Key`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.key??`None`})}),(0,R.jsx)(N,{label:`Type`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.type??`None`})}),(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{children:t??`None`})})]})]})},X=e(O(),1),Z=({flowRun:e})=>{let t=(0,L.useMemo)(()=>e.start_time?h(e.start_time,`dateTime`):null,[e.start_time]),n=(0,L.useMemo)(()=>e.estimated_run_time?(0,X.default)(Math.ceil(e.estimated_run_time)*1e3):null,[e.estimated_run_time]),r=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]),i=(0,L.useMemo)(()=>e.updated?h(e.updated,`dateTime`):null,[e.updated]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-lg font-bold`,children:`Flow Run`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Start time`,value:(0,R.jsxs)(`span`,{className:`font-mono flex items-center`,children:[(0,R.jsx)(f,{id:`Calendar`,className:`inline w-4 mr-2`}),t??`None`]})}),(0,R.jsx)(N,{label:`Duration`,value:(0,R.jsxs)(`span`,{className:`font-mono flex items-center`,children:[(0,R.jsx)(f,{id:`Clock`,className:`inline w-4 mr-2`}),n??`None`]})}),(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:r??`None`})}),(0,R.jsx)(N,{label:`Last Updated`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:i??`None`})}),(0,R.jsx)(N,{label:`Tags`,value:e.tags&&e.tags.length>0?(0,R.jsx)(`div`,{className:`flex flex-wrap`,children:e.tags.map(e=>(0,R.jsx)(v,{tag:e},e))}):(0,R.jsx)(`span`,{className:`font-mono`,children:`None`})}),(0,R.jsx)(N,{label:`State Message`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:e.state?.message??`None`})})]})]})},Q=({artifact:e})=>{let{flow_run:t,task_run:n}=e;return e.key||t||n?(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[e.key&&(0,R.jsx)(N,{label:`Artifact`,value:(0,R.jsx)(a,{to:`/artifacts/key/$key`,params:{key:e.key},className:`text-link hover:text-link-hover hover:underline`,children:e.key})}),t&&(0,R.jsx)(N,{label:`Flow Run`,value:(0,R.jsx)(a,{to:`/runs/flow-run/$id`,params:{id:t.id},className:`text-link hover:text-link-hover hover:underline`,children:t.name})}),n&&(0,R.jsx)(N,{label:`Task Run`,value:(0,R.jsx)(a,{to:`/runs/task-run/$id`,params:{id:n.id},className:`text-link hover:text-link-hover hover:underline`,children:n.name})}),(0,R.jsx)(`hr`,{className:`mt-2 border-border`})]}):null},$=({taskRun:e})=>{let t=(0,L.useMemo)(()=>e.created?h(e.created,`dateTime`):null,[e.created]),n=(0,L.useMemo)(()=>e.updated?h(e.updated,`dateTime`):null,[e.updated]);return(0,R.jsxs)(`div`,{className:`mt-4`,children:[(0,R.jsx)(`p`,{className:`text-lg font-bold`,children:`Task Run`}),(0,R.jsxs)(`div`,{className:`mt-3 flex flex-col gap-3`,children:[(0,R.jsx)(N,{label:`Created`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:t??`None`})}),(0,R.jsx)(N,{label:`Last Updated`,value:(0,R.jsx)(`span`,{className:`font-mono`,children:n??`None`})}),(0,R.jsx)(N,{label:`Tags`,value:e.tags&&e.tags.length>0?(0,R.jsx)(`div`,{className:`flex flex-wrap`,children:e.tags.map(e=>(0,R.jsx)(v,{tag:e},e))}):(0,R.jsx)(`span`,{className:`font-mono`,children:`None`})})]})]})},te=({artifact:e})=>{let{flow_run:t,task_run:n}=e;return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4 pt-4`,children:[(0,R.jsx)(Q,{artifact:e}),(0,R.jsx)(Y,{artifact:e}),(t||n)&&(0,R.jsx)(`hr`,{className:`mt-4 border-border`}),t&&(0,R.jsx)(Z,{flowRun:t}),t&&n&&(0,R.jsx)(`hr`,{className:`mt-4 border-border`}),n&&(0,R.jsx)($,{taskRun:n})]})},ne=({artifact:e})=>{let t=(0,L.useMemo)(()=>{switch(e.type){case`markdown`:case`link`:return(0,R.jsx)(G,{markdown:e.data});case`image`:return(0,R.jsx)(W,{url:e.data});case`progress`:return(0,R.jsx)(K,{progress:e.data});case`table`:return(0,R.jsx)(J,{tableData:e.data});default:return(0,R.jsx)(`pre`,{children:JSON.stringify(e.data,null,2)})}},[e]),n=(0,R.jsx)(te,{artifact:e});return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsx)(z,{artifact:e}),(0,R.jsxs)(`div`,{className:`flex flex-col lg:flex-row lg:gap-6`,children:[(0,R.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,R.jsx)(V,{artifact:e,artifactContent:t,detailsContent:n})}),(0,R.jsx)(C,{children:n})]})]})},re=function(){let{id:e}=A.useParams(),{data:t}=l(S(e));return(0,R.jsx)(ne,{artifact:P(e)??t})};export{re as component};
|
|
2
|
+
//# sourceMappingURL=artifact._id-B5o4IZAN.js.map
|