Add resolved-dependency override mechanism for DR-008#19
Closed
Subramanian-K812 wants to merge 6 commits into
Closed
Add resolved-dependency override mechanism for DR-008#19Subramanian-K812 wants to merge 6 commits into
Subramanian-K812 wants to merge 6 commits into
Conversation
PiotrKorkus
reviewed
Jul 1, 2026
PiotrKorkus
left a comment
Collaborator
There was a problem hiding this comment.
make the script part of //scripts/tooling and enable it in bazel run
| exclude_test_targets: list[str] = field(default_factory=lambda: []) | ||
| langs: list[str] = field(default_factory=lambda: ["cpp", "rust"]) | ||
| rust_coverage_config: str | None = "ferrocene-coverage" # Optional field for Rust coverage configuration | ||
| bazel_config: list[str] = field(default_factory=lambda: []) |
Collaborator
There was a problem hiding this comment.
why needed? no updates in json regarding that
is it for holding flags, whole file, or?
Comment on lines
+44
to
+58
| # Import ``models`` + ``generate_override_directive`` whether this file is loaded as | ||
| # ``known_good.resolved_dependencies`` (scripts/ on path, e.g. from quality_runners.py) | ||
| # or as ``resolved_dependencies`` (scripts/known_good/ on path). Preferring the | ||
| # package-qualified form keeps a single ``Module`` class identity in the package context. | ||
| _HERE = Path(__file__).resolve().parent | ||
| try: | ||
| from known_good.models.known_good import load_known_good | ||
| from known_good.models.module import Module | ||
| from known_good.update_module_from_known_good import generate_override_directive | ||
| except ImportError: | ||
| if str(_HERE) not in sys.path: | ||
| sys.path.insert(0, str(_HERE)) | ||
| from models.known_good import load_known_good # noqa: E402 | ||
| from models.module import Module # noqa: E402 | ||
| from update_module_from_known_good import generate_override_directive # noqa: E402 |
Collaborator
There was a problem hiding this comment.
keep only bazel execution
Collaborator
There was a problem hiding this comment.
dont change in this PR
Comment on lines
+286
to
+287
| if name in already_overridden: | ||
| continue # respect an override the module already declares |
Collaborator
There was a problem hiding this comment.
we should decide in reference_integration what version should be used. It has to be always overwritten
Comment on lines
+61
to
+62
| INJECTION_BEGIN = "# --- BEGIN ref_int resolved-deps injection (DR-008 Option 4) ---" | ||
| INJECTION_END = "# --- END ref_int resolved-deps injection (DR-008 Option 4) ---" |
Collaborator
There was a problem hiding this comment.
(DR-008 Option 4) remove this reference, its not needed
… markers, simplify imports
…directive inline, add BUILD for bazel run
…wn_good.py, and tooling BUILD format
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.
DR-008: resolved-dependency resolve + override mechanism (PR 1 of 2)
Part of eclipse-score#264. This is the first of two PRs that split the original DR-008 Option 4
change. This PR adds only the mechanism; the follow-up
PR wires it into the test workflow.
What this PR does
Adds
ResolvedDependencies— the mechanism DR-008 Option 4 needs to (1) resolve the fullintegrated dependency set at the
reference_integrationroot and (2) override thoseresolved versions directly into an individual module.
(
MODULE.bazel+bazel_common/*.MODULE.bazel) with the post-MVS registry versionsfrom
bazel mod graph --output=json, and serializes the result to a singleresolved_versions.jsonmanifest (--export/from_mod_graph/to_file).MODULE.bazeland appends agit_override/single_version_overridefor each declared dependency we have aresolved version for, so the module builds/tests against the resolved set
(
scan/overwrite).Files
scripts/known_good/resolved_dependencies.pyResolvedDependenciesmechanism (resolve + override) + CLIscripts/known_good/tests/test_resolved_dependencies.pyscripts/known_good/update_module_from_known_good.pygenerate_override_directive()(now shared by the generator andoverwrite); import guard. Generated output is byte-identicalscripts/known_good/models/module.pyMetadata.bazel_configfield (inert here; populated/consumed in PR 2)Follow-up (PR 2)
The two-stage
test_and_docs.yml(Stage 1 resolves + exports the manifest; Stage 2 checksout each module, overrides deps via this mechanism, and runs its UT + coverage; then
aggregates), the module-context
quality_runners.py, the dependency pin bumps, and theassociated config all land in the follow-up PR, which is stacked on this one.