Proposal: Image Optimization & Recommendation Engine#282
Open
czifrushanna wants to merge 2 commits into
Open
Conversation
Signed-off-by: Hanna Czifrus <czifrus.hanna@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds a new design proposal describing a pluggable “recommendation engine” for Harbor that turns scan results and image metadata into actionable remediation and image-optimization guidance, modeled after Harbor’s existing scanner integration approach.
Changes:
- Introduces a proposal document outlining goals, non-goals, rationale, compatibility notes, and a high-level implementation plan.
- Describes a provider-based workflow that can rank relevant optimizations and optionally generate improved build instructions (e.g., Dockerfile).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+19
to
+28
| The proposal is to add a recommendation workflow that analyzes an image and returns an optimized version together with a human-readable explanation of the changes. | ||
|
|
||
| At a high level, the workflow would be: | ||
|
|
||
| 1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata. | ||
| 2. Harbor sends those inputs to a recommendation provider through a stable API. | ||
| 3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile. | ||
| 4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes. | ||
| 5. The user can review, edit, and choose the recommended result before generating the final image. | ||
|
|
Comment on lines
+24
to
+33
| 2. Harbor sends those inputs to a recommendation provider through a stable API. | ||
| 3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile. | ||
| 4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes. | ||
| 5. The user can review, edit, and choose the recommended result before generating the final image. | ||
|
|
||
| The recommendation provider would combine two steps internally: | ||
|
|
||
| 1. A lightweight ranking model determines which optimization tasks are relevant for the image. | ||
| 2. An LLM-based generation step, optionally augmented with retrieval, produces the recommended Dockerfile. | ||
|
|
| - General hardening and best-practice improvements | ||
|
|
||
| The engine should support future inputs such as runtime usage signals to make recommendations more precise over time. | ||
|
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+21
to
+27
| At a high level, the workflow would be: | ||
|
|
||
| 1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata. | ||
| 2. Harbor sends those inputs to a recommendation provider through a stable API. | ||
| 3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile. | ||
| 4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes. | ||
| 5. The user can review, edit, and choose the recommended result before generating the final image. |
Comment on lines
+19
to
+27
| The proposal is to add a recommendation workflow that analyzes an image and returns an optimized version together with a human-readable explanation of the changes. | ||
|
|
||
| At a high level, the workflow would be: | ||
|
|
||
| 1. Harbor collects the inputs needed for a recommendation, including the original image, scan findings, and relevant metadata. | ||
| 2. Harbor sends those inputs to a recommendation provider through a stable API. | ||
| 3. The provider reconstructs a near-equivalent Dockerfile, identifies recommended actions, and generates an improved Dockerfile. | ||
| 4. Harbor presents the original and recommended artifacts side by side, together with an explanation of the changes. | ||
| 5. The user can review, edit, and choose the recommended result before generating the final image. |
Comment on lines
+29
to
+33
| The recommendation provider would combine two steps internally: | ||
|
|
||
| 1. A lightweight ranking model determines which optimization tasks are relevant for the image. | ||
| 2. An LLM-based generation step, optionally augmented with retrieval, produces the recommended Dockerfile. | ||
|
|
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Hanna <73664424+czifrushanna@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.