slimtoolkit / slimtoolkit/slim

Unable to utilize the creport.json file generated from slim profile command

Open
#721 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.4k
Forks
841
PR merge metrics
No merged PRs in 30d

Description

Expected Behavior

Use the creport.json generated from the slim profile command as an input for the slim build. Keep only the file paths from the creport.json file


Actual Behavior

creport.json file is not picked up from the arguments


Steps to Reproduce the Problem

  1. Perform image profiling using the slim profile command and generate artifacts in a local folder.
    Command: slim profile --target <target_image> --env-file <env_file_path> --copy-meta-artifacts profile_artifacts
  2. Number of file_paths in profile_artifacts/creport.json file = 44
  3. Use the build command with the required arguments to build a slim image.
    Command: slim build --image <target_image> --tag <slim_tag> --include-paths-creport-file profile_artifacts/creport.json --http-probe-off=true --copy-meta-artifacts build_artifacts --continue-after 5 --env-file <env_file>
  4. Number of file_paths in profile_artifacts/creport.json file = 5503
  5. size.original='961 MB' size.optimized='458 MB'
  6. Expected slim image size: < 20 MB can be achieved with http-probe enabled. However, as http probing was already done during profiling, I don't want to redo it.

Specifications

  • Version: slim version linux/amd64|Transformer|1.40.11|1b271555882eacdfb4e6598d6d0552e9b9b1449b|2024-02-02_01:36:22PM
  • Platform: linux x64

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the documented slim profile and slim build commands with profile_artifacts/creport.json, then inspect how --include-paths-creport-file is handled by the build command. Compare the paths consumed with those in the generated report; done means the report's file paths are used without repeating HTTP probing.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.