Skip to content

template doesn't fail if CSV file contains git conflict markers #1279

Description

@paulmillar

We're using a CSV file as input to a robot pipeline (via the template command) that is generating various semantic artefacts. This mostly works very well. The CSV file is stored in git repo, hosted on GitHub.

In the project, we use a script that builds the semantic artefacts (among other tasks). This script is containerised and run automatically when changes are committed to the git on GitHub, as part of a CI/CD pipeline. If robot command fails, the CI/CD pipeline fails, which GitHub shows graphically, against that commit. Therefore, we can use the failure of the robot command to identify problems.

Unfortunately, while working through a git merge conflict, someone mistakenly committed the merge conflict markers. For reference, the git conflict markers are lines that start with seven identical characters (<, = or >). The lines starting < or > contain additional information.

Here are example conflict marker lines:

<<<<<<< HEAD

and

=======

and

>>>>>>> c15b766 (blah blah blah...)

(where blah blah blah... is a placeholder text I've added, which would normally be the one-line summary of the corresponding commit)

Currently these lines do not cause the robot template command to fail. Therefore, although the commit introduced a problem, our CI/CD pipeline didn't detect this. It was only discovered from manually inspecting the CSV file (because of an unrelated problem).

It would be great if robot template command were to fail if the CSV file contained such git conflict markers.

For reference, we're using the template command with the following options --template $input --prefix "PaNET: http://purl.org/pan-science/PaNET/". The output from template is fed into further robot commands (reason, annotate, measure, etc), so the complete robot command is much longer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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