Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4d52e1d
Python 3.13
johnewart Nov 21, 2025
80e1635
Replace str Enum mixin pattern with enum.StrEnum, minor other fixes f…
johnewart Dec 9, 2025
f93cbb2
Only build 3.13.x
johnewart Dec 9, 2025
03f9235
Minor updates
johnewart Dec 9, 2025
db127ef
Remove pandas dependency
johnewart Dec 9, 2025
1da1248
Linting
johnewart Dec 9, 2025
4259bcd
Merge branch 'main' into johnewart/python3.13
johnewart Dec 9, 2025
67e8141
Replace pandas CSV reader with built-in csv library in a few tests
johnewart Dec 9, 2025
4e45016
Cache the nox virtual environments
johnewart Dec 9, 2025
9dd5594
Cache container builds to GH actions cache if possible
johnewart Dec 10, 2025
0114c14
Fix pydantic function call
johnewart Dec 10, 2025
6a23cc2
Cache redis and postgres rather than pull them from dockerhub if poss…
johnewart Dec 10, 2025
cb32a67
Move uses to after checkout
johnewart Dec 10, 2025
44d4b32
Workflow tweak
johnewart Dec 10, 2025
75a7c26
Workflow tweak
johnewart Dec 10, 2025
ee7926a
Workflow tweak
johnewart Dec 10, 2025
5369aaa
Workflow tweak
johnewart Dec 10, 2025
6a55b7b
Workflow tweak
johnewart Dec 10, 2025
f741b4d
Some test failure fixes
johnewart Dec 10, 2025
272d405
parallel run fix
johnewart Dec 10, 2025
ecd1a0a
Fix pydantic create_model call
johnewart Dec 10, 2025
11f6e2b
Bump typer to fix a click issue
johnewart Dec 10, 2025
5e31d2e
Bump python version in other workflows
johnewart Dec 10, 2025
80dcfc5
reformat tests with black
johnewart Dec 10, 2025
259315f
Add nox caching to static checks
johnewart Dec 10, 2025
fd486d0
A few straggling enum string mixins
johnewart Dec 10, 2025
5afc0b8
Format noxfiles
johnewart Dec 10, 2025
c17b763
isort...
johnewart Dec 10, 2025
d4c2a4c
Fix a pydantic version in a test string
johnewart Dec 10, 2025
895c16d
Replace straggling str/Enum mixin and sets with lists that are used f…
johnewart Dec 10, 2025
b7cbfc6
Fix a few tests with AsyncClient taking app
johnewart Dec 10, 2025
3be84a5
Don't fail builds if Coverage doesn't upload
johnewart Dec 10, 2025
a1ffcb5
Minor test fixes
johnewart Dec 10, 2025
3f779d3
Fix some tests
johnewart Dec 10, 2025
e348c13
Don't use xdist for integration tests
johnewart Dec 10, 2025
b5f8e86
Fix import
johnewart Dec 10, 2025
c20852c
Fix noxfile
johnewart Dec 10, 2025
76455ea
Fix some Pydantic dynamic model creation in SaaS connection secrets
johnewart Dec 11, 2025
11f6b39
Pydantic fix
johnewart Dec 11, 2025
d322a86
Handle single value in dynamic model
johnewart Dec 11, 2025
e2c0165
Merge branch 'main' into johnewart/python3.13
johnewart Dec 11, 2025
e570f50
Merge branch 'main' into johnewart/python3.13
galvana Dec 11, 2025
6d8db09
Fixing fideslog dependency
galvana Dec 11, 2025
f3971ad
Fix pytest_nox method
johnewart Dec 11, 2025
2fab9ff
xfail only dsr2.0 tests
johnewart Dec 11, 2025
a6835f4
Updating docs Dockerfile
galvana Dec 11, 2025
07de19d
Fixing pytest_nox
galvana Dec 11, 2025
208fc5d
Fixing CLI tests
galvana Dec 11, 2025
e827e15
Fixing Pydantic schemas
galvana Dec 11, 2025
d8b25c1
Fixing DSR 2.0
galvana Dec 12, 2025
aa7c99e
Removing select DSR 2.0 tests
galvana Dec 12, 2025
588e206
Fixing flaky test
galvana Dec 12, 2025
e091e47
Updating test to use string keys instead of CollectionAddress objects
galvana Dec 12, 2025
1bb3a07
Re-up parallel workers
johnewart Dec 12, 2025
a45f867
Bump pylint, add pytest-loguru
johnewart Dec 12, 2025
a29499e
Fix test to not be timing sensitive
johnewart Dec 12, 2025
3c7355a
Remove unused variable
johnewart Dec 12, 2025
804db20
Suppress stdout capture and warnings from pytest itself to address th…
johnewart Dec 12, 2025
aea7007
Make static checks non-terminal for now
johnewart Dec 13, 2025
da699c1
XFail the docs test because our schema transmogrification code is bre…
johnewart Dec 13, 2025
5e9f4b6
Update CLI test to use database name based on worker id when using xdist
johnewart Dec 13, 2025
c962121
Update loguru
johnewart Dec 13, 2025
42d6954
Don't use xdist for ctl-not-external tests
johnewart Dec 13, 2025
5f5a4de
Xfail test_scan_dataset_db_input_connection_string for now
johnewart Dec 13, 2025
7807b0e
Fix flaky test and celery session worker to be resilient
johnewart Dec 13, 2025
b69519c
Downgrade click
johnewart Dec 13, 2025
a89735d
Update string enum mixin to StrEnum for PrivacyNoticeRegion
johnewart Dec 16, 2025
7a666e1
Merge branch 'main' into johnewart/python3.13
galvana Dec 17, 2025
79b6bba
Update fideslang version
johnewart Dec 18, 2025
84fffd3
Remove git dependency for fideslog
johnewart Dec 18, 2025
93254f4
Bump fideslang
johnewart Dec 18, 2025
29a8371
Allow publishing alpha tags to pypi
erosselli Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 119 additions & 25 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ on:
- "main"
- "release-**"

permissions:
checks: write
pull-requests: write

env:
IMAGE: ethyca/fides:local
DEFAULT_PYTHON_VERSION: "3.10.16"
DEFAULT_PYTHON_VERSION: "3.13.11"
# Docker auth with read-only permissions.
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_RO_TOKEN: ${{ secrets.DOCKER_RO_TOKEN }}
Expand Down Expand Up @@ -55,6 +59,7 @@ jobs:
Collect-Tests:
needs: Check-Backend-Changes
if: needs.Check-Backend-Changes.outputs.has_backend_changes == 'true'

runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -69,16 +74,20 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Run Static Check
run: nox -s collect_tests

Build:
needs: [Check-Backend-Changes, Collect-Tests]
if: needs.Check-Backend-Changes.outputs.has_backend_changes == 'true'
strategy:
matrix:
# NOTE: These are the currently supported/tested Python Versions
python_version: ["3.9.21", "3.10.16"]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -93,17 +102,19 @@ jobs:
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
build-args: PYTHON_VERSION=${{ matrix.python_version }}
build-args: PYTHON_VERSION=${{ env.DEFAULT_PYTHON_VERSION }}
target: prod
outputs: type=docker,dest=/tmp/python-${{ matrix.python_version }}.tar
outputs: type=docker,dest=/tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar
push: false
tags: ${{ env.IMAGE }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload container
uses: actions/upload-artifact@v4
with:
name: python-${{ matrix.python_version }}
path: /tmp/python-${{ matrix.python_version }}.tar
name: python-${{ env.DEFAULT_PYTHON_VERSION }}
path: /tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar
retention-days: 1

##################
Expand Down Expand Up @@ -142,6 +153,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -160,6 +179,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Pull Docker images in background
run: |
docker pull postgres:16 > /dev/null 2>&1 &
docker pull redis:8.0-alpine > /dev/null 2>&1 &
echo "Docker pull initiated in background."
shell: bash

- name: Download container
uses: actions/download-artifact@v4
with:
Expand All @@ -181,6 +207,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -227,6 +261,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -272,6 +314,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-qq

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -281,6 +331,12 @@ jobs:
- name: Run test suite
run: nox -s "${{ matrix.test_selection }}"

- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/test_report.xml'

################
## Safe Tests ##
################
Expand All @@ -290,7 +346,6 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ["3.9.21", "3.10.16"]
test_selection:
- "ctl-not-external"
- "ops-unit-api"
Expand All @@ -304,14 +359,21 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Pull Docker images in background
run: |
docker pull postgres:16 > /dev/null 2>&1 &
docker pull redis:8.0-alpine > /dev/null 2>&1 &
echo "Docker pull initiated in background."
shell: bash

- name: Download container
uses: actions/download-artifact@v4
with:
name: python-${{ matrix.python_version }}
name: python-${{ env.DEFAULT_PYTHON_VERSION }}
path: /tmp/

- name: Load image
run: docker load --input /tmp/python-${{ matrix.python_version }}.tar
run: docker load --input /tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -325,6 +387,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ matrix.test_selection }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-${{ matrix.test_selection }}

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand All @@ -334,11 +404,17 @@ jobs:
- name: Run test suite
run: nox -s "pytest(${{ matrix.test_selection }})"

- name: Publish Test Report
uses: mikepenz/action-junit-report@v5
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/test_report.xml'

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: false

##################
## Unsafe Tests ##
Expand All @@ -350,19 +426,17 @@ jobs:
if: needs.Check-Backend-Changes.outputs.has_backend_changes == 'true' && (contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') || github.event_name == 'push' || github.event_name == 'merge_group')
strategy:
max-parallel: 1 # This prevents collisions in shared external resources
matrix:
python_version: ["3.9.21", "3.10.16"]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Download container
uses: actions/download-artifact@v4
with:
name: python-${{ matrix.python_version }}
name: python-${{ env.DEFAULT_PYTHON_VERSION }}
path: /tmp/

- name: Load image
run: docker load --input /tmp/python-${{ matrix.python_version }}.tar
run: docker load --input /tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -376,6 +450,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -411,19 +493,17 @@ jobs:
if: needs.Check-Backend-Changes.outputs.has_backend_changes == 'true' && (contains(github.event.pull_request.labels.*.name, 'run unsafe ci checks') || github.event_name == 'push' || github.event_name == 'merge_group')
strategy:
max-parallel: 1 # This prevents collisions in shared external resources
matrix:
python_version: ["3.9.21", "3.10.16"]
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Download container
uses: actions/download-artifact@v4
with:
name: python-${{ matrix.python_version }}
name: python-${{ env.DEFAULT_PYTHON_VERSION }}
path: /tmp/

- name: Load image
run: docker load --input /tmp/python-${{ matrix.python_version }}.tar
run: docker load --input /tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -437,6 +517,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -520,17 +608,15 @@ jobs:
id-token: write
strategy:
max-parallel: 1 # This prevents collisions in shared external resources
matrix:
python_version: ["3.9.21", "3.10.16"]
steps:
- name: Download container
uses: actions/download-artifact@v4
with:
name: python-${{ matrix.python_version }}
name: python-${{ env.DEFAULT_PYTHON_VERSION }}
path: /tmp/

- name: Load image
run: docker load --input /tmp/python-${{ matrix.python_version }}.tar
run: docker load --input /tmp/python-${{ env.DEFAULT_PYTHON_VERSION }}.tar

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -544,6 +630,14 @@ jobs:
- name: Install Nox
run: pip install nox>=2022

- name: Cache Nox virtual environment
uses: actions/cache@v4
with:
path: .nox/
key: ${{ runner.os }}-nox-${{ github.job }}-${{ hashFiles('noxfile.py') }}-${{ hashFiles('noxfiles/**.py') }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-nox-${{ github.job }}-

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/cache_docker_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Cache sidecar container image
on:
workflow_call:
inputs:
image-name:
type: string
required: true
description: The name of the container image to cache
tag:
type: string
required: true
description: The tag of the container image to cache

jobs:
cache-image:
runs-on: ubuntu-latest
steps:
- name: Cache Docker images
uses: actions/cache@v4
with:
path: /tmp/docker-images # Path to store the tarball
key: docker-${{ runner.os }}-${{ inputs.image-name }}-${{ inputs.tag }}-${{ hashFiles('**/Dockerfile') }} # Key for the cache
- name: Pull and save image
run: |
docker pull ${{ inputs.image-name }}:${{ inputs.tag }}
docker save -o /tmp/docker-images/${{ inputs.image-name }}-${{ inputs.tag }}.tar ${{ inputs.image-name }}:${{ inputs.tag }}
if: steps.cache-image.outputs.cache-hit != 'true' # Only run if cache miss
- name: Load image from cache
run: docker load -i /tmp/docker-images/${{ inputs.image-name }}-${{ inputs.tag }}.tar
if: steps.cache-image.outputs.cache-hit == 'true' # Only run if cache hit
27 changes: 27 additions & 0 deletions .github/workflows/cache_redis_and_postgres_images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Cache Redis and Postgres container images
on:
workflow_call:
inputs:
redis-tag:
type: string
required: false
default: 8.0-alpine
description: The image tag to cache for Redis
postgres-tag:
type: string
required: false
default: 16
description: The image tag to cache for Postgres

jobs:
cache-images:
runs-on: ubuntu-latest
steps:
- uses: ./.github/workflows/cache_docker_image.yml
with:
image-name: postgres
tag: ${{ inputs.postgres-tag }}
- uses: ./.github/workflows/cache_docker_image.yml
with:
image-name: redis
tag: ${{ inputs.redis-tag }}
Loading
Loading