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

Messaging with the platform in an async fashion #1215

Open
kritkasahni-google opened this issue Oct 9, 2023 · 1 comment
Open

Messaging with the platform in an async fashion #1215

kritkasahni-google opened this issue Oct 9, 2023 · 1 comment

Comments

@kritkasahni-google
Copy link
Contributor

kritkasahni-google commented Oct 9, 2023

Summary

Investigating build latencies and realized we export app image and cache image serially at the moment. I know there is a change in progress to export app and cache image in parallel. Ideally lifecycle should be able to signal the platform asap after the app image is ready and for also consistency, asap after the cache image is ready. The underlying reason is that platform could relay the signal to any service that wants to deploy the app image as soon as app image is ready and without waiting for build to complete aka cache image export to complete. I know cache image export is last step in build today and as per lifecycle logic we don't fail the build if we fail to export the cache image today [https://github.com/buildpacks/lifecycle/blob/main/cmd/lifecycle/exporter.go#L229].


Proposal

If lifecycle/exporter could write some status like "APP_IMAGE_READY" (in the context of corresponding build/execution) as soon as app image is ready[1] (w/o waiting for cache image export) to CNB_PLATFORM_DIR from which our platform which can be relayed to interested services who can then immediately deploy app image and don't necessarily need to wait for cache image export. ... [1] https://github.com/buildpacks/lifecycle/blob/main/cmd/lifecycle/exporter.go#L227

Open to alternatives and there is also some discussion in #1167 (comment)

Note that this behavior should be controlled by a flag input from platform based on if/whether platform supports this/wants to utilize this or not.


Related

RFC #___


Context

#1167 (comment)

@natalieparellano
Copy link
Member

Any further thoughts here? Last time I looked at this I thought we could use the presence of report.toml as an indication that the app image is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants