Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
115 changes: 115 additions & 0 deletions .github/workflows/architecture-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: Architecture GitHub Pages

on:
push:
branches: [dev]
paths:
- "workers/**"
- "runtimes/**"
- "eng/docs/**"
- "docs/site/**"
- ".github/workflows/architecture-pages.yml"
pull_request:
branches: [dev]
paths:
- "workers/**"
- "runtimes/**"
- "eng/docs/**"
- "docs/site/**"
- ".github/workflows/architecture-pages.yml"
repository_dispatch:
types: [sibling-repo-updated]
schedule:
# Daily cross-repo sync with python-library, python-extensions, and language-worker-protobuf
- cron: "0 8 * * *"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: "pages-architecture-${{ github.ref }}"
cancel-in-progress: true

jobs:
build:
name: Build & Validate Architecture Site
runs-on: ubuntu-latest
steps:
- name: Checkout python-worker
uses: actions/checkout@v4

- name: Checkout azure-functions-host (gRPC channel metadata)
uses: actions/checkout@v4
with:
repository: Azure/azure-functions-host
path: _sibling_repos/functions-host
depth: 1
sparse-checkout: src/WebJobs.Script.Grpc

- name: Checkout azure-functions-python-library
uses: actions/checkout@v4
with:
repository: Azure/azure-functions-python-library
path: _sibling_repos/python-library
depth: 1

- name: Checkout azure-functions-python-extensions
uses: actions/checkout@v4
with:
repository: Azure/azure-functions-python-extensions
path: _sibling_repos/python-extensions
depth: 1

- name: Checkout azure-functions-language-worker-protobuf
uses: actions/checkout@v4
with:
repository: Azure/azure-functions-language-worker-protobuf
path: _sibling_repos/language-worker-protobuf
depth: 1

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

- name: Run architecture extractor unit tests
run: python3 -m unittest discover -s eng/docs/tests -v

- name: Extract multi-repo architecture graph
run: python3 eng/docs/extract_arch.py --sibling-root _sibling_repos

- name: Upload preview artifact
uses: actions/upload-artifact@v4
with:
name: architecture-site
path: ./docs/site
include-hidden-files: true

- name: Upload GitHub Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/site

deploy:
name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure Pages
uses: actions/configure-pages@v5
with:
enablement: true
continue-on-error: true

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,8 @@ tests/**/extensions.csproj
__blobstorage__/*
__queuestorage__/*
__azurite*

# Generated architecture site artifacts
docs/site/assets/architecture-graph.json
docs/site/assets/architecture-data.js
_sibling_repos/
Empty file added docs/site/.nojekyll
Empty file.
25 changes: 25 additions & 0 deletions docs/site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Azure Functions Python Runtime — Architecture Atlas (`docs/site`)

Interactive GitHub Pages site documenting the Azure Functions Python runtime architecture across:

- **5 Linked Repositories**:
- [`Azure/azure-functions-host`](https://github.com/Azure/azure-functions-host) (.NET Script Host runtime)
- [`Azure/azure-functions-language-worker-protobuf`](https://github.com/Azure/azure-functions-language-worker-protobuf) (Host ↔ Worker `.proto` contract)
- [`Azure/azure-functions-python-worker`](https://github.com/Azure/azure-functions-python-worker) (Worker shells + V1/V2 runtimes)
- [`Azure/azure-functions-python-library`](https://github.com/Azure/azure-functions-python-library) (`azure-functions` SDK)
- [`Azure/azure-functions-python-extensions`](https://github.com/Azure/azure-functions-python-extensions) (HTTP v2, `SdkType` bindings, Agent runtimes)
- **3 Worker Generations**: Python `≤ 3.12` (`workers/azure_functions_worker`), Python `3.13–3.14` (`workers/proxy_worker` + `runtimes/`), and Python `3.15+` (`workers/r2p2` + `PyO3` + `runtimes/`).
- **7 Lifecycle Phases per Generation**: Worker Init, Specialization (Consumption), Metadata & Indexing, Functions Load (V1), Invocation, Worker Status, and Worker Logs (`RpcLog`).

## Local Preview

```bash
python3 eng/docs/extract_arch.py
python3 -m http.server 8765 --bind 127.0.0.1 --directory docs/site
```

Then open `http://127.0.0.1:8765/`.

## GitHub Pages Setup

`.github/workflows/architecture-pages.yml` builds and validates the site on pull requests and deploys to `https://azure.github.io/azure-functions-python-worker/` on `dev`. Ensure **Settings → Pages → Build and deployment → Source** is set to **GitHub Actions**.
Loading
Loading