Skip to content

Conversation

@joshua-zivkovic
Copy link
Contributor

@joshua-zivkovic joshua-zivkovic commented Nov 28, 2025

Fixes #2073

This PR provides a way for multi-source plugins to provide source provenance info in their own way instead of only the top level source source info being used.

This is done by exposing the optional source_provenance_attrs argument to create_source_info() which when used overrides the usage of the default provenance for a source. Any plugin that needs to parse provenance in it's own way can then supply it's results using this. This has been trialled with the cargo2 source plugin in https://gitlab.com/BuildStream/buildstream-plugins-community/-/merge_requests/408.

@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch 3 times, most recently from 2064cf3 to 2b0267c Compare December 1, 2025 10:07
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 2b0267c to 84d65c5 Compare December 9, 2025 11:13
@joshua-zivkovic joshua-zivkovic marked this pull request as ready for review December 9, 2025 11:20
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 84d65c5 to 835981f Compare December 12, 2025 13:14
@juergbi
Copy link
Contributor

juergbi commented Dec 12, 2025

Do plugins need access to the actual SourceProvenance object or might it be sufficient to make the new create_source_info() parameter a MappingNode and let create_source_info() create a _SourceProvenance internally? This would expose less in the public API, but I'm not sure whether that would suffice or not.

@joshua-zivkovic
Copy link
Contributor Author

Yup, taking in to account #2095 (comment), there's no need to expose SourceProvenance to achieve this.

@juergbi juergbi force-pushed the JZ/multi-source-provenance branch from 835981f to bbc05ba Compare December 19, 2025 10:20
@juergbi
Copy link
Contributor

juergbi commented Dec 19, 2025

I've updated this branch as per my previous comment, but this still requires a test.

@juergbi juergbi force-pushed the JZ/multi-source-provenance branch from bbc05ba to 4a04dac Compare January 13, 2026 10:33
@joshua-zivkovic joshua-zivkovic marked this pull request as draft January 22, 2026 12:43
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 4a04dac to 89c724f Compare January 22, 2026 13:44
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 89c724f to 6824dde Compare January 23, 2026 11:52
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 6824dde to 4cb1852 Compare January 23, 2026 14:31
This allows multi-source source plugins to provide this information per
source rather than as a singular top level.

This is done by adding a `provenance_node` parameter to
`create_source_info()` that when specified overrides the use of the
source's top level source provenance info.

Co-authored-by: Joshua Zivkovic <joshua.zivkovic@codethink.co.uk>
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 4cb1852 to 8409e5d Compare January 26, 2026 08:06
@joshua-zivkovic joshua-zivkovic marked this pull request as ready for review January 26, 2026 08:06
@joshua-zivkovic joshua-zivkovic force-pushed the JZ/multi-source-provenance branch from 8409e5d to 84e490e Compare January 27, 2026 10:52
@juergbi juergbi merged commit 56a4b79 into apache:master Jan 27, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Source provenance API for multiple-source source plugins

3 participants