gardenlinux / python-gardenlinux-lib

Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames
0 stars 0 forks source link

Implement status flag in oci-image that defines state (incomplete, complete) #28

Closed Vincinator closed 3 months ago

Vincinator commented 4 months ago

A manifest contains layers. The flow how we create a manifest per Garden Linux image flavour is described in gardenlinux/python-gardenlinux-lib#45 (see the diagram).

The manifest can be created consecutively. In the Garden Linux case it would make sense to have the following steps:

  1. build artifacts
  2. test log artifacts (unit tests)
  3. more test log artifacts (cloud platform tests)
  4. even more test log artifacts (gardener platform tests)
  5. arbitrary layers

This means that consecutive steps can attach blobs to a single manifest. Therefore, a manifest can be in different states depending on what additional layers are already available. States can be defined depending on the use case.

For Garden Linux OCI artifact images, we define the states like this:

Vincinator commented 3 months ago

Image state added to gl-oci tooling. In the task gardenlinux/gardenlinux#2441 we will take care of setting the states accordingly

Vincinator commented 3 months ago

Special case: overwrite an existing image with same tag (version-cname-arch), but different digest. Old manifest still exists, but must NOT be referenced by oci-index anymore. Additionally, old manifest must change state to "DEPRECATED".

Vincinator commented 3 months ago

Setting it to deprecated will create a new manifest with a new digest, while the old one still is available without the annotations.

So we need to figure out if we want to delete, or keep old manifests that are invalidated

Vincinator commented 3 months ago

last comment fixed with https://github.com/gardenlinux/gl-oci/commit/4d5084a38929bab6d60c5fddea144fc76f5166d4