acorn-io / runtime

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

fix: credential secrets: avoid the race condition better (#2410) #2431

Closed g-linville closed 6 months ago

g-linville commented 6 months ago

for #2410

Turns out my previous PR to fix this race condition introduced another problem. I was previously waiting until all containers in the app were marked as Defined in their status before prompting the user to fill in the credential secret, but the containers will never be Defined if their env references anything inside of the secret, since the secret needs to be created first.

This new approach is much better (shoutout to Mr. Thedadams for the solution). We bubble up the app that is returned from our Update and use that as the basis for the generation, and the user is prompted only one time as a result.

Checklist