Skip to content

Isolate Edge job state by task attempt UUID - #73918

Merged
ashb merged 1 commit into
mainfrom
edge-exeuctor-keyed-by-uuid
Oct 3, 2026
Merged

ashb merged 1 commit into
mainfrom
edge-exeuctor-keyed-by-uuid

Conversation

@ashb

@ashb ashb commented Sep 29, 2026

Copy link
Copy Markdown
Member

Edge workers previously reported job state through a coordinate-addressed (i.e. 4- or 5-tuple) API backed by a coordinate primary key. The compatibility shim-based UUID executor bookkeeping alone cannot stop a late report from completing a replacement job for the "same" task.

To fix it properly, we extend the job key with an attempt UUID (ti.id) and pass that identity from fetch to worker state reports. We preserve an empty discriminator for pre-upgrade jobs so old workers can finish those rows without touching newer attempts. Adoption reads the immutable UUID from the stored workload for legacy rows; resuming that same attempt reuses its row instead of creating a duplicate. Older supported airflow-core versions continue to schedule coordinate-keyed jobs.

The migration requires upgraded API servers before schedulers create UUID jobs. New jobs require workers advertising UUID support; older workers can finish legacy jobs. Refuse schema downgrade while duplicate coordinate keys would collapse distinct jobs, and retain buffered logs while a sibling job still uses their coordinate namespace.


Stack created with GitHub Stacks CLI • Give Feedback 💬

@ashb
ashb added this pull request to stack #73919 September 29, 2026 19:20
@boring-cyborg boring-cyborg Bot added area:providers kind:documentation provider:edge Edge Executor / Worker (AIP-69) / edge3 labels Sep 29, 2026
Comment thread providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py Outdated
Comment thread providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py Outdated
Comment thread providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py Outdated
Comment thread providers/edge3/tests/unit/edge3/migrations/test_task_instance_identity.py Outdated
Comment thread providers/edge3/tests/unit/edge3/models/test_db.py
Comment thread providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py Outdated
Comment thread providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
Comment thread providers/edge3/tests/unit/edge3/executors/test_edge_executor.py
Comment thread providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py Outdated
@ashb
ashb force-pushed the edge-exeuctor-keyed-by-uuid branch from 811fbe3 to e95969a Compare October 1, 2026 22:35
@ashb
ashb force-pushed the edge-exeuctor-keyed-by-uuid branch from e95969a to 69522b0 Compare October 2, 2026 11:30
Comment thread providers/edge3/newsfragments/73918.significant.rst Outdated
Comment thread providers/edge3/newsfragments/73918.significant.rst Outdated
Base automatically changed from provider-executors-keyed-by-uuid to main October 3, 2026 08:02
Edge workers report job state through a coordinate-addressed API backed
by a coordinate primary key. UUID executor bookkeeping alone cannot stop
a late report from completing a replacement job at the same coordinates.

Extend the job key with an attempt UUID and pass that identity from fetch
to worker state reports. Preserve an empty discriminator for pre-upgrade
jobs so old workers can finish those rows without touching newer attempts.
Adoption reads the immutable UUID from the stored workload for legacy rows;
resuming that same attempt reuses its row instead of creating a duplicate.
Older supported cores continue to schedule coordinate-keyed jobs.

The migration requires upgraded API servers before schedulers create UUID
jobs. New jobs require workers advertising UUID support; older workers can
finish legacy jobs. Refuse schema downgrade while duplicate coordinate
keys would collapse distinct jobs, and retain buffered logs while a sibling
job still uses their coordinate namespace. Log paths remain coordinate-based.
@ashb
ashb force-pushed the edge-exeuctor-keyed-by-uuid branch from 8e768d8 to afabb79 Compare October 3, 2026 08:16
@ashb
ashb merged commit 855a2ce into main Oct 3, 2026
86 checks passed
@ashb
ashb deleted the edge-exeuctor-keyed-by-uuid branch October 3, 2026 09:13
@FrankYang0529

Copy link
Copy Markdown
Member

The upgrade note that 8e768d8 added to the 5.0.0 section of providers/edge3/docs/changelog.rst is missing from afabb79. Do we need to add this back? Thanks.

Screenshot 2026-10-03 at 5 14 29 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers kind:documentation provider:edge Edge Executor / Worker (AIP-69) / edge3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants