slimtoolkit / slim

Slim(toolkit): Don't change anything in your container image and minify it by up to 30x (and for compiled languages even more) making it secure too! (free and open source)
Apache License 2.0
18.89k stars 704 forks source link

Report exit code for the target containerized application if/when it crashes and when it exits #561

Open kcq opened 10 months ago

kcq commented 10 months ago

It's useful to know the exit code of the target application if the target app exited or crashed during the minification process. For many containerized apps it's an important signal that will indicate if the minified container image is good.

This feature is also related to the new app-exit continue-after mode allows the main application to observe the target application until it's done executing. The app-exit mode makes it easier to minify cli / non-server applications, so you don't have to use the timeout mode, which may not easy to guess for some apps.

utibeabasi6 commented 10 months ago

i can take a look at this if no one has already

kcq commented 10 months ago

@utibeabasi6 let me know if you need any pointers

utibeabasi6 commented 10 months ago

Hey this one seems a bit much😅 maybe I can try a simpler one to get familiar with the codebase

On Thu, 24 Aug 2023 at 22:23, Kyle Quest @.***> wrote:

@utibeabasi6 https://github.com/utibeabasi6 let me know if you need any pointers

— Reply to this email directly, view it on GitHub https://github.com/slimtoolkit/slim/issues/561#issuecomment-1692429469, or unsubscribe https://github.com/notifications/unsubscribe-auth/APYV2VWKFGDCTK64BA2K7DLXW7A4TANCNFSM6AAAAAA3UX6NBM . You are receiving this because you were mentioned.Message ID: @.***>

reetasingh commented 9 months ago

@kcq I am interested in working on this feature. Looking for additional pointers . Are we looking to implement the TBD here https://github.com/slimtoolkit/slim/blob/master/pkg/app/master/commands/profile/handler.go#L439?

kcq commented 9 months ago

@kcq I am interested in working on this feature. Looking for additional pointers . Are we looking to implement the TBD here https://github.com/slimtoolkit/slim/blob/master/pkg/app/master/commands/profile/handler.go#L439?

@reetasingh this is related, but it's something different... it's the placeholder for the "app exit" "continue after" mode. it's a WIP feature that's mostly done (a few things to wrap up there). yes, it will have the status code there, but in this case we want the status code regardless of the selected "continue after" mode. It's a tricky enhancement because it requires enhancing the main app and also the sensor to propagate the application exit status code through the related sensor events. Feel free to take on it, but at this point in time I won't have a lot of cycles to provide support, so you'd be on your own.