-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
In the go-based buildpack the common framework code consist of a dedicated framework struct implementing the frameworks.Framework interface by implementing the Detect(), Supply(), Finalize() funcs. The struct sometimes defines additional fields like jarPath or agentPath representing some paths to a jar or an agent involved in the phases logic.
Supply and Finalize phase binaries are called separately, they do not share some state between their calls. This means a framework struct built within the Supply phase, should once again be initialized and built during the Finalize phase.
The registry.RegisterStandardFrameworks() which initializes the frameworks is called separately once in Supply and once Finalize.
Multiple frameworks though involve code in their Finalize phase which expects certain framework struct fields, like jarPath and agentPath to be available after Supply without being reconstructed during Finalize. For example an agentPath is constructed during the Supply phase for the Google Stackdrive Profile framework here and further a check during Finalize is present like here but the check will never pass as this path is never reconstructed for the Finalize phase and the phase will do nothing.
Affected frameworks: