Open Cynical-Optimist opened 4 years ago
In GitLab by [Gitlab user @willsalmon] on Jun 16, 2020, 10:28
changed the description
In GitLab by [Gitlab user @willsalmon] on Jun 17, 2020, 11:40
A example in CI https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/598778674
In GitLab by [Gitlab user @coldtom] on Jun 17, 2020, 12:19
[Gitlab user @willsalmon] This is caused by the flatpak_image (or maybe flatpak_repo) plugin passing a configparser to get_unique_key
, which can't be dumped by ujson.
In GitLab by [Gitlab user @DouglasWinship] on Jun 18, 2020, 14:30
In the CI example above, the fault was with the snap_image plugin.
Managed to avoid the issue by editing the configure() function.
- self.metadata = node.get_node('metadata')
+ self.metadata = node.get_node('metadata').strip_node_info()
But as Will says, the real bug here (for buildstream) is that it doesn't fail cleanly.
In GitLab by [Gitlab user @abderrahimk] on Jun 20, 2020, 07:35
The difference in version is in ujson, ujson 1.x accepts the ConfigParser, but 2.0 doesn't.
I agree that bst should have a more defensive attitude towards things coming from the plugins, and fail cleanly.
In GitLab by [Gitlab user @DouglasWinship] on Jun 22, 2020, 10:33
changed title from {-Crash with trace back-} to {+Buildstream crashes unhelpfully when ujson can't process a cache key+}
In GitLab by [Gitlab user @DouglasWinship] on Jun 22, 2020, 10:33
changed the description
See original issue on GitLab In GitLab by [Gitlab user @willsalmon] on Jun 16, 2020, 10:28
Summary
[Edit/update] Buildstream plugins must supply a function called "get_unique_key", which returns an object that can be used to identify an element based on the config defined in its YAML. If the object is in a format that cannot be processed correctly, this can cause buildstream to crash when calculating the key.
There ought to be a clean failure, with a helpful error message. Instead we get a crash, and a traceback that doesn't immediately explain the problem. [End edit/update]
Steps to reproduce
Install bst at tag 1.93.4
install bst-plugins-experimental at
commit aa3c71568b0cdc537028e6ec389276bb79441f46 (HEAD -> master, origin/master, origin/HEAD)
checkout Freedesktop-sdk at
What is the current bug behaviour?
[Gitlab user @BenjaminSchubert] thinks this is a issue with the plugins repo, i dont understand why it works in CI
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/jobs/593127809
with what i belive are the same versions.But if the bug is in the plugins then bst should handle this failer cleanly