apache / apache/buildstream

Need better messaging about workspaced junctions

Open
#979 5 comments 0 reactions 0 assignees View on GitHub
enhancement logging
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/979)
In GitLab by [[Gitlab user @tristanvb]](https://gitlab.com/tristanvb) on Mar 30, 2019, 10:52

## Background

As reflected by my silly panic which resulted in filing #978, it can be quite easy to not be aware that you are working with an active workspace on a junction element.

Regular (non-junction) elements do not have the same problems, because:
* At least whenever we start a session we display which elements in the pipeline have open workspaces
* We don't show the junctions in the regular `bst show` codepaths which construct the pipeline summary, so we don't see these at session start
* Parse/load errors cannot originate from inside a workspace unless it is a workspace of a junction

When load errors start happening because of a ref mismatch of a subproject, i.e. the subproject is not what you expect it to be, then you have to remember that you had a workspace open on the junction element.

## Task description

[//]: # (Short summary of the action to be executed)

* [x] **Display active junctions beside the pipeline summary at session start**

This should just be done anyway, this is important information about a session and it's currently missing.

Using the same codepaths as we use to display other elements will ensure that open workspaces will be indicated.

* [ ] **Enhance provenance to specify open workspaces**

Whenever a `LoadError` is raised, the provenance of the error should indicate that it's project is junctioned.

Currently provenance only specifies the full element name including it's junction with `junction.bst:element.bst` colon notation, in the case that `junction.bst` has an open workspace, it will be useful to the user to indicate that, probably by specifying the path to the open workspace.

* [ ] **Enhance missing file errors to specify open workspaces**

The errors which say: *"element.bst was not found in project referred to by junction.bst"*, should specify the junction's workspace path if the junction has an open workspace

Contributor guide

Open the contributing guide

Research direction

Start with the session-start pipeline summary codepaths, then trace LoadError provenance and the missing-file error for elements inside junctions. The change is done when open junction workspaces are shown at session start and both error types identify the relevant workspace path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.