feat(lobster): include upstream system requirements in dependable_element traceability#326
Open
simon-d-bmw wants to merge 2 commits into
Open
Conversation
18c1f1e to
6fb7371
Compare
When a feature_requirements() target has deps on assumed_system_requirements(),
the upstream ASR lobster files are now propagated through FeatureRequirementsInfo
to the dependable_element lobster report.
Previously, derived_from links from feature requirements to system-level
requirements produced unresolved references in the lobster coverage report
because the referenced ASR items were absent from the DE lobster config.
Changes:
- providers.bzl: add upstream_srcs field to FeatureRequirementsInfo
- private/requirements.bzl: populate upstream_srcs from AssumedSystemRequirementsInfo.srcs
in deps when building FeatureRequirementsInfo (feature kind only)
- private/component.bzl: propagate upstream_srcs alongside srcs from FeatureRequirementsInfo
- private/dependable_element.bzl: collect upstream_req_list from upstream_srcs,
add {UPSTREAM_REQ_SOURCES} substitution, include in all_lobster_inputs
- lobster/config/lobster_de.conf.tpl: add 'System Requirements' section with
{UPSTREAM_REQ_SOURCES} placeholder between Feature Requirements and Forwarded AoUs
- test/seooc_test.bzl: add analysis tests verifying upstream_srcs propagation
and DE lobster report action inputs
Closes eclipse-score#310
…test assertion
- dependable_element.bzl: replace list.extend() accumulation with depset
transitive merge so repeated ASR deps across multiple feature_requirements
targets cannot produce duplicate {UPSTREAM_REQ_SOURCES} entries or duplicate
lobster report inputs
- seooc_test.bzl: replace generic count assertion with explicit check that
'asr_trlc.lobster' is present in the lobster report action inputs
6fb7371 to
e92b455
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a
feature_requirements()target hasdepsonassumed_system_requirements(), the upstream ASR lobster files were not included in thedependable_elementlobster config or report. This causedderived_fromlinks from feature requirements to system-level requirements to produce unresolved references in the lobster coverage report.Changes:
providers.bzl: addupstream_srcsfield toFeatureRequirementsInfoprivate/requirements.bzl: populateupstream_srcsfromAssumedSystemRequirementsInfo.srcsin deps (feature kind only)private/component.bzl: propagateupstream_srcsalongsidesrcsfromFeatureRequirementsInfoprivate/dependable_element.bzl: collectupstream_req_list(deduplicated via depset), add{UPSTREAM_REQ_SOURCES}substitution, include inall_lobster_inputslobster/config/lobster_de.conf.tpl: addrequirements "System Requirements" { {UPSTREAM_REQ_SOURCES} }sectiontest/seooc_test.bzl: add 2 analysis tests assertingupstream_srcspropagation and lobster report input inclusionValidation:
bazel test //:seooc_tests(frombazel/rules/rules_score/test/) — all 11 tests pass.Closes #310