Multiline comment in a "(>)" crashes "bst track"
Summary
Multiline comments
Steps to reproduce
Try to track the following element:
kind: manual
config:
build-commands:
(<):
# BuildStream does not like that
# multiline comment
- |
true
sources:
- kind: remote
url: https://www.timeanddate.com/worldclock/uk/manchester
What is the current bug behavior?
Traceback (most recent call last):
File "/home/valentin/.local/lib/python3.7/site-packages/buildstream/_scheduler/queues/queue.py", line 280, in _job_done
self.done(job, element, result, status)
File "/home/valentin/.local/lib/python3.7/site-packages/buildstream/_scheduler/queues/trackqueue.py", line 60, in done
source._set_ref(new_ref, save=True)
File "/home/valentin/.local/lib/python3.7/site-packages/buildstream/source.py", line 879, in _set_ref
_yaml.dump(provenance.toplevel, provenance.filename.name)
File "/home/valentin/.local/lib/python3.7/site-packages/buildstream/_yaml.py", line 248, in dump
yaml.round_trip_dump(node, f)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/main.py", line 1312, in round_trip_dump
prefix_colon=prefix_colon,
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/main.py", line 1190, in dump_all
dumper._representer.represent(data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 85, in represent
node = self.represent_data(data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 112, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1173, in represent_dict
return self.represent_mapping(tag, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1018, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 112, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1173, in represent_dict
return self.represent_mapping(tag, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1018, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 112, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1173, in represent_dict
return self.represent_mapping(tag, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1018, in represent_mapping
node_value = self.represent_data(item_value)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 112, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 1188, in represent_list
return self.represent_sequence(tag, data)
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 935, in represent_sequence
self.merge_comments(node_item, item_comments.get(idx))
File "/home/valentin/.local/lib/python3.7/site-packages/ruamel/yaml/representer.py", line 957, in merge_comments
assert val is None or val == nc
AssertionError
What is the expected correct behavior?
It should just track and succeed.
Relevant logs and/or screenshots
Possible fixes
Other relevant information
- BuildStream version affected: /milestone %BuildStream_v1.4