Skip to content

refactor(coordinator)!: name the plan step type Step - #651

Merged
karhu merged 4 commits into
tnet-157/3-copy-releasefrom
tnet-157/4-plan-steps
Nov 10, 2026
Merged

karhu merged 4 commits into
tnet-157/3-copy-releasefrom
tnet-157/4-plan-steps

Conversation

@karhu

@karhu karhu commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The Stack

This stack covers refactoring the internal logic of how releases are resolved during read, download & build, in particular also in the context of parent releases / parent datasets. On top of that it refactors the public TimeNet APIs and CLI interfaces around these actions, to streamline the behavior across them.

This PR

Renames ParentStep to Step, so that the parent planner and the coordinator use the same step type.

Details

This PR is mostly a cleanup. The parent planner already works with ParentStep objects, and the coordinator will use steps as well. This PR consolidates the two.

  • ParentStep becomes Step(release, action, depends_on, pinned_by).
  • The action "fetch" becomes "copy", the word that the copy function and the progress events use.
  • depends_on lists the releases of the plan that must be in place before the step runs. A dependency that the output already holds has no step, so it is not listed.

Design decisions

  • The list of steps is a graph, not a tree. A parent that two releases share appears once, and depends_on names every release that needs it.
  • Step gets more fields later in the stack (the entry that provides a release, a force flag, and a "read" action). All are additions.

Breaking changes

  • None.

Stack

Changes later in the stack: nothing in this PR.

Merge message

refactor(coordinator)!: name the plan step type Step

The parent planner returns Step objects with explicit dependencies, so
that the coordinator can use the same step type.

- depends_on lists the releases of the plan that must be in place
  first. A release that two others need appears once, so the steps
  form a graph.
- The action "fetch" becomes "copy", the word of the copy and its
  progress events.
- A ruff rule refuses imports of timenet_connectors in the timenet
  package, so that the SDK works without the connector package.

BREAKING CHANGE: ParentStep becomes Step, its reference field becomes
release, and its "fetch" action becomes "copy".

BREAKING CHANGE: depends_on is the new third field of a step, so
pinned_by moves to the fourth position.

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ CI checks passed

Check Status
Quick checks ✅ Passed
Tests (Python 3.13) ✅ Passed
Tests (Python 3.11) ✅ Passed

Updated for 32ee397 · run #8351

@TimoStoff TimoStoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action is now "copy", but the module still says "fetch" everywhere else: the fetch_from parameter, the fetched set on the graph, and a ton of docstrings that say "the plan fetches". fetch_from is also the CLI flag. Should we make that naming consistent?

@TimoStoff TimoStoff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! With some nits

@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from c045ec8 to aa45819 Compare November 6, 2026 07:54
@karhu
karhu removed this pull request from stack #650 November 6, 2026 08:09
@karhu
karhu added this pull request to stack #699 November 6, 2026 08:10
@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from aa45819 to ed48a5e Compare November 6, 2026 13:54
@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from ed48a5e to 35dd471 Compare November 7, 2026 15:23
@karhu karhu changed the title refactor(coordinator): name plan steps Step, with their dependencies refactor(coordinator)!: name the plan step type Step Nov 9, 2026

@RealLast RealLast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, accepting to unblock : ) We can clean up later

@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from 35dd471 to b11d54f Compare November 10, 2026 14:39

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review completed

Nothing new to post: everything this review found is already covered by existing comments on this pull request or didn't merit a separate one.

@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from b11d54f to 0ed1f41 Compare November 10, 2026 15:50

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review completed

Nothing new to post: everything this review found is already covered by existing comments on this pull request or didn't merit a separate one.

@karhu
karhu removed this pull request from stack #699 November 10, 2026 15:58
@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from 0ed1f41 to 4cbfda2 Compare November 10, 2026 16:24
@karhu
karhu added this pull request to stack #772 November 10, 2026 16:24

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review completed

Nothing new to post: everything this review found is already covered by existing comments on this pull request or didn't merit a separate one.

The planner now calls its step type Step. It also adds a Plan type that holds the steps.

A step has a release field instead of reference. The action "fetch" is now "copy". Each step lists
in depends_on the releases of the plan that must be in place before it runs.

Part of TNET-157.
Say only what a caller of the plan steps needs to know.

Part of TNET-157.
…ports

No code on this branch returns a Plan, so the type goes away until the
build coordinator returns one.

A ruff rule (banned-api) now refuses an import of timenet_connectors in
the code of the timenet package. So the subprocess test that the
planner imports nothing from timenet_connectors goes away. The test of
the Plan and Step dataclasses and a test that repeated a case of the
parametrized plan test go away too.

The error for a registry source with an output that is not local now
says "copying parents from a registry", the term of the plan steps.

Part of TNET-157.
Shorter docstrings for the code that this change adds or changes.

Part of TNET-157.
@karhu
karhu force-pushed the tnet-157/4-plan-steps branch from 4cbfda2 to 32ee397 Compare November 10, 2026 17:41
@karhu
karhu merged commit b8f92a3 into main Nov 10, 2026
4 of 8 checks passed
@karhu
karhu deleted the tnet-157/4-plan-steps branch November 10, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants