git source: bst show --format %{source-info} crashes with BUG 'NoneType' object has no attribute 'rsplit' on untracked source
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- git, python
- Domain
- build-system
Research direction
Start in buildstream_plugins/sources/git.py at _guess_version around line 1084, then reproduce the issue with the provided untracked git source and bst show target.bst --format '%{source-info}'. Ensure source-info renders when the source has no ref, with version=None or omitted, and that bst show no longer crashes.
Written by the indexing model from the issue text.
Description
Environment
- BuildStream 2.7.0
- buildstream-plugins 2.5.0 (git source)
- Python 3.11
Steps to reproduce
Create a project with an element having a git source WITHOUT a ref(never tracked):
name: project
min-version: 2.6
element-path: elements
ref-storage: project.refs
aliases:
my: <repo_name>
plugins:
- origin: pip
package-name: buildstream-plugins
sources:
- git
kind: import
sources:
- kind: git
url: my:one/.git
track: master
Run:
bst show target.bst --format '%{source-info}'
Actual result
BUG 'NoneType' object has no attribute 'rsplit'
buildstream_plugins/sources/git.py, line 1084, in _guess_version
main_split = string.rsplit("-g", 1)
Expected result
source-info should render (version=None or omit) without crashing —
bst show must not fail because one source is not yet tracked.
- Dominant language
- Python
- Stars
- 8
- Forks
- 16
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/buildstream-plugins
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/buildstream-plugins#108 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apache/buildstream-plugins#54 · 4 comments ·
All issues in apache/buildstream-plugins
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100