From b72ce3aa041253994385a10d5c098ce2a739ea56 Mon Sep 17 00:00:00 2001 From: Ben Hearsum Date: Thu, 23 Jan 2025 09:29:05 -0500 Subject: [PATCH] chore: add migration guide for breaking change to get_ancestors --- docs/reference/migrations.rst | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/reference/migrations.rst b/docs/reference/migrations.rst index f19caee75..f3072038c 100644 --- a/docs/reference/migrations.rst +++ b/docs/reference/migrations.rst @@ -3,6 +3,28 @@ Migration Guide This page can help when migrating Taskgraph across major versions. +12.x -> 13.x +------------ + +* Invert any usage of the dict keys and values returned by `get_ancestors`: + + For example, if you were using: + + .. code-block:: python + + for label, taskid in get_ancestors(...): + ... + + Change it to: + + .. code-block:: python + + for taskid, label in get_ancestors(...): + ... + + Note that due to this change `get_ancestors` may return multiple tasks with + the same label now, which your code may need to deal with. + 11.x -> 12.x ------------