Skip to content

[go-migration] Multiple frameworks finalize phase will be omit #1162

@kiril-keranov

Description

@kiril-keranov

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions