You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Let PHLEX_REGISTER_SOURCE plugins see the job's stage #957
Sources registered with PHLEX_REGISTER_SOURCE build their own provider_bundles, and each provider_bundle carries a stage string. The plugin has no way to learn the stage configured for the job. source_graph_proxy is built from graph_registration_bundle::stage, but it only exposes add_source. Also, unlike provide() (registration_api.hpp), the bundles a source returns don't get "CURRENT" replaced with the job's stage.
So in aegir every generator source block repeats the stage from the top-level config:
The plugin reads that key, and we reject "CURRENT" because it would end up as a literal stage name. When the two values differ, for example after phlex --stage foo, the generator products are labelled simulation and everything downstream is labelled foo.
Either of these would let us drop the duplicated key:
a stage() accessor on source_graph_proxy, or
replacing "CURRENT" in the stage of the bundles a source returns, the way provide() already does.
#923 fixed the same gap for PHLEX_REGISTER_PROVIDERS providers.
I guess I'm still wrapping my head around when it's best to use providers and when it's best to use sources.
@olantwin, just wondering if you can give a progress report on this. Have you found that it would still be helpful to support "CURRENT" for implicit providers created through sources? Or are explicit providers sufficient/natural for your needs?
I've implemented @beojan's suggestion in ShipSoft/aegir#177, and it seems that it's explicit providers work for us in for the use case where I occasionally ran into this.
Maybe there are other use cases where this could be useful, but in this case I think I was confused about when to best use providers and when to best use sources.
Activity
beojan commentedon Oct 26, 2026
Hi Oliver,
Would it be possible for you to implement these providers as explicit providers using
PHLEX_REGISTER_PROVIDERS?Sources generate implicit providers, which are really more suitable for reading in products produced in a previous stage.
olantwin commentedon Oct 27, 2026
Yes, that should be possible. I'll give it a try.
I guess I'm still wrapping my head around when it's best to use providers and when it's best to use sources.
docs: document providers and sources
docs: document processing stages
docs: document processing stages
docs: document providers and sources (#1030)
docs: document processing stages
refactor(generators): register the event generators as explicit provi…
docs: document processing stages
knoepfel commentedon Nov 20, 2026
@olantwin, just wondering if you can give a progress report on this. Have you found that it would still be helpful to support
"CURRENT"for implicit providers created through sources? Or are explicit providers sufficient/natural for your needs?docs(stages): address review comments
docs(stages): address review comments
olantwin commentedon Nov 22, 2026
Apologies for forgetting to reply sooner!
I've implemented @beojan's suggestion in ShipSoft/aegir#177, and it seems that it's explicit providers work for us in for the use case where I occasionally ran into this.
Maybe there are other use cases where this could be useful, but in this case I think I was confused about when to best use providers and when to best use sources.
So I think for now this can be closed.