From afdb04d59741c68f4ce45967424c58064e50affc Mon Sep 17 00:00:00 2001 From: nate nowack Date: Tue, 16 Jul 2024 16:14:28 -0500 Subject: [PATCH 01/48] update docker image builds to publish `3-latest` images (#14633) --- .github/workflows/docker-images.yaml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-images.yaml b/.github/workflows/docker-images.yaml index a4c027843780..1fb2e45a46aa 100644 --- a/.github/workflows/docker-images.yaml +++ b/.github/workflows/docker-images.yaml @@ -23,8 +23,14 @@ on: - ".github/workflows/docker-images.yaml" - "ui/**" - # On workflow_dispatch, push sha and branch patterns to prefect-dev + # On workflow_dispatch, allow publishing 3-latest images workflow_dispatch: + inputs: + publish_3_latest: + description: 'Publish 3-latest images' + required: false + type: boolean + default: false jobs: publish-docker-images: @@ -97,17 +103,19 @@ jobs: - name: Generate tags for prefecthq/prefect id: metadata-prod uses: docker/metadata-action@v5 - # only generate the production tags on release events - if: ${{ github.event_name == 'release' }} + # generate the production tags on release events or when manually triggered for 3-latest + if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_3_latest == 'true') }} with: images: prefecthq/prefect # push `latest`, `X.Y` and `X` tags only when the release is not marked as prerelease # push `latest` and `X` tags only when the release is marked as latest + # push `3-latest` tags on latest release or manual trigger tags: | - type=pep440,pattern={{version}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }} - type=pep440,pattern={{major}}.{{minor}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event.release.prerelease == false }} - type=pep440,pattern={{major}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event.release.prerelease == false && github.ref_name == env.LATEST_TAG }} - type=raw,value=3-latest${{ matrix.flavor }},enable=${{ matrix.python-version == '3.10' && github.event.release.prerelease == false && github.ref_name == env.LATEST_TAG }} + type=pep440,pattern={{version}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event_name == 'release' }} + type=pep440,pattern={{major}}.{{minor}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event_name == 'release' && github.event.release.prerelease == false }} + type=pep440,pattern={{major}},suffix=-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event_name == 'release' && github.event.release.prerelease == false && github.ref_name == env.LATEST_TAG }} + type=raw,value=3-latest${{ matrix.flavor }},enable=${{ (github.event_name == 'release' && github.event.release.prerelease == false && github.ref_name == env.LATEST_TAG && matrix.python-version == '3.12') || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_3_latest == 'true') }} + type=raw,value=3-latest-python${{ matrix.python-version }}${{ matrix.flavor }},enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish_3_latest == 'true' }} flavor: | latest=false @@ -124,4 +132,4 @@ jobs: labels: ${{ steps.metadata-dev.outputs.labels }} push: true pull: true - provenance: false + provenance: false \ No newline at end of file From 8f0dded3a4fa7c867099107c292fb7e823768ad8 Mon Sep 17 00:00:00 2001 From: Jeff Hale Date: Wed, 17 Jul 2024 08:29:40 -0600 Subject: [PATCH 02/48] Check for spelling typos in docs as part of CI/CD (#14624) Co-authored-by: zzstoatzz --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 78008d2ea31c..25b376157637 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: rev: v2.2.6 hooks: - id: codespell - exclude: package-lock.json|_vendor/.*|docs/.* + exclude: package-lock.json|_vendor/.*|docs/styles/.* - repo: https://github.com/netromdk/vermin rev: v1.6.0 hooks: From d7e355c7c358913c1926cf01d68360d3c50b9732 Mon Sep 17 00:00:00 2001 From: Dylan Hughes Date: Wed, 17 Jul 2024 11:53:08 -0400 Subject: [PATCH 03/48] Enhancement: Duplicate Deployment Page (#14613) --- ui/src/pages/DeploymentDuplicate.vue | 56 ++++++++++++++++++++++++++++ ui/src/router/index.ts | 1 + 2 files changed, 57 insertions(+) create mode 100644 ui/src/pages/DeploymentDuplicate.vue diff --git a/ui/src/pages/DeploymentDuplicate.vue b/ui/src/pages/DeploymentDuplicate.vue new file mode 100644 index 000000000000..56ffe775dc05 --- /dev/null +++ b/ui/src/pages/DeploymentDuplicate.vue @@ -0,0 +1,56 @@ + + + + diff --git a/ui/src/router/index.ts b/ui/src/router/index.ts index 797ad2a21a41..564c56266f50 100644 --- a/ui/src/router/index.ts +++ b/ui/src/router/index.ts @@ -21,6 +21,7 @@ const workspaceRoutes = createWorkspaceRouteRecords({ flow: () => import('@/pages/Flow.vue'), deployments: () => import('@/pages/Deployments.vue'), deployment: () => import('@/pages/Deployment.vue'), + deploymentDuplicate: () => import('@/pages/DeploymentDuplicate.vue'), deploymentEdit: () => import('@/pages/DeploymentEdit.vue'), deploymentFlowRunCreate: () => import('@/pages/FlowRunCreate.vue'), blocks: () => import('@/pages/Blocks.vue'), From cc3071965b6601f5e5f038dfcf62c9cffb3b11d6 Mon Sep 17 00:00:00 2001 From: Nicholas Brown Date: Wed, 17 Jul 2024 13:00:01 -0400 Subject: [PATCH 04/48] Chore: Remove results tab from flow run page (#14649) --- ui/src/pages/FlowRun.vue | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ui/src/pages/FlowRun.vue b/ui/src/pages/FlowRun.vue index 99c83f6d7ccb..1f89f6498258 100644 --- a/ui/src/pages/FlowRun.vue +++ b/ui/src/pages/FlowRun.vue @@ -15,10 +15,6 @@ - - @@ -53,7 +49,6 @@ FlowRunDetails, FlowRunLogs, FlowRunTaskRuns, - FlowRunResults, FlowRunFilteredList, useFavicon, CopyableWrapper, @@ -88,7 +83,6 @@ { label: 'Logs' }, { label: 'Task Runs', hidden: isPending.value }, { label: 'Subflow Runs', hidden: isPending.value }, - { label: 'Results', hidden: isPending.value }, { label: 'Artifacts', hidden: isPending.value }, { label: 'Details' }, { label: 'Parameters' }, From fe0f1715d3f441920bef4fcd2d004b53e8b235ae Mon Sep 17 00:00:00 2001 From: Alexander Streed Date: Wed, 17 Jul 2024 13:05:28 -0500 Subject: [PATCH 05/48] Fix excessive memory usage in flows with many tasks (#14651) --- src/prefect/context.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/prefect/context.py b/src/prefect/context.py index a5fbc52b9c91..702a52428280 100644 --- a/src/prefect/context.py +++ b/src/prefect/context.py @@ -9,6 +9,7 @@ import os import sys import warnings +import weakref from contextlib import ExitStack, contextmanager from contextvars import ContextVar, Token from pathlib import Path @@ -17,6 +18,7 @@ Any, Dict, Generator, + Mapping, Optional, Set, Type, @@ -291,8 +293,12 @@ class EngineContext(RunContext): # Counter for flow pauses observed_flow_pauses: Dict[str, int] = Field(default_factory=dict) - # Tracking for result from task runs in this flow run - task_run_results: Dict[int, State] = Field(default_factory=dict) + # Tracking for result from task runs in this flow run for dependency tracking + # Holds the ID of the object returned by the task run and task run state + # This is a weakref dictionary to avoid undermining garbage collection + task_run_results: Mapping[int, State] = Field( + default_factory=weakref.WeakValueDictionary + ) # Events worker to emit events to Prefect Cloud events: Optional[EventsWorker] = None From ddb4a06bf19d1bda9b1b8bfaa8a393ff13081cf3 Mon Sep 17 00:00:00 2001 From: Collin Date: Wed, 17 Jul 2024 15:23:18 -0400 Subject: [PATCH 06/48] Tweak marketing banner language. (#14652) --- ui/src/pages/Dashboard.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/pages/Dashboard.vue b/ui/src/pages/Dashboard.vue index 7a08f8c7c5cb..5abb0658091c 100644 --- a/ui/src/pages/Dashboard.vue +++ b/ui/src/pages/Dashboard.vue @@ -29,7 +29,7 @@