Public data in plugin yaml is ignored
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system
Research direction
Compare the public section in my-plugin.yaml with the get_public_data("bst") and set_public_data("bst", ...) path shown in my-plugin.py. Start by loading the example plugin and trace how its YAML is handled. Done means the public YAML is honored, or loading it produces a clear validation error.
Written by the indexing model from the issue text.
Description
When writing a new plugin e.g.:
my-plugin.py
from buildstream import BuildElement
class MyPluginElement(BuildElement):
BST_MIN_VERSION = "2.2"
def setup():
return MyPluginElement
my-plugin.yaml
variables:
my_var: "some value"
config:
install-commands:
- echo "Installing a file to %{install-root}"
public:
bst:
split-rules:
integration-commands:
- echo "integrating artifacts"
devel:
- /my/custom/development/paths
The public section of the YAML is ignored by Buildstream.
Instead it's required to go via the python API:
from buildstream import BuildElement
class MyPluginElement(BuildElement):
BST_MIN_VERSION = "2.2"
def assemble(self, sandbox):
collectdir = super().assemble(sandbox)
bstdata = self.get_public_data("bst")
bstdata["integration-commands"] = [ 'echo "integrating artifacts" ' ]
bstdata["split-rules"] = {
"devel" : [ " /my/custom/development/paths" ]
}
self.set_public_data("bst", bstdata)
return collectdir
def setup():
return MyPluginElement
Proposed solutions from @gtristan
It should either (A) Be supported or (B) Trigger a validation error at load time
- Dominant language
- Python
- Stars
- 144
- Forks
- 45
- Avg merge
- 20h 38m
- Merged PRs (30d)
- 6
Contributor guide
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
-
logging
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
apache/buildstream#2150 · 3 comments ·
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
apache/buildstream#2143 · 2 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2194 ·
-
Modification time of an element with an open workspace propagates into consumer element's sandbox Openbug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
apache/buildstream#2186 · 2 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/buildstream#2184 · 1 comment ·
All issues in apache/buildstream
Similar issues
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
open-webui/open-webui#30750 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 90/100