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

Create skeleton worker to run a build task #4185

Closed
5 tasks
Tracked by #3943
apburnes opened this issue Jul 11, 2023 · 6 comments
Closed
5 tasks
Tracked by #3943

Create skeleton worker to run a build task #4185

apburnes opened this issue Jul 11, 2023 · 6 comments
Assignees

Comments

@apburnes
Copy link
Contributor

apburnes commented Jul 11, 2023

Create a skeleton build task that runs from the pages worker, updates the build task queue, and saves an artifact.

Acceptance Criteria

  • Create a build task queue
  • Run build task when a site build starts
  • Run task from worker thread
  • Update tasks queue with new status
  • On task complete, save task artifact and complete tasks queue with finish status.
@drewbo
Copy link
Contributor

drewbo commented Sep 6, 2023

One question before we begin implementation on this: how does a build know which build task types to kick off? I think the one missing piece from the ADR is that the build table should also have a task_types column which is an array of build task types? The feels a little non-ideal (all of build, build_task, and build_task_type would have dependencies on one another) but we need to track which types of tasks to start, assuming that users have control over which tasks they want to opt-in to on each build

@apburnes
Copy link
Contributor Author

apburnes commented Sep 6, 2023

Great point! Maybe we add a site site_build_task table to manage all of the build tasks that run against the site where we can specify the build_task_type, when/what it runs on, etc. Or we change build_task_type table to better encompass the site, the configuration, and task_types.

@drewbo
Copy link
Contributor

drewbo commented Sep 6, 2023

I like the first option site_build_task and it should probably be branch specific. I definitely have the feeling that we're going to refactor this all in the future when we do a broader "configuration review" but I think this should work for an initial implementation:

erDiagram
    SITE_BUILD_TASK {
        int id PK
        int site FK "site"
        int build_task_type FK "build_task_type"
        string branch
        json metadata
    }
Loading

@apburnes
Copy link
Contributor Author

apburnes commented Sep 6, 2023

The table makes sense to me. branch would be nullable if we want the task to run on every build?

@drewbo
Copy link
Contributor

drewbo commented Sep 6, 2023

Yeah that works, I'm going to include the site_build_task table in #4245 before proceeding

@drewbo
Copy link
Contributor

drewbo commented Oct 5, 2023

Closed via #4248

@drewbo drewbo closed this as completed Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants