acorn-io / runtime

A simple application deployment framework built on Kubernetes
https://docs.acorn.io/
Apache License 2.0
1.13k stars 100 forks source link

fix: resolved offerings: calculate if a container is missing #2480

Closed g-linville closed 7 months ago

g-linville commented 7 months ago

We saw cases (involving nested acorns) where resolved offerings would have containers missing from the list entirely. I think this was due to weird behavior where the .Status.AppStatus.Containers would not be populated on a nested acorn the first time it ran through the resolved offerings handler. To make sure that everything ultimately gets resolved, I added this new needsCalculation function that checks to make sure that every container defined in the app is also present in the resolved offerings.

Checklist

g-linville commented 7 months ago

Sorry @thedadams and @StrongMonkey. I just requested your re-review. While working on other stuff, I figured out the real problem with container.Name. Sometimes it just wasn't set at all for whatever reason. So I changed up the function that creates the resolved offerings annotation to just take the name of the container as a string, and I pass it all the way down to there.