Skip to content

1st build on a branch that contains a new folder declared in applicationSrcDirs --> !** Could not obtain the baseline hash for directory #631

@FALLAI-Denis

Description

@FALLAI-Denis

Hi,

When impactBuild is first requested on a new Git branch, there is no lastBuildResult for that branch.
In this case, zAppbuild uses the lastBuildResult of the branch declared in the mainBuildBranch property, (master for us).

However, if a new directory was added to the applicationSrcDirs list after the last build on the mainBuildBranch branch, then this folder has no known hash in the context of the mainBuildBranch's lastBuildResult.
This results in the message !** Could not obtain the baseline hash for directory <newdirectory> and no build is performed for the sources present in this new directory.

One solution would be to declare a baselineRef for the new directory during ImpactBuild, --baselineRef <pathToDirectory>:<directoryCreationCommit>, but this cannot be implemented in an automated build process and requires manual intervention.

The calculateChangedFiles routine in ImpactUtilities.groovy would need to automatically retrieve the directory creation hash to calculate the difference between this hash and the current context hash so that the sources added to the directory are built.

Thanks.

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