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

add Dive CI Integration for checking WastedBytes #340

Open
ImreSamu opened this issue Feb 4, 2023 · 2 comments
Open

add Dive CI Integration for checking WastedBytes #340

ImreSamu opened this issue Feb 4, 2023 · 2 comments

Comments

@ImreSamu
Copy link
Member

ImreSamu commented Feb 4, 2023

See https://github.com/wagoodman/dive#ci-integration
Reason: #339 (comment) ( Alpine WastedBytes = 263 MB ! )

@ImreSamu ImreSamu changed the title add Dive CI Integration for checking WastedBytes ,,, add Dive CI Integration for checking WastedBytes Feb 4, 2023
@PiyushRaj927
Copy link

Hey @ImreSamu, I'm developing an open-source action that utilizes Dive for image analysis and size tracking in pull requests. I'd like to work on this issue to gain insight into the essential features I should include in my action. Could you please let me know your requirements so I can consider them while building it? Thanks!

Currently, my implementation comments the analysis details on the PR using workflow_run event.
Here's the format of the comment:

📊 bitnami Image Analysis (Commit: [commit] )

Summary

  • Total Size: 6.53GB
  • Efficiency: 97.4664 %
  • Wasted Bytes: 250584985 bytes (251 MB)
  • User Wasted Percent: 4.0065 %

Inefficient Files:

Count Wasted Space File Path
2 14 MB /opt/bitnami/postgresql/share/contrib/postgis-3.3/spatial_ref_sys.sql
2 9.3 MB /opt/bitnami/postgresql/lib/postgis-3.so
2 8.7 MB /usr/lib/x86_64-linux-gnu/perl/5.32.1/CORE/charclass_invlists.h
3 7.4 MB /usr/lib/x86_64-linux-gnu/libperl.so.5.32.1
2 6.7 MB /usr/lib/git-core/git
3 6.7 MB /usr/bin/git
2 5.5 MB /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Encode/JP/JP.so
2 5.0 MB /opt/bitnami/postgresql/lib/postgis_raster-3.so
2 4.8 MB /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Encode/KR/KR.so
2 4.2 MB /usr/lib/x86_64-linux-gnu/perl/5.32.1/auto/Encode/CN/CN.so

@ImreSamu
Copy link
Member Author

I'm developing an open-source action that utilizes Dive ....
... Could you please let me know your requirements
so I can consider them while building it? Thanks!
... Currently, my implementation comments the analysis details on the PR ...

Hi @PiyushRaj927,

Thank you for your interest. At the moment, my ideas for the ideal solution are still somewhat vague, but I'd like to highlight three main points:

1.)
It's important to note that currently we are creating 17 different Docker images, which is expected to increase by an additional 5 new bookworm images in the near future. Consequently, providing an individual comment for each of these 17+5 image analyses would be excessive.

Thus, it would be desirable to have a single consolidated analysis (comment) for the 17 images and, if possible, to arrange them into groups since we are working with three basic templates (Alpine, Debian, Master) and, therefore, the causes of some type errors are to be found here.

see the current jobs matrix : https://github.com/postgis/docker-postgis/blob/master/.github/workflows/main.yml

2.)
The 17 images are automatically regenerated every Monday morning, and due to upstream changes, problems (e.g., size increase due to an LLVM update) might only be detected at this point. In such cases, it would be good to receive a "warning".

3.)
It would be useful to distinguish between two causes of size increase:

a.) Size increase attributable to external system updates and upstream image issues (In our case, this could be detected by finding file names causing the size increase that contain ~ 'llvm|ssl|crypt' ) --> A "Warning" message would be ideal in this case.

b.) If the size increase is due to non-compliance with Docker image best practices, which typically includes everything not covered in the previous (3a) point --> In this case, the check should stop and signal the problem with an appropriate message.


It's important to note that these thoughts are my personal ideas, which may later be refined, modified, or changed. Moreover, these haven't been discussed yet with the other contributors at the repository level.

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

No branches or pull requests

2 participants