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

Updates platform spec to improve performance when restoring launch sboms from daemon #278

Merged
merged 1 commit into from
Jan 19, 2022

Conversation

natalieparellano
Copy link
Member

Fixes #276 (went with Option 1)

@natalieparellano natalieparellano requested a review from a team as a code owner December 15, 2021 17:09
…oms from daemon

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@hone hone added this to the Platform 0.9 milestone Dec 15, 2021
@hone hone requested a review from ekcasey January 12, 2022 19:13
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level
| `<previous-image>`| `CNB_PREVIOUS_IMAGE` | `<image>` | Image reference to be analyzed (usually the result of the previous build)
| `<run-image>` | `CNB_RUN_IMAGE` | resolved from `<stack>` | Run image reference
| `<skip-layers>` | `CNB_SKIP_LAYERS` | `false` | Do not restore SBOM layer from previous image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we split this across two phases?

  1. Restoring the sbom directory during analyze
  2. Copying sbom files to layers directories and then deleting sbom directory during restore

Wouldn't it be cleaner just to do everything during the restore phase so that the exact steps (restore, copy, delete) can be implementation details rather that specified behavior. Also, restorer already receives the skip-layers flag, so we would only need to add a single flag -launch-cache to the restore phase.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were torn between these two options (see #276 (comment)). Having restore do everything would require additional logic to provide the -daemon flag, mount in the daemon socket, and run as root.

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.

None yet

5 participants