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
Use the 'artifacts' abstraction for all volumes #3607
Comments
For now our thoughts are revolving around keeping worker_artifacts without any managed states, and leaving the 'Creating' and 'Created' states in the volume. We can just leave around artifacts that are not attached to volumes until the 12 hr mark is completed. Artifacts are owned by builds and containers so we can on delete cascade once the container gets deleted. The difference from the current implementation is that we do not require a creating container to create an artifact in the new flow, which means that artifacts and volumes can be created before db containers. |
Artifact lifecycle flow:
|
Quick update: So far, our work has been to expand the
Currently we need to choose a worker in We wanted to remove this decoupling by having steps create non-worker-dependent artifacts. However, if an artifact is meant to govern the volume lifecycle, we need to use the concepts of
To overcome this, we are narrowing the definition of "artifact" to only encompass "storage types that Core concepts care about". This means that container-specific volumes such as scratch volumes (and maybe COW volumes) will not have artifacts associated to them. There will still be a containerID field in the volumes table to account for garbage collection of these volumes. Doing this allows us to create all volumes that exist beyond the container lifecycle before container creation, while still creating "temporary" container-specific volumes during container creation. There were some other concerns that we were hoping to address with this story, e.g. a "runtime" interface to abstract away the actual execution of steps, which will be put on hold for another story. |
After some discussion with the team, we have decided to only implement This removes the need for us to have knowledge of the type of information stored in the artifact and the information's associated lifecycle. |
In the core logic, all caches, inputs, outputs etc will have an artifact associated with them. Because artifacts are the storage "interface" between runtime and core, they should not depend on a particular worker (Core doesn't care about workers). Volumes should be owned by "artifacts", which are a worker-independent storage abstraction. This leads to a few changes in our storage model:
|
We are currently working on #3810 which will enable using artifacts. |
As part of #3424 , in order to create ephemeral containers directly in Garden that are not tracked by the ATC, we need to have a way to create persistent volumes (for the Garden container images) that are not owned by any db containers.
Currently, this is not possible because of the following lines:
concourse/atc/worker/image/image.go
Lines 136 to 140 in cdf9656
Creating an image requires a container ID for GC purposes. Creating a resource cache also requires a container as its
ContainerOwner
.We had previously discussed extending the
Artifacts
abstraction to encompass all types of volumes. Then, theArtifact
would deal with GC logic etc, making it easier to create and manage new 'types' of volumes. We already introducedworker_artifacts
for #3307.This spike is to investigate whether extending this
artifacts
abstraction makes it easier to create image volumes for #3424, and to flesh out what it would look like.The text was updated successfully, but these errors were encountered: