Skip to content

Commit

Permalink
Merge branch 'main' into sparse-checkout-for-git-pulls
Browse files Browse the repository at this point in the history
  • Loading branch information
tetracionist authored Nov 21, 2024
2 parents 066d387 + 567138f commit ac9a490
Show file tree
Hide file tree
Showing 760 changed files with 52,343 additions and 3,309 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ skip = .git,*.pdf,*.svg,versioneer.py,package-lock.json,_vendor,*.css,.codespell
# from https://github.com/PrefectHQ/prefect/pull/10813#issuecomment-1732676130
ignore-regex = .*lazy=\"selectin\"|.*e import Bloc$|America/Nome

ignore-words-list = selectin,aci,wqs,aks,ines,dependant,fsspec,automations,nmme
ignore-words-list = selectin,aci,wqs,aks,ines,dependant,fsspec,automations,nmme,afterall

check-hidden = true
7 changes: 5 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
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
1 change: 1 addition & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ changelog:
- title: Development & Tidiness 🧹
labels:
- development
- docs
- title: Uncategorized
labels:
- "*"
3 changes: 2 additions & 1 deletion .github/workflows/codspeed-benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ jobs:
- name: Install packages
run: |
python -m pip install -U uv
uv pip install --upgrade --system .[dev]
uv pip install --upgrade --system .[dev] pytest-codspeed
uv pip uninstall --system pytest-benchmark
- name: Start server
run: |
Expand Down
41 changes: 35 additions & 6 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# TODO: Replace `wait-for-server` with dedicated command
# https://github.com/PrefectHQ/prefect/issues/6990

name: Integration tests
on:
pull_request:
Expand Down Expand Up @@ -85,9 +88,6 @@ jobs:
./scripts/wait-for-server.py
# TODO: Replace `wait-for-server` with dedicated command
# https://github.com/PrefectHQ/prefect/issues/6990
- name: Start server
if: ${{ matrix.server-version.version == 'main' }}
env:
Expand All @@ -98,9 +98,6 @@ jobs:
./scripts/wait-for-server.py
# TODO: Replace `wait-for-server` with dedicated command
# https://github.com/PrefectHQ/prefect/issues/6990
- name: Run integration flows
env:
PREFECT_API_URL: http://127.0.0.1:4200/api
Expand All @@ -113,3 +110,35 @@ jobs:
run: |
cat server.log || echo "No logs available"
docker logs prefect-server || echo "No logs available"
sqlite-3-24-0:
name: Test SQLite 3.24.0 Compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Test with SQLite 3.24.0
run: >
docker build -t prefect-server-old-sqlite \
--build-arg SQLITE_VERSION=3240000 \
--build-arg SQLITE_YEAR=2018 \
-f old-sqlite.Dockerfile . &&
docker run prefect-server-old-sqlite sh -c "prefect server database downgrade --yes -r base && prefect server database upgrade --yes"
sqlite-3-31-1:
name: Test SQLite 3.31.1 Compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Test with SQLite 3.31.1
run: >
docker build -t prefect-server-new-sqlite \
--build-arg SQLITE_VERSION=3310100 \
--build-arg SQLITE_YEAR=2020 \
-f old-sqlite.Dockerfile . &&
docker run prefect-server-new-sqlite sh -c "prefect server database downgrade --yes -r base && prefect server database upgrade --yes"
15 changes: 0 additions & 15 deletions .github/workflows/issue-bot.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/markdown-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
python -m pip install -U uv
uv pip install --upgrade --system -e '.[dev]'
uv pip install --upgrade --system -r requirements-markdown-tests.txt
uv pip uninstall --system pytest-benchmark
- name: Start server
run: |
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,15 @@ jobs:
- name: Get latest tag
id: get_latest_tag
run: |
latest_tag=$(git tag -l | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+)?$' | grep -Ev 'rc|alpha|beta|post' | sort -V | tail -n1)
# Retrieve the latest tag by:
# 1. Listing all tags
# 2. Filtering for tags matching the pattern `[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+)?$`
# 3. Filtering out tags containing `rc`, `alpha`, `beta`, or `post`
# 4. Replacing `.dev` with `~dev` for sorting purposes
# 5. Sorting the tags in version order
# 6. Replacing `~dev` with `.dev`
# 7. Taking the last tag
latest_tag=$(git tag -l | grep -E '^[0-9]+\.[0-9]+\.[0-9]+(\.dev[0-9]+)?$' | grep -Ev 'rc|alpha|beta|post' | sed 's/\.dev/~dev/' | sort --version-sort | sed 's/~dev/.dev/' | tail -n1)
if [ -z "$latest_tag" ]; then
echo "No matching tags found."
exit 1
Expand Down
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
53 changes: 53 additions & 0 deletions .github/workflows/test-windows-unc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test Windows UNC Paths

on:
workflow_dispatch: # Allow manual triggering
pull_request:
paths:
- "src/prefect/utilities/filesystem.py"
- "scripts/test_unc_paths.py"
- ".github/workflows/test-windows-unc.yaml"
- "requirements.txt"
- "requirements-client.txt"

jobs:
test-unc-paths:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install -U pip
pip install -e .
- name: Create test UNC path and run flow
shell: pwsh
run: |
# Create a test directory
New-Item -ItemType Directory -Path "C:\ShareTest" -Force
# Create network share
New-SmbShare -Name "PrefectTest" -Path "C:\ShareTest" -FullAccess "Everyone"
# Run the test script from the current directory
# This will create and test flows in the UNC path
python scripts/test_unc_paths.py
env:
PYTHONPATH: ${{ github.workspace }}

- name: Cleanup
if: always()
shell: pwsh
run: |
Remove-SmbShare -Name "PrefectTest" -Force
60 changes: 60 additions & 0 deletions .github/workflows/ui-v2-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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

- name: Run tests
working-directory: ./ui-v2
run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dask-worker-space/
!ui/.vscode/

# Prefect files
prefect.toml
prefect.yaml

# Deployment recipes
Expand Down
28 changes: 28 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,31 @@ repos:
src/prefect/server/events/.*|
scripts/generate_mintlify_openapi_docs.py
)$
- repo: local
hooks:
- id: generate-settings-schema
name: Generating Settings Schema
language: system
entry: uv run --with 'pydantic>=2.9.0' ./scripts/generate_settings_schema.py
pass_filenames: false
files: |
(?x)^(
.pre-commit-config.yaml|
src/prefect/settings/models/.*|
scripts/generate_settings_schema.py
)$
- repo: local
hooks:
- id: generate-settings-ref
name: Generating Settings Reference
language: system
entry: uv run --with 'pydantic>=2.9.0' ./scripts/generate_settings_ref.py
pass_filenames: false
files: |
(?x)^(
.pre-commit-config.yaml|
src/prefect/settings/models/.*|
scripts/generate_settings_ref.py
)$
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
<br>
<a href="https://prefect.io/slack" alt="Slack">
<img src="https://img.shields.io/badge/slack-join_community-red.svg?color=0052FF&labelColor=090422&logo=slack" /></a>
<a href="https://discourse.prefect.io/" alt="Discourse">
<img src="https://img.shields.io/badge/discourse-browse_forum-red.svg?color=0052FF&labelColor=090422&logo=discourse" /></a>
<a href="https://www.youtube.com/c/PrefectIO/" alt="YouTube">
<img src="https://img.shields.io/badge/youtube-watch_videos-red.svg?color=0052FF&labelColor=090422&logo=youtube" /></a>
</p>
Expand Down
Loading

0 comments on commit ac9a490

Please sign in to comment.