paketo-buildpacks / stacks

stacks
Apache License 2.0
35 stars 23 forks source link

Adds libexpat1 to support httpd in base builder (#147) #148

Closed TisVictress closed 2 years ago

TisVictress commented 2 years ago

Adds missing package to support the httpd buildpack

libexpat1 is added to both build and run for symmetry. The difference between the sizes of the build and run images after including libexpat1 is negligible: w/ libexpat1 w/o libexpat1
Run 88.996 MB 88.595 MB
Build 326.075 MB 326.101 MB
sophiewigmore commented 2 years ago

@TisVictress I recall @ryanmoran was saying the package is potentially needed at runtime only, but the dependency has been added to both build and run here for symmetry. There might be context I'm forgetting, what's the reason for upholding symmetry?

TisVictress commented 2 years ago

@TisVictress I recall @ryanmoran was saying the package is potentially needed at runtime only, but the dependency has been added to both build and run here for symmetry. There might be context I'm forgetting, what's the reason for upholding symmetry?

@sophiewigmore We chatted a bit about this yesterday after standup. The base builder test fails if its not in both places. In order for this to work without having to add it to build, we would need to update the httpd buildpack to add a run prefix to that specific mixin: ie mixins = ["run:libexpat1"]. So in the end it makes sense to leave it the way it is for symmetry.

sophiewigmore commented 2 years ago

@TisVictress to take it one step further, what's the rationale for not using the run: mixin? I'm just trying to understand why that wouldn't be ideal here

TisVictress commented 2 years ago

@TisVictress to take it one step further, what's the rationale for not using the run: mixin? I'm just trying to understand why that wouldn't be ideal here

@sophiewigmore That's a great question! I'm not sure; my assumption is it wouldn't be worth it in this case because libexpat1 doesn't greatly impact the size of the stack. Perhaps @ryanmoran can provide more context here.

ryanmoran commented 2 years ago

If we don't include libexpat1 in the build image, then running some httpd commands during the build phase could fail. Imagine a buildpack that ran the httpd -t -f /workspace/httpd.conf command during the build phase to validate the configuration file. This would fail unless we also included libexpat1 in the build image.

Additionally, we don't really have any instances of packages we include in the run image that are not also included in the build image. We treat the build packages as a superset of the run packages.

sophiewigmore commented 2 years ago

@ryanmoran @TisVictress thank you both for the clarification! I think the explanation makes sense, coupled with the tiny size increase of the build/run images, I'm good with this.