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

docs: add documentation for dependabot and copa #801

Merged
merged 10 commits into from
Oct 10, 2024

Conversation

ashnamehrotra
Copy link
Contributor

@ashnamehrotra ashnamehrotra commented Oct 7, 2024

Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...

Closes #795 #788

@@ -66,3 +66,14 @@ export EXPERIMENTAL_BUILDKIT_SOURCE_POLICY=source-policy.json
> The tooling image for Debian-based images can be `docker.io/library/debian:11-slim` or `docker.io/library/debian:12-slim` depending on the target image version. RPM-based repos use `mcr.microsoft.com/cbl-mariner/base/core:2.0`.

For more information on source policies, see [Buildkit Source Policies](https://docs.docker.com/build/building/env-vars/#experimental_buildkit_source_policy).

## Can I use Dependabot with Copa patched images?
Copy link
Member

Choose a reason for hiding this comment

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

nit: can we add this to the best practices doc, and link from faq to there

- If patched at build time, Dependabot should pick up the revision of the patch version (`1.2.3-2` -> `1.2.4` -> `1.2.4-1`) to minimize regressions.

## Does Copa cause a buildup of patched layers on each patch?
No. To prevent a buildup of layers, Copa discards the previous patch layer with each new patch. Each subsequent patch removes the earlier patch layer and creates a new one, which includes all patches applied since the original base image Copa started with. Essentially, Copa is creating a new layer with the latest patch, based on the base/original image. This new layer is a combination (or squash) of both the previous updates and the new updates requested.
Copy link
Member

@sozercan sozercan Oct 8, 2024

Choose a reason for hiding this comment

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

does this help size wise since we are not keeping older patch layers? if so, can we mention that too?

This method makes it easy to continually consume the latest patched version of an image, but does contain some tradeoffs. First is that without pinning, image digests could change causing unpredictable behavior. Secondly, if an `ImagePullPolicy` is set to `IfNotPresent`, newly patched images would not be pulled since the tag hasn't changed.

### Dependabot
Copy link
Member

@sozercan sozercan Oct 9, 2024

Choose a reason for hiding this comment

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

can we need to add the changes in this file to versioned docs (0.8 is fine) too?

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

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

minor comment to add to versioned docs, otherwise lgtm

@ashnamehrotra ashnamehrotra merged commit 2315670 into project-copacetic:main Oct 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[DOC] document dependabot flow
2 participants