Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

(Add option to) Fail if git --reset fails #331

Open
@DanielFEvans

Description

@DanielFEvans

On our Jenkins server, we occasionally encounter problems when the plugin's call to git reset --hard <commit id> fails because the base commit is unavailable (usually indicating user error, i.e. that they have a modified base branch with commits that don't exist remotely). The plugin is aware that the command has failed, emitting a log warning stating Got non-zero exit code resetting to base commit <commit id>: 128, but does not exit and fail the build.

The issue we encounter is that the plugin then continues and runs arc patch, which hangs while trying to find the missing commit. Our Jenkins server then kills off the build when the timeout kicks in, and on Windows we find that this routinely leaves files locked open and/or a rogue git process started by arc patch still running in the background, requiring manual intervention.

Additionally, it's also a little unclear to developers why the build failed. This is because the log report relating to git reset --hard failing is about halfway down the log output, and doesn't stand out compared to the normal log output.

We would prefer it if the Plugin exited immediately on git reset --hard failing, making it clear that this is the cause of the problem, and preventing arc patch hanging while trying to find a nonexistent commit. However, I'm not sure if it's possible for git reset --hard to fail, but for the build to continue successfully, which would make the implementation of this request a bit more difficult.

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