apache / apache/buildstream

Rework node provenance for synthetic nodes

Open
#1,058 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
140
Forks
45
Avg merge
1d 3h
Merged PRs (30d)
6

Description

[See original issue on GitLab](https://gitlab.com/BuildStream/buildstream/-/issues/1058)
In GitLab by [[Gitlab user @BenjaminSchubert]](https://gitlab.com/BenjaminSchubert) on Jun 28, 2019, 09:57

Related to !1425 (https://gitlab.com/BuildStream/buildstream/merge_requests)/1425#note_186387325)

There are only two cases were nodes are set in the code (hence without provenance):
- When automatic variables are set by the core (e-g: max-jobs)
- when plugins call Element.set_public_data

The first case should never throw errors, so it is of limited interests.
The second is more important. What should probably be done here is to have 'set_public_data'
able of creating a fake provenance with the name of the plugin, the project and probably the element name.

Currently, we get the provenance from the element file, which does not contain the data.

We would therefore have much better error messages, and would be able to get rid of most synthetic nodes.

Contributor guide

Open the contributing guide

Research direction

Start with Element.set_public_data and the core path that sets automatic variables; compare their current provenance with the element-file provenance described in the issue. Read the original GitLab issue and related !1425 for context, then define completion as plugin-created public data producing useful provenance and error messages while reducing synthetic nodes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.