Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23888
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (4 Unrelated Failures), 2 Unclassified FailuresAs of commit aa6b089 with merge base 7da27ca ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
609ca3a to
7edb8d7
Compare
|
hi @rascani and @digantdesai we hope something like this could catch some buck2 stuff on github when merged :) |
|
New job runned |
|
@claude review this PR |
|
Claude finished @rascani's task in 3m 42s —— View job The PR is functional, but one bug in Detailed reviewPR Review: #23888SummaryThe PR runs each Vela parser case in its own process under Buck2, moves that C++ test into its own Code Quality
Infrastructure
RecommendationNeeds Discussion The early |
68b1d1a to
494b81a
Compare
|
Addressed the Claude's review report! |
|
|
||
| def visit(statements: list[ast.stmt], env: dict[str, object]) -> None: | ||
| for node in statements: | ||
| if isinstance(node, ast.FunctionDef) and node.name == "define_arm_tests": |
There was a problem hiding this comment.
Could we count registrations only when define_arm_tests is actually invoked? Traversing the function definition unconditionally lets the suite disappear without this check noticing.
|
|
||
| def visit(statements: list[ast.stmt], local_env: dict[str, object]) -> None: | ||
| for node in statements: | ||
| if ( |
There was a problem hiding this comment.
This visitor silently ignores augmented assignments such as srcs += ["new_helper.py"], retaining the old source list. Could we evaluate these mutations or mark the affected value unsupported so the checker reports that it cannot validate the declaration?
| package[: len(package) - node.level + 1] | ||
| + ([module] if module else []) | ||
| ) | ||
| if not module.startswith("executorch."): |
There was a problem hiding this comment.
Could this guard also accept module == "executorch"? Currently, from executorch import exir returns before resolving the imported alias, so a missing dependency passes unnoticed. The equivalent import executorch.exir correctly reports the missing dependency. Allowing the root package through should let the existing child-module resolution handle this case.
Count Arm test registrations only when the declaration visitor actually invokes define_arm_tests. Keep the package, source file and original helper name so aliases and called wrappers work while unused, inactive or unsupported calls cannot keep a removed test suite falsely registered. Evaluate supported augmented assignments to source and dependency lists. Invalidate unsupported mutations and report the original expression instead of retaining stale declaration values. Resolve imports from the executorch root package through the same child-module dependency checks as dotted imports. Add regression coverage for all three new review comments on GitHub PR pytorch#23888. The 64 checker tests and 12 entrypoint integration tests pass. The local entrypoint reports zero new errors or warnings against the parent patch. Removing the real Arm test macro call in a temporary snapshot reports 154 newly unregistered tests. UFMT, Flake8 and diff whitespace checks pass. Authored with assistance from OpenAI Codex. Signed-off-by: Usamah Zaheer <usamah.zaheer@arm.com> Change-Id: I6944d6481c6231754269716e4db1e3d7dcf22272
The public Buck2 suite omits Arm test coverage, so it can stay green when isolated Vela tests fail or Arm Python imports lack Buck declarations. Run the existing Vela parser suite and each discovered case in a fresh process. Retain runtime initialization in the test fixture before every case. Enable a plain test main only on the OSS isolation target so global initialization cannot mask missing fixture setup, while preserving internal and CMake test entrypoints. Move the C++ test into a standalone Buck package to avoid the internal Python test helper. Preserve the existing internal target label for individual-case selection, declare the platform dependency and update CMake's source path. Cover all ten Vela tests on upstream/main, including the malformed block and I/O payload cases. Add test-arm-backend-buck-declarations beside the other Arm GitHub jobs. Run it through test_arm_backend.sh test_buck_declarations so developers and CI share a command requiring only Git and Python. Compare against the PR merge base, previous push revision or local HEAD^, with BASE_REVISION available for changes spanning several commits. Keep the declaration check independent of Arm tool setup and the all suite. Check Arm Python test-library dependencies and test registration using supported local Buck declarations and their transitive dependencies. Discover every BUCK/TARGETS package beneath the Arm test tree so standalone nested libraries and removal of their source ownership are checked too. Collect errors after lazy dependency and provider discovery to report their actual build or helper file and unsupported construct. Preserve existing findings as a baseline. Fail on confirmed missing dependencies, unregistered Arm tests and unsupported Arm declarations. Report unsupported declarations outside Arm and dependency gaps that cannot be proven because of them as warnings. Include severity in the baseline identity so a warning becoming an error still fails. Document maintenance by Arm backend contributors and the limited static model. Evaluate Boolean expressions lazily, follow helpers only in active internal branches and reject parameterized or recursive helpers that cannot be validated. Present numbered findings with severity, files, targets and wrapped details. This check supplements Meta's internal packaged Python tests. Validation: 53 checker tests and 12 shell entrypoint integration tests pass, covering late diagnostics, warning policy, severity escalation, baseline selection, setup isolation and failure propagation. The local entrypoint reports zero new errors or warnings against upstream/main. UFMT, Flake8, ClangFormat and git diff --check pass. Focused public C++ compile/link checks cover both main configurations and all ten Vela cases together and separately. Meta's internal build and a complete Buck2 build have not been run for this amendment. Authored with assistance from OpenAI Codex. Signed-off-by: Usamah Zaheer <usamah.zaheer@arm.com> Change-Id: I2cdf857306becd0a1eeb844763b4a96a88d33502
Count Arm test registrations only when the declaration visitor actually invokes define_arm_tests. Keep the package, source file and original helper name so aliases and called wrappers work while unused, inactive or unsupported calls cannot keep a removed test suite falsely registered. Evaluate supported augmented assignments to source and dependency lists. Invalidate unsupported mutations and report the original expression instead of retaining stale declaration values. Resolve imports from the executorch root package through the same child-module dependency checks as dotted imports. Add regression coverage for all three new review comments on GitHub PR pytorch#23888. The 64 checker tests and 12 entrypoint integration tests pass. The local entrypoint reports zero new errors or warnings against the parent patch. Regression tests cover removed and inactive registration calls, augmented assignments and imports from the root package. UFMT, Flake8 and diff whitespace checks pass. Authored with assistance from OpenAI Codex. Signed-off-by: Usamah Zaheer <usamah.zaheer@arm.com> Change-Id: I6944d6481c6231754269716e4db1e3d7dcf22272
e82cda3 to
aa6b089
Compare
Summary
The public Buck2 suite can stay green when Vela tests depend on initialization by an earlier test or when Arm Python imports are missing Buck declarations. Run the Vela parser suite through the Buck2 job and run each discovered case in a fresh process. Initialize the runtime in the fixture and enable a plain test main only on the isolated OSS Buck target. Preserve the existing internal target label for individual-case selection and leave internal and CMake test entrypoints intact.
Add a separate GitHub job and a shared local
test_buck_declarationsentrypoint to catch newly introduced dependency and test-registration gaps. The checker follows supported in-repository declarations and transitive dependencies and reports declaration errors after lazy package loading, with their original file and unsupported construct. Confirmed missing dependencies, unregistered Arm tests, and unsupported Arm declarations fail; unsupported declarations outside Arm and dependency gaps that cannot be proven because of them produce warnings. Baseline comparison includes severity so warnings becoming errors still fail. The README documents this policy and maintenance by Arm backend contributors.This supplements Meta's internal packaged Python tests; it does not reproduce their environment. This change is independent of #22580.
Authored with assistance from OpenAI Codex.
Test plan
python3 -m unittest discover -s .ci/scripts/tests -p 'test_arm_buck*.py'— all 65 tests pass: 53 checker tests and 12 shell entrypoint tests.BASE_REVISION=2a84702c2ce453d095e784a9af9403bc87987dd4 bash backends/arm/test/test_arm_backend.sh test_buck_declarations— passes with zero new errors or warnings and 282 unchanged findings.git diff --checkpass for the edited code.These C++ checks use public sources and do not verify Meta's internal build. A complete Buck2 build was not rerun locally for this revision; the GitHub Buck2 job remains the full build check.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani