Skip to content

Commit

Permalink
Merge branch 'main' into update-docs-pr7
Browse files Browse the repository at this point in the history
  • Loading branch information
frances720 authored Nov 6, 2024
2 parents e587c89 + 103c925 commit 28c7497
Show file tree
Hide file tree
Showing 124 changed files with 29,866 additions and 388 deletions.
7 changes: 5 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
# documentation
/docs @discdiver @cicdw @desertaxle @zzstoatzz
# imports
/src/prefect/__init__.py @aaazzam @chrisguidry @cicdw @desertaxle @zzstoatzz
/src/prefect/main.py @aaazzam @chrisguidry @cicdw @desertaxle @zzstoatzz
/src/prefect/__init__.py @aaazzam @chrisguidry @cicdw @desertaxle @zzstoatzz
/src/prefect/main.py @aaazzam @chrisguidry @cicdw @desertaxle @zzstoatzz

# UI Replatform
/ui-v2 @aaazzam @cicdw @desertaxle @zzstoatzz
10 changes: 10 additions & 0 deletions .github/workflows/python-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ jobs:
echo "COVERAGE_FILE=${COVERAGE_FILE}" >> $GITHUB_ENV
echo "artifact_name=coverage-data-${sanitized_test_type}-${{ matrix.python-version }}-${sanitized_database}" >> $GITHUB_OUTPUT
- name: Set coverage core
if: ${{ matrix.python-version == '3.12' }}
run: |
echo "COVERAGE_CORE=sysmon" >> $GITHUB_ENV
- name: Run tests
run: |
echo "Using COVERAGE_FILE=$COVERAGE_FILE"
Expand Down Expand Up @@ -344,6 +349,11 @@ jobs:
echo "COVERAGE_FILE=${COVERAGE_FILE}" >> $GITHUB_ENV
echo "artifact_name=coverage-data-docker-${{ matrix.python-version }}-${sanitized_database}" >> $GITHUB_OUTPUT
- name: Set coverage core
if: ${{ matrix.python-version == '3.12' }}
run: |
echo "COVERAGE_CORE=sysmon" >> $GITHUB_ENV
- name: Run tests
run: |
echo "Using COVERAGE_FILE=$COVERAGE_FILE"
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/ui-v2-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: UI v2 Checks

on:
pull_request:
paths:
- .github/workflows/ui-v2-checks.yml
- ui-v2/**
- .nvmrc
push:
branches:
- main

permissions:
contents: read

# Limit concurrency by workflow/branch combination.
#
# For pull request builds, pushing additional changes to the
# branch will cancel prior in-progress and pending builds.
#
# For builds triggered on a branch push, additional changes
# will wait for prior builds to complete before starting.
#
# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build-ui:
name: Build ui
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache-dependency-path: "**/package-lock.json"

- name: Install UI dependencies
working-directory: ./ui-v2
run: npm ci install

- name: Check formatting
working-directory: ./ui-v2
run: npm run format:check

- name: Lint
working-directory: ./ui-v2
run: npm run lint

- name: Build UI
working-directory: ./ui-v2
run: npm run build
16 changes: 12 additions & 4 deletions docs/3.0/develop/settings-and-profiles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Specifically, settings enable:

- **Runtime Flexibility**: Quickly adjust things like retry attempts or logging levels without having to modify and redeploy your workflows.

## Getting Started with Settings
## Get started with settings

The simplest way declare settings is by creating a `prefect.toml` file in your project directory. For example:

Expand All @@ -23,12 +23,18 @@ The simplest way declare settings is by creating a `prefect.toml` file in your p
level = "DEBUG"
```

<Note>
To use `prefect.toml` or `pyproject.toml` for configuration, `prefect>=3.1` must be installed.

To use a `.env` file for configuration, `prefect>=3.0.5` must be installed.
</Note>

Most editors have plugins for TOML that provide syntax highlighting, linting, and autocomplete for `prefect.toml` files. If you use VSCode, we recommend the [Even Better TOML extension](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml).

<Tip>
**Writing TOML**

TOML is a simple configuration language that is easy to read and write. If you're new to TOML, you can learn more about the syntax in the [official documentation](https://toml.io/en/).
TOML is a simple configuration language. If you're new to TOML, learn more about the syntax in the [official documentation](https://toml.io/en/).

In particular, note that TOML uses square brackets to denote [tables](https://toml.io/en/v1.0.0#table), which are analogous to dictionaries in Python.
</Tip>
Expand All @@ -37,7 +43,7 @@ In particular, note that TOML uses square brackets to denote [tables](https://to

You can configure settings via the following sources (highest to lowest precedence):

- **Environment Variables**: Environment variables are useful for temporarily overriding settings or configuring the runtime environment of a single workflow run.
- **Environment variables**: Environment variables are useful for temporarily overriding settings or configuring the runtime environment of a single workflow run.

- **`.env` file**: `.env` files are useful for declaring local settings that you want to apply across multiple runs.

Expand Down Expand Up @@ -95,7 +101,7 @@ PREFECT_LOGGING_LEVEL="DEBUG"

Any flows run in the same directory as this `.env` file will use the `DEBUG` logging level, even if they are run in different shell sessions.

You can see supported environment variables for each setting in the [settings reference documentation](/3.0/develop/settings-ref).
View supported environment variables for each setting in the [settings reference documentation](/3.0/develop/settings-ref).

### `prefect.toml` file

Expand Down Expand Up @@ -136,6 +142,7 @@ Profiles are stored in a [TOML](https://toml.io/en/) file located at `~/.prefect
One and only one profile can be active at any time.

Immediately after installation, the `ephemeral` profile will be used, which only has 1 setting configured:

```bash
» docker run -it prefecthq/prefect:3-latest
___ ___ ___ ___ ___ ___ _____
Expand Down Expand Up @@ -168,6 +175,7 @@ The `prefect profile` CLI commands enable you to create, review, and manage prof
| `populate-defaults` | Populate your `profiles.toml` file with opinionated stock profiles. |
... or you may edit your `profiles.toml` file directly:
```bash
vim ~/.prefect/profiles.toml
```
Expand Down
62 changes: 27 additions & 35 deletions docs/3.0/develop/settings-ref.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: Settings reference
description: Reference for all available settings for Prefect.
---
{/* This page is generated by `scripts/generate_settings_ref.py`. Update the generation script to update this page. */}
<Note>To use `prefect.toml` or `pyproject.toml` for configuration, `prefect>=3.1` must be installed.</Note>
## Root Settings
### `home`
The path to the Prefect home directory. Defaults to ~/.prefect
Expand Down Expand Up @@ -53,7 +54,6 @@ If True, enables debug mode which may provide additional logging and debugging f
**TOML dotted key path**: `cli`

### `client`
Settings for for controlling API client behavior

**Type**: [ClientSettings](#clientsettings)

Expand Down Expand Up @@ -164,38 +164,6 @@ The URL of the Prefect UI. If not set, the client will attempt to infer it.
**Supported environment variables**:
`PREFECT_SILENCE_API_URL_MISCONFIGURATION`

### `experimental_warn`
If `True`, warn on usage of experimental features.

**Type**: `boolean`

**Default**: `True`

**TOML dotted key path**: `experimental_warn`

**Supported environment variables**:
`PREFECT_EXPERIMENTAL_WARN`

### `async_fetch_state_result`

Determines whether `State.result()` fetches results automatically or not.
In Prefect 2.6.0, the `State.result()` method was updated to be async
to facilitate automatic retrieval of results from storage which means when
writing async code you must `await` the call. For backwards compatibility,
the result is not retrieved by default for async users. You may opt into this
per call by passing `fetch=True` or toggle this setting to change the behavior
globally.


**Type**: `boolean`

**Default**: `False`

**TOML dotted key path**: `async_fetch_state_result`

**Supported environment variables**:
`PREFECT_ASYNC_FETCH_STATE_RESULT`

---
## APISettings
Settings for interacting with the Prefect API
Expand Down Expand Up @@ -224,7 +192,7 @@ The API key used for authentication with the Prefect API. Should be kept secret.
`PREFECT_API_KEY`

### `tls_insecure_skip_verify`
If `True`, disables SSL checking to allow insecure requests. This is recommended only during development, e.g. when using self-signed certificates.
If `True`, disables SSL checking to allow insecure requests. Setting to False is recommended only during development. For example, when using self-signed certificates.

**Type**: `boolean`

Expand Down Expand Up @@ -475,6 +443,18 @@ The default Docker namespace to use when building images.
---
## ExperimentsSettings
Settings for configuring experimental features
### `warn`
If `True`, warn on usage of experimental features.

**Type**: `boolean`

**Default**: `True`

**TOML dotted key path**: `experiments.warn`

**Supported environment variables**:
`PREFECT_EXPERIMENTS_WARN`, `PREFECT_EXPERIMENTAL_WARN`

### `worker_logging_to_api_enabled`
Enables the logging of worker logs to Prefect Cloud.

Expand Down Expand Up @@ -1363,7 +1343,7 @@ Which message broker implementation to use for the messaging system, should poin
`PREFECT_SERVER_EVENTS_MESSAGING_BROKER`, `PREFECT_MESSAGING_BROKER`

### `messaging_cache`
Which cache implementation to use for the events system. Should point to a module that exports a Cache class.
Which cache implementation to use for the events system. Should point to a module that exports a Cache class.

**Type**: `string`

Expand Down Expand Up @@ -2236,6 +2216,18 @@ This value sets the default retry delay seconds for all tasks.
**Supported environment variables**:
`PREFECT_TASKS_DEFAULT_RETRY_DELAY_SECONDS`, `PREFECT_TASK_DEFAULT_RETRY_DELAY_SECONDS`

### `default_persist_result`
If `True`, results will be persisted by default for all tasks. Set to `False` to disable persistence by default. Note that setting to `False` will override the behavior set by a parent flow or task.

**Type**: `boolean | None`

**Default**: `None`

**TOML dotted key path**: `tasks.default_persist_result`

**Supported environment variables**:
`PREFECT_TASKS_DEFAULT_PERSIST_RESULT`

### `runner`
Settings for controlling task runner behavior

Expand Down
3 changes: 1 addition & 2 deletions docs/3.0/manage/cloud/manage-users/manage-roles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ The following built-in roles have permissions within a given workspace in Prefec
| Viewer | - View flow runs within a workspace. <br /> - View deployments within a workspace. <br /> - View all work pools within a workspace. <br /> - View all blocks within a workspace. <br /> - View all automations within a workspace. <br /> - View workspace handle and description. |
| Runner | All Viewer abilities, _plus_: <br /> - Run deployments within a workspace. |
| Developer | All Runner abilities, _plus_: <br /> - Run flows within a workspace. <br /> - Delete flow runs within a workspace. <br /> - Create, edit, and delete deployments within a workspace. <br /> - Create, edit, and delete work pools within a workspace. <br /> - Create, edit, and delete all blocks and their secrets within a workspace. <br /> - Create, edit, and delete automations within a workspace. <br /> - View all workspace settings. |

| Owner | All Developer abilities, _plus_: <br /> - Add and remove account members, and set their role within a workspace. <br /> - Set the workspace's default workspace role for all users in the account. <br /> - Set, view, edit workspace settings. |
| Owner | All Developer abilities, _plus_: <br /> - Add and remove account members, and set their role within a workspace. <br /> - Set the workspace's default workspace role for all users in the account. <br /> - Set, view, edit workspace settings. |
| Worker | The minimum scopes required for a worker to poll for and submit work.|

## Custom workspace roles
Expand Down
Binary file added docs/images/prefect-dbt-summary-artifact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 28c7497

Please sign in to comment.