8000 feat(pausedtask): define repository interface and in-memory fake by andrzejfudro · Pull Request #857 · google/xmc · GitHub
[go: up one dir, main page]

Skip to content

feat(pausedtask): define repository interface and in-memory fake - #857

Merged
andrzejfudro merged 2 commits into
mainfrom
feat/paused-tasks-repository
Sep 14, 2026
Merged

andrzejfudro merged 2 commits into
mainfrom
feat/paused-tasks-repository

Conversation

@andrzejfudro
@andrzejfudro andrzejfudro commented Sep 11, 2026 •
Copy link
Copy Markdown
Collaborator

Adding a mocked repository for Paused Tasks. It is not called by anything yet but I add it to prepare ground for a few tasks that will use this repository - adding it now allows me to parallelize work without conflicts. I plan to defer adding real spanner integration to this repository to the last possible moment.

@gemini-code-assist gemini-code-assist 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

This pull request introduces a new pausedtask package under internal/storage/spanner to manage and persist tasks intercepted during a scheduling pause. It includes the definition of the Repository interface, the PausedTask entity, an in-memory Fake implementation for testing, and comprehensive unit tests. Additionally, a new SCHEDULING_PAUSED status has been added to the WorkUnitStatus proto. Feedback is provided regarding a potential issue in fake.go where taking the address of a loop-local variable could lead to bugs, with a suggestion to allocate the timestamp on the heap instead.

@andrzejfudro
andrzejfudro force-pushed the feat/paused-tasks-repository branch 2 times, most recently from a98575c to 510c6fe Compare September 11, 2026 13:51
Introduce the pausedtask.Repository interface and in-memory Fake test double.

This unblocks task buffering during scheduling pause in Actuator
and subsequent resumption replay workflows in ESS.

TAG=agy
CONV=ced76f25-77b3-448a-8da6-a1b9c94246b6
@andrzejfudro
andrzejfudro force-pushed the feat/paused-tasks-repository branch from 510c6fe to 1b96aeb Compare September 11, 2026 14:05
@andrzejfudro
andrzejfudro marked this pull request as ready for review September 11, 2026 14:08
janzak-dev
janzak-dev previously approved these changes Sep 14, 2026
Removes the unused List method from the Repository interface and retains
it strictly on *Fake as an in-memory inspection helper for tests.

TAG=agy
CONV=ced76f25-77b3-448a-8da6-a1b9c94246b6
@andrzejfudro
andrzejfudro added this pull request to the merge queue Sep 14, 2026
Merged via the queue into main with commit f12c120 Sep 14, 2026
11 checks passed
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.

2 participants

0