Skip to content

Submodules not disabled for git mirrors #3286

@bpoland

Description

@bpoland

Hi, I think I've hit an edge case with git mirrors and submodules disabled with agent-stack-k8s.

It seems that git submodule foreach --recursive "git clean -ffxdq" gets run during git mirror updates, even when we have disabled submodules (using the agent-stack-k8s noSubmodules option which just sets the corresponding env var under the hood).

This doesn't seem to cause an issue normally, I guess because the submodules weren't initialized, but we recently had a change committed by accident which added an unused submodule without a corresponding .gitmodules entry. This caused the above command to complain fatal: No url found for submodule path 'xyz' in .gitmodules which completely broke all our builds once the commit got to main :(

It seems like when submodules are disabled, the git mirror functionality should ignore submodules as well? Or have a separate option to disable submodules for mirrors that we could set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions