Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the current Jobs object into Projects and Tasks. #128

Open
6 tasks
Tracked by #112
mojtaba-esk opened this issue Mar 27, 2025 · 0 comments
Open
6 tasks
Tracked by #112

Split the current Jobs object into Projects and Tasks. #128

mojtaba-esk opened this issue Mar 27, 2025 · 0 comments
Assignees
Labels
api API cleanup Clenaup stuffs
Milestone

Comments

@mojtaba-esk
Copy link
Contributor

mojtaba-esk commented Mar 27, 2025

🔧 Split Jobs Object into Projects and Tasks

Overview

In order to align with the new project management architecture, we need to split the current Jobs object into two distinct entities: Projects and Tasks. This is a foundational change that will enable a more granular and accurate representation of user workflows in Talis — such as long-running networks with multiple instance batches.

Background

Currently, the Jobs object represents both high-level and low-level actions. This has made it difficult to model the user-intended workflow cleanly. With the new model:

  • A Project represents a long-running environment like a testnet or persistent test.
  • A Task represents a discrete action within a project, such as provisioning or deleting instances and it is created automatically without direct user's intervention.

This separation improves traceability, auditability, and aligns with the desired API semantics.

Goals

  • Introduce a Project model to encapsulate a persistent testing environment.
  • Introduce a Task model to represent actions initiated by the user (e.g. provisioning instances).
  • Migrate existing Jobs data into this new structure (if needed).
  • Refactor any services, APIs, or DB code that currently relies on the old Jobs object.
  • Update the /jobs routes to /projects and implement new endpoints to access tasks under a project.
  • Ensure proper relationship is enforced between projects and tasks in the database (i.e. foreign keys or references).
  • Update task tracking logic to append tasks to the appropriate project.

Scope

  • Define and implement Project and Task DB models (replacing/augmenting Job)
  • Update ORM usage and DB migrations accordingly
  • Replace /jobs API routes with /projects and introduce nested /projects/:id/tasks
  • Update internal logic for creation and tracking of tasks when a project or instance is created
  • Update all relevant tests to use the new models (especially client_test.go)
  • Cleanup: remove deprecated Jobs references

References

@mojtaba-esk mojtaba-esk mentioned this issue Mar 27, 2025
13 tasks
@mojtaba-esk mojtaba-esk added api API cleanup Clenaup stuffs labels Mar 27, 2025
@mojtaba-esk mojtaba-esk added this to the Talis MVP milestone Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api API cleanup Clenaup stuffs
Projects
None yet
Development

No branches or pull requests

1 participant