From d680a31eadbf15a968c9af45c0b0155c229397a9 Mon Sep 17 00:00:00 2001 From: Chris White Date: Thu, 20 Jun 2024 10:18:31 -0700 Subject: [PATCH] React -> automate (#14185) --- .../add-schedules.mdx | 2 +- .../events/automations-triggers.mdx | 8 +++---- .../events/custom-triggers.mdx | 0 .../{react => automate}/events/events.mdx | 16 ++++++------- .../events/webhook-triggers.mdx | 6 ++--- docs/3.0rc/{react => automate}/incidents.mdx | 4 ++-- .../3.0rc/{react => automate}/state-hooks.mdx | 0 .../deploy/serve-flows/deploy-a-flow.mdx | 10 ++++---- docs/3.0rc/deploy/work-pools/control-runs.mdx | 2 +- .../deploy/work-pools/prefect-deploy.mdx | 2 +- .../develop/control-workflows/inputs.mdx | 2 +- docs/3.0rc/get-started/index.mdx | 6 ++--- docs/3.0rc/manage/cloud/index.mdx | 10 ++++---- docs/3.0rc/manage/self-host.mdx | 6 ++--- docs/mint.json | 24 +++++++------------ 15 files changed, 46 insertions(+), 52 deletions(-) rename docs/3.0rc/{deploy/serve-flows => automate}/add-schedules.mdx (99%) rename docs/3.0rc/{react => automate}/events/automations-triggers.mdx (98%) rename docs/3.0rc/{react => automate}/events/custom-triggers.mdx (100%) rename docs/3.0rc/{react => automate}/events/events.mdx (88%) rename docs/3.0rc/{react => automate}/events/webhook-triggers.mdx (97%) rename docs/3.0rc/{react => automate}/incidents.mdx (91%) rename docs/3.0rc/{react => automate}/state-hooks.mdx (100%) diff --git a/docs/3.0rc/deploy/serve-flows/add-schedules.mdx b/docs/3.0rc/automate/add-schedules.mdx similarity index 99% rename from docs/3.0rc/deploy/serve-flows/add-schedules.mdx rename to docs/3.0rc/automate/add-schedules.mdx index 044963a4a202..2f33a7285f7f 100644 --- a/docs/3.0rc/deploy/serve-flows/add-schedules.mdx +++ b/docs/3.0rc/automate/add-schedules.mdx @@ -5,7 +5,7 @@ description: Prefect can schedule when to automatically create new flow runs bas Prefect allows you to use schedules to automatically create new flow runs for deployments. -Prefect Cloud can schedule flow runs through event-driven [automations](/3.0rc/react/events/automations-triggers/). +Prefect Cloud can schedule flow runs through event-driven [automations](/3.0rc/automate/events/automations-triggers/). **Support for multiple schedules** diff --git a/docs/3.0rc/react/events/automations-triggers.mdx b/docs/3.0rc/automate/events/automations-triggers.mdx similarity index 98% rename from docs/3.0rc/react/events/automations-triggers.mdx rename to docs/3.0rc/automate/events/automations-triggers.mdx index 2e608a8d2a9f..706be6cb0d6a 100644 --- a/docs/3.0rc/react/events/automations-triggers.mdx +++ b/docs/3.0rc/automate/events/automations-triggers.mdx @@ -7,7 +7,7 @@ Automations are a Prefect Cloud feature that enable you to configure [actions](# [trigger](#triggers) conditions. Potential triggers include the occurrence of events from changes in a flow run's state—or the absence of such events. -You can even define your own custom trigger to fire based on an [event](/3.0rc/react/events/) created from a +You can even define your own custom trigger to fire based on an [event](/3.0rc/automate/events/) created from a webhook or a custom event defined in Python code. Actions include starting flow runs, pausing schedules, and sending custom notifications. @@ -152,7 +152,7 @@ creating automations that are linked to specific deployments to run them based o Trigger definitions for deployments are supported in `prefect.yaml`, `.serve`, and `.deploy`. At deployment time, specified trigger definitions create linked automations triggered by events matching your chosen -[grammar](/3.0rc/react/events/events/#event-grammar). Each trigger definition may include a [jinja template](https://en.wikipedia.org/wiki/Jinja_(template_engine)) +[grammar](/3.0rc/automate/events/events/#event-grammar). Each trigger definition may include a [jinja template](https://en.wikipedia.org/wiki/Jinja_(template_engine)) to render the triggering `event` as the `parameters` of your deployment's flow run. ### Define triggers in `prefect.yaml` @@ -846,6 +846,6 @@ deployments: ## See also -- To learn more about Prefect events, which can trigger automations, see the [events docs](/3.0rc/react/events/events/). -- See the [webhooks guide](/3.0rc/react/events/webhook-triggers/) +- To learn more about Prefect events, which can trigger automations, see the [events docs](/3.0rc/automate/events/events/). +- See the [webhooks guide](/3.0rc/automate/events/webhook-triggers/) to learn how to create webhooks and receive external events. \ No newline at end of file diff --git a/docs/3.0rc/react/events/custom-triggers.mdx b/docs/3.0rc/automate/events/custom-triggers.mdx similarity index 100% rename from docs/3.0rc/react/events/custom-triggers.mdx rename to docs/3.0rc/automate/events/custom-triggers.mdx diff --git a/docs/3.0rc/react/events/events.mdx b/docs/3.0rc/automate/events/events.mdx similarity index 88% rename from docs/3.0rc/react/events/events.mdx rename to docs/3.0rc/automate/events/events.mdx index c0bed9c4ab41..94f042e89742 100644 --- a/docs/3.0rc/react/events/events.mdx +++ b/docs/3.0rc/automate/events/events.mdx @@ -8,7 +8,7 @@ Events can represent API calls, state transitions, or changes in your execution Events power several features in Prefect Cloud, including flow run logs, audit logs, and automations. Events enable observability into your data stack through the [event feed in the UI](#events-in-the-cloud-ui) and the -configuration of Prefect's reactivity through [automations](/3.0rc/react/events/automations-triggers/). +configuration of Prefect's reactivity through [automations](/3.0rc/automate/events/automations-triggers/). ## Event specification @@ -67,14 +67,14 @@ To get data into an event for use in an automation action, specify a dictionary ### Emit events through webhooks -Prefect Cloud offers [programmable webhooks](/3.0rc/react/events/webhook-triggers/) to receive HTTP requests +Prefect Cloud offers [programmable webhooks](/3.0rc/automate/events/webhook-triggers/) to receive HTTP requests from other systems and translate them into events within your workspace. Webhooks can emit -[pre-defined static events](/3.0rc/react/events/webhook-triggers/#static-webhook-events), -dynamic events that [use portions of the incoming HTTP request](/3.0rc/react/events/webhook-triggers/#dynamic-webhook-events), -or events derived from [CloudEvents](/3.0rc/react/events/webhook-triggers/#accepting-cloudevents). +[pre-defined static events](/3.0rc/automate/events/webhook-triggers/#static-webhook-events), +dynamic events that [use portions of the incoming HTTP request](/3.0rc/automate/events/webhook-triggers/#dynamic-webhook-events), +or events derived from [CloudEvents](/3.0rc/automate/events/webhook-triggers/#accepting-cloudevents). Events emitted from any source appear in the event feed, where you can visualize activity in context and configure -[automations](/3.0rc/react/events/automations-triggers/) to react to the presence or absence of events in the future. +[automations](/3.0rc/automate/events/automations-triggers/) to react to the presence or absence of events in the future. ## Resources @@ -129,10 +129,10 @@ resource, related resources, and its payload. ## Respond to events -From an event page, you can configure an [automation](/3.0rc/react/events/automations-triggers) to trigger on +From an event page, you can configure an [automation](/3.0rc/automate/events/automations-triggers) to trigger on the observation of matching events—or a lack of matching events—by clicking the automate button in the overflow menu: ![Automation from event](/3.0rc/img/ui/automation-from-event.png) The default trigger configuration fires every time it sees an event with a matching resource identifier. Advanced -configuration is possible through [custom triggers](/3.0rc/react/events/automations-triggers/). +configuration is possible through [custom triggers](/3.0rc/automate/events/automations-triggers/). diff --git a/docs/3.0rc/react/events/webhook-triggers.mdx b/docs/3.0rc/automate/events/webhook-triggers.mdx similarity index 97% rename from docs/3.0rc/react/events/webhook-triggers.mdx rename to docs/3.0rc/automate/events/webhook-triggers.mdx index 246f2041f0de..75be05bc107b 100644 --- a/docs/3.0rc/react/events/webhook-triggers.mdx +++ b/docs/3.0rc/automate/events/webhook-triggers.mdx @@ -6,7 +6,7 @@ description: Observe and respond to events from other systems. Use webhooks in your Prefect Cloud workspace to receive, observe, and respond to events from other systems in your ecosystem. Each webhook exposes a unique URL endpoint to receive events from other systems and transforms them into Prefect -[events](/3.0rc/react/events/) for use in [automations](/3.0rc/react/events/automations-triggers/). +[events](/3.0rc/automate/events/) for use in [automations](/3.0rc/automate/events/automations-triggers/). Webhooks are defined by two essential components: a unique URL and a template that translates incoming web requests to a Prefect event. @@ -109,7 +109,7 @@ Prefect Cloud workspace. The template you define for each webhook determines how individual components of the incoming HTTP request become the event name and resource labels of the resulting Prefect event. -As with the [templates available in Prefect Cloud Automation](/3.0rc/react/events/automations-triggers) for +As with the [templates available in Prefect Cloud Automation](/3.0rc/automate/events/automations-triggers) for defining notifications and other parameters, you write templates in [Jinja2](https://jinja.palletsprojects.com/en/3.1.x/templates/). All of the built-in Jinja2 blocks and filters are available, as well as the filters from the @@ -321,7 +321,7 @@ way tailored to your use case, use a dynamic template to interpret the incoming The initial configuration of your webhook may require some trial and error as you get the sender and your receiving webhook speaking a compatible language. While you are in -this phase, lean upon the [event feed](/3.0rc/react/events/#event-feed) in the UI to see events as they happen. +this phase, lean upon the [event feed](/3.0rc/automate/events/#event-feed) in the UI to see events as they happen. When Prefect Cloud encounters an error during receipt of a webhook, it produces a `prefect-cloud.webhook.failed` event in your workspace. This event includes diff --git a/docs/3.0rc/react/incidents.mdx b/docs/3.0rc/automate/incidents.mdx similarity index 91% rename from docs/3.0rc/react/incidents.mdx rename to docs/3.0rc/automate/incidents.mdx index e559a69a1af2..f983527e7b89 100644 --- a/docs/3.0rc/react/incidents.mdx +++ b/docs/3.0rc/automate/incidents.mdx @@ -32,7 +32,7 @@ There are several ways to create an incident: * **From a flow run, work pool, or block**, from the failed flow run, click the menu button and select "Declare an incident". This method automatically links the resource. -* **Through an [automation](/3.0rc/react/events/automations-triggers/)**, set up incident creation as an automated response to selected triggers. +* **Through an [automation](/3.0rc/automate/events/automations-triggers/)**, set up incident creation as an automated response to selected triggers. ### Automate an incident @@ -63,7 +63,7 @@ To get started with incident automations, specify two fields in your trigger: - `prefect-cloud.incident.resolved` - `prefect-cloud.incident.updated.severity` -See [event triggers](/3.0rc/react/events/automations-triggers/#custom-triggers) for more information on custom triggers, and check out your event feed to see the event types emitted by your incidents and other resources (that is, the events that you can react to). +See [event triggers](/3.0rc/automate/events/automations-triggers/#custom-triggers) for more information on custom triggers, and check out your event feed to see the event types emitted by your incidents and other resources (that is, the events that you can react to). When an incident is declared, any actions you configure such as pausing work pools or sending notifications, execute immediately. diff --git a/docs/3.0rc/react/state-hooks.mdx b/docs/3.0rc/automate/state-hooks.mdx similarity index 100% rename from docs/3.0rc/react/state-hooks.mdx rename to docs/3.0rc/automate/state-hooks.mdx diff --git a/docs/3.0rc/deploy/serve-flows/deploy-a-flow.mdx b/docs/3.0rc/deploy/serve-flows/deploy-a-flow.mdx index cd5b42b9c2f7..a58e09768463 100644 --- a/docs/3.0rc/deploy/serve-flows/deploy-a-flow.mdx +++ b/docs/3.0rc/deploy/serve-flows/deploy-a-flow.mdx @@ -23,7 +23,7 @@ Attributes of a deployment include: - **Tags**: optional text labels for organizing deployments Some of the most common reasons to use an orchestration tool like Prefect are for -[scheduling](/3.0rc/deploy/serve-flows/add-schedules/) and [event-based triggering](/3.0rc/react/events/automations-triggers/). +[scheduling](/3.0rc/automate/add-schedules/) and [event-based triggering](/3.0rc/automate/events/automations-triggers/). As opposed to manually triggering and managing flow runs, deploying a flow exposes an API and UI that allow you to: @@ -97,7 +97,7 @@ The `serve` method on flows exposes many options for the deployment. For more in Here's how to use some of those options: - `cron`: a keyword that allows you to set a cron string schedule for the deployment; see -[schedules](/3.0rc/deploy/serve-flows/add-schedules/) for more advanced scheduling options +[schedules](/3.0rc/automate/add-schedules/) for more advanced scheduling options - `tags`: a keyword that allows you to tag this deployment and its runs for bookkeeping and filtering purposes - `description`: a keyword that allows you to document what this deployment does; by default the description is set from the docstring of the flow function (if documented) @@ -271,12 +271,12 @@ scheduled with different values through parameters. These are the fields to capture the required metadata for those actions: -- **`schedules`**: a list of [schedule objects](/3.0rc/deploy/serve-flows/add-schedules/). +- **`schedules`**: a list of [schedule objects](/3.0rc/automate/add-schedules/). Most of the convenient interfaces for creating deployments allow users to avoid creating this object themselves. -For example, when [updating a deployment schedule in the UI](/3.0rc/deploy/serve-flows/add-schedules/#creating-schedules-through-the-ui) +For example, when [updating a deployment schedule in the UI](/3.0rc/automate/add-schedules/#creating-schedules-through-the-ui) basic information such as a cron string or interval is all that's required. - **`trigger`** (Cloud-only): triggers allow you to define event-based rules for running a deployment. -For more information see [Automations](/3.0rc/react/events/automations-triggers/). +For more information see [Automations](/3.0rc/automate/events/automations-triggers/). - **`parameter_openapi_schema`**: an [OpenAPI compatible schema](https://swagger.io/specification/) that defines the types and defaults for the flow's parameters. This is used by the UI and the backend to expose options for creating manual runs as well as type validation. diff --git a/docs/3.0rc/deploy/work-pools/control-runs.mdx b/docs/3.0rc/deploy/work-pools/control-runs.mdx index a192b953289b..e513e5da1de4 100644 --- a/docs/3.0rc/deploy/work-pools/control-runs.mdx +++ b/docs/3.0rc/deploy/work-pools/control-runs.mdx @@ -965,7 +965,7 @@ Otherwise, you can pass `image="my-image:latest"` to `deploy`. ## Next steps The `cron` argument schedules the deployment to run at 1:00 AM every day. -See the [schedules](/3.0rc/deploy/serve-flows/add-schedules/) guide for more information on scheduling options. +See the [schedules](/3.0rc/automate/add-schedules/) guide for more information on scheduling options. See the [Push Work Pool guide](/3.0rc/deploy/dynamic-infra/push-runs-serverless/) for more details and example commands for each cloud provider. diff --git a/docs/3.0rc/deploy/work-pools/prefect-deploy.mdx b/docs/3.0rc/deploy/work-pools/prefect-deploy.mdx index 5a5e07ed6383..ac69242bd821 100644 --- a/docs/3.0rc/deploy/work-pools/prefect-deploy.mdx +++ b/docs/3.0rc/deploy/work-pools/prefect-deploy.mdx @@ -1182,7 +1182,7 @@ These are fields you can add to each deployment declaration. | `version` | An optional version for the deployment. | | `tags` | A list of strings to assign to the deployment as tags. | | `description` | An optional description for the deployment. | -| `schedule` | An optional [schedule](/3.0rc/deploy/serve-flows/add-schedules) to assign to the deployment. Fields for this section are documented in the [Schedule Fields](#schedule-fields) section. | +| `schedule` | An optional [schedule](/3.0rc/automate/add-schedules) to assign to the deployment. Fields for this section are documented in the [Schedule Fields](#schedule-fields) section. | | `triggers` | An optional array of [triggers](/3.0rc/deploy/serve-flows/#create-a-flow-run-with-an-event-trigger) to assign to the deployment | | `entrypoint` | Required path to the `.py` file containing the flow you want to deploy (relative to the root directory of your development folder) combined with the name of the flow function. In the format `path/to/file.py:flow_function_name`. | | `parameters` | Optional default values to provide for the parameters of the deployed flow. Should be an object with key/value pairs. | diff --git a/docs/3.0rc/develop/control-workflows/inputs.mdx b/docs/3.0rc/develop/control-workflows/inputs.mdx index 8f15f98362c5..5dff8600fcaf 100644 --- a/docs/3.0rc/develop/control-workflows/inputs.mdx +++ b/docs/3.0rc/develop/control-workflows/inputs.mdx @@ -313,7 +313,7 @@ def get_shirt_order(): This code causes the flow run to continually pause until the user enters a valid age. -As an additional step, you can use an [automation](/3.0rc/react/events/automations-triggers) or +As an additional step, you can use an [automation](/3.0rc/automate/events/automations-triggers) or [notification](/3.0rc/concepts/notifications/) to alert the user to the error. ## Send and receive input at runtime diff --git a/docs/3.0rc/get-started/index.mdx b/docs/3.0rc/get-started/index.mdx index 4eb93232e8da..05ad1d5f75fa 100644 --- a/docs/3.0rc/get-started/index.mdx +++ b/docs/3.0rc/get-started/index.mdx @@ -10,14 +10,14 @@ It's the easiest way to transform any Python function into a unit of work that c With Prefect you gain: -* [Scheduling](/3.0rc/deploy/serve-flows/add-schedules) +* [Scheduling](/3.0rc/automate/add-schedules) * [Retries](/3.0rc/develop/write-tasks/index#task-arguments) * [Logging](/3.0rc/develop/observe-workflows/logging/) * [Convenient async functionality](/3.0rc/develop/write-tasks/task-runners/#task-runners) * [Caching](/3.0rc/develop/write-tasks/index#caching) -* [Notifications](/3.0rc/react/events/automations-triggers/) +* [Notifications](/3.0rc/automate/events/automations-triggers/) * [Observability](/3.0rc/develop/observe-workflows/index/) -* [Event-based orchestration](/3.0rc/react/events/webhook-triggers) +* [Event-based orchestration](/3.0rc/automate/events/webhook-triggers) ![screenshot of Prefect Cloud dashboard](/3.0rc/img/ui/cloud-dashboard.png) diff --git a/docs/3.0rc/manage/cloud/index.mdx b/docs/3.0rc/manage/cloud/index.mdx index 113f2c13e230..a53397fd098f 100644 --- a/docs/3.0rc/manage/cloud/index.mdx +++ b/docs/3.0rc/manage/cloud/index.mdx @@ -47,17 +47,17 @@ A workspace is an isolated environment within Prefect Cloud for all Prefect acti - [Deployments](/3.0rc/deploy/serve-flows/) - [Work pools](/3.0rc/deploy/work-pools/control-runs/) - [Blocks](/3.0rc/develop/connect-third-party/) -- [Events](/3.0rc/react/events/) -- [Automations](/3.0rc/react/events/automations-triggers/) -- [Incidents](/3.0rc/react/events/events/) +- [Events](/3.0rc/automate/events/) +- [Automations](/3.0rc/automate/events/automations-triggers/) +- [Incidents](/3.0rc/automate/events/events/) See the [Workspaces](/3.0rc/manage/cloud/workspaces/) page for more information about configuring and using workspaces. ## Incidents -Prefect Cloud's [incidents](/3.0rc/react/events/events/) help teams identify, rectify, and document issues in mission-critical workflows. +Prefect Cloud's [incidents](/3.0rc/automate/events/events/) help teams identify, rectify, and document issues in mission-critical workflows. Incidents are formal declarations of disruptions to a workspace. -With [automations](/3.0rc/react/events/events/#incident-automations)), activity in that workspace can be paused when an incident is created and resumed when it is resolved. +With [automations](/3.0rc/automate/events/events/#incident-automations)), activity in that workspace can be paused when an incident is created and resumed when it is resolved. ## Error summaries diff --git a/docs/3.0rc/manage/self-host.mdx b/docs/3.0rc/manage/self-host.mdx index ef7a474e07dd..ce492e06495d 100644 --- a/docs/3.0rc/manage/self-host.mdx +++ b/docs/3.0rc/manage/self-host.mdx @@ -13,9 +13,9 @@ either [Prefect Cloud](/3.0rc/manage/cloud/) or a self-hosted Prefect server, ba Prefect Cloud and a self-hosted Prefect server instance share a common set of capabilities. Prefect Cloud has these additional features: - [Workspaces](/3.0rc/manage/cloud/workspaces/): isolated environments to organize your flows, deployments, and flow runs -- [Automations](/3.0rc/react/events/automations-triggers/): configure triggers, actions, and +- [Automations](/3.0rc/automate/events/automations-triggers/): configure triggers, actions, and notifications in response to real-time monitoring events -- [Email notifications](/3.0rc/react/events/automations-triggers/): send email alerts from Prefect's +- [Email notifications](/3.0rc/automate/events/automations-triggers/): send email alerts from Prefect's servers based on automation triggers - [Service accounts](/3.0rc/manage/cloud/manage-users/service-accounts/): configure API access for running workers or executing flow runs on remote infrastructure @@ -281,7 +281,7 @@ Prefect supports sending notifications through: **Notifications in Prefect Cloud** -Prefect Cloud uses the robust [Automations](/3.0rc/react/events/automations-triggers/) interface to +Prefect Cloud uses the robust [Automations](/3.0rc/automate/events/automations-triggers/) interface to enable notifications related to flow run state changes and work pool status. diff --git a/docs/mint.json b/docs/mint.json index 0f8032bee274..48368daa88c2 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -123,8 +123,7 @@ "version": "3.0rc", "pages": [ "3.0rc/deploy/serve-flows/deploy-a-flow", - "3.0rc/deploy/serve-flows/serve-a-flow", - "3.0rc/deploy/serve-flows/add-schedules" + "3.0rc/deploy/serve-flows/serve-a-flow" ] }, { @@ -152,21 +151,16 @@ ] }, { - "group": "React", + "group": "Automate", "version": "3.0rc", "pages": [ - { - "group": "Automate responses to events", - "version": "3.0rc", - "pages": [ - "3.0rc/react/events/events", - "3.0rc/react/events/automations-triggers", - "3.0rc/react/events/custom-triggers", - "3.0rc/react/events/webhook-triggers" - ] - }, - "3.0rc/react/state-hooks", - "3.0rc/react/incidents" + "3.0rc/automate/add-schedules", + "3.0rc/automate/events/events", + "3.0rc/automate/events/automations-triggers", + "3.0rc/automate/events/custom-triggers", + "3.0rc/automate/events/webhook-triggers", + "3.0rc/automate/state-hooks", + "3.0rc/automate/incidents" ] }, {