DR-008 Option 4: two-stage test-execution workflow (PR 2 of 2) - #280
DR-008 Option 4: two-stage test-execution workflow (PR 2 of 2)#280Subramanian-K812 wants to merge 30 commits into
Conversation
c9462ea to
fd3df76
Compare
d293277 to
b6df34d
Compare
…ing it, and make resolved_dependencies importable standalone
… markers, simplify imports
…directive inline, add BUILD for bazel run
…wn_good.py, and tooling BUILD format
b6df34d to
e51b340
Compare
e51b340 to
640dfee
Compare
|
The created documentation from the pull request is available at: docu-html |
…nstead of only its declared deps
75e4c57 to
cb3fbcc
Compare
…mechanism (rebased onto upstream)
…s, fix exit-code masking, wire transitive-dep fetch, and correct score_communication/score_time known_good pins
…ef_int's centralized bazelrc over the module's own
…lementation files
…un the unit tests in CI
04a7a73 to
e816620
Compare
PiotrKorkus
left a comment
There was a problem hiding this comment.
as the workflow has been completely reworked please create a private fork and execute it there, so we can see the proof of working in CI
pull_request_target wont allow to execute it here
| @@ -0,0 +1,221 @@ | |||
| # Stage 2 — Constraint Sheet | |||
|
|
|||
| Living document. Amend it when a constraint turns out to be wrong, and record why in the | |||
There was a problem hiding this comment.
If thats AI generated and maintained, where is a skill / agent for that purpose?
There was a problem hiding this comment.
where is this file generated from? All modules should be from known_good
There was a problem hiding this comment.
not generated — known_good.json pins first-party repos by commit, these are registry deps pinned by version (confirmed via bazel mod graph --verbose: 2 of the 3 pins do move MVS's selection)
| # 0.9.1 declares the four *_rules_rust_miri toolchains score_lifecycle_health and | ||
| # score_persistency register in their own .bazelrc; 0.8.0 has none. ref_int cannot un-register | ||
| # them, so the version must match here. Locked in score_test_artifact_versions.MODULE.bazel. |
| - name: Set up Python 3 | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: '3.12' |
|
|
||
| # One label for every Python unit test, so CI runs all of them by naming a single target. | ||
| test_suite( | ||
| name = "python_tests", |
There was a problem hiding this comment.
change name, its meaningless without looking into target
There was a problem hiding this comment.
Renamed to all_python_unit_tests.
| push: | ||
| branches: | ||
| - main | ||
| - Subramanian-K812_test_execution_upgrade # TEMP: remove after CI verified |
There was a problem hiding this comment.
it doesnt work because the same workflow name is with pull_request_target on main
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clean disk space | ||
| uses: eclipse-score/more-disk-space@v1 |
There was a problem hiding this comment.
Bumped to v1.1
| if [ ! -s _module/module_graph.json ]; then | ||
| echo "::warning::no module graph captured for ${{ matrix.module.name }}"; exit 0 | ||
| fi | ||
| PYTHONPATH=scripts python3 scripts/known_good/verify_stage2_resolution.py \ |
There was a problem hiding this comment.
if script needs a PYTHONPATH to be set its very bad design. Fix with proper modules imports
| "bazel_config": [ | ||
| "stage2-gcc", | ||
| "stage2-rust" |
There was a problem hiding this comment.
it feels like it doesnt need to be placed in this json as its common for every module
There was a problem hiding this comment.
score_time and score_communication are exceptions for the above.
| "//score/mw/com/impl/bindings/lola/tracing:tracing_runtime_test" | ||
| ], | ||
| "bazel_config": [ | ||
| "stage2-rust" |
There was a problem hiding this comment.
why com has only rust?
There was a problem hiding this comment.
score_communication passes use_base_constraints_only=True to its own gcc.toolchain(), which changes its generated toolchain target name leading to referencing a target that doesn't exist.
|
Ran the reworked workflow end-to-end on a private fork: |
1a9a26e to
913bc97
Compare
DR-008 Option 4: two-stage test-execution workflow (PR 2 of 2)
Closes #264. This is the second of two PRs. It is stacked on PR 1
(
Subramanian-K812_resolve_override_mechanism, "resolved-dependency resolve + overridemechanism") — please review/merge that one first. Until PR 1 merges, this PR's base branch
is the PR-1 branch, so the diff shown here is only the test-execution delta.
What this PR does
Rewires the quality workflow to the DR-008 Option 4 flow, using the resolve + override
mechanism added in PR 1:
exports the resolved dependency set as the
stage1-resolved-depsartifact(
resolved_versions.json).known_good.json(target_sw) — never hardcoded.known_goodcommit, overridesits
MODULE.bazelwith the Stage-1 resolved set (PR 1's mechanism), and runs themodule's own unit tests + coverage as the Bazel root (
//...).release-tag test-report ZIP).
Files
Workflow & runners
.github/workflows/test_and_docs.yml— two-stage restructure (+ parallel docs build)scripts/quality_runners.py— module-context mode (--module-dir/--resolved-deps); callsResolvedDependencies.overwritescripts/aggregate_quality_report.py— new, consolidated reportscripts/known_good/list_modules.py— new, dynamic Stage-2 matrix fromknown_good.jsonscripts/integration_test.py— derive build targets fromknown_good.json(dropbuild_config.json)Resolved pins + their config ripple (kept together so the tree is self-consistent)
known_good.json— pin bumps (baselibs, lifecycle) + per-modulebazel_config+ lifecyclecode_root_path/extra_test_configbazel_common/score_basic_bazel.MODULE.bazel— flatbuffers bumpbazel_common/score_modules_target_sw.MODULE.bazel— regenerated (baselibs, lifecycle)MODULE.bazel.lock— updated lockrust_coverage/BUILD— lifecycle query//src/...→//score/...(layout moved by the bump)showcases/simple_lifecycle/BUILD— lifecycle bin path//src/...→//score/launch_manager.bazelrc— coverage atomic-gcov /-no-coverage; eb-aarch64 outline-atomics link fixKnown Stage 2 integration findings (surfaced, not fixed here)
The workflow surfaces two module-owned integration failures caused by the
baselibs bump (
score_loggingCheckSizeValidstaleuint8_tassumption;score_persistencyto_stringonstd::string_view).