Brijesh-Thakkar opened a new pull request, #3943:
URL: https://github.com/apache/nuttx-apps/pull/3943
## Summary
Bring the NTFC part of `.github/workflows/build.yml` in line with
apache/nuttx
(three commits):
* Bump `ntfc==0.0.1` to `ntfc==0.0.3`. apache/nuttx has used 0.0.3 since
8f4a5b2bd3. This workflow already uses the same `nuttx-ntfc-testing` tag
(`release-0.0.2`) and runs the `citest/run.sh` scripts of the nuttx tree
it
checks out, so the NTFC version should match.
* Fail the job when `pip install ntfc` fails on the last attempt. The loop
was `pip install ... && break` with nothing after it, so after three
failed attempts the job carried on and failed later with a missing `ntfc`
command. It now prints "Failed to install NTFC after 3 attempts" and
exits 1, as in nuttx.
* Remove the `( sleep 7200 ; echo Killing pytest after timeout... ;
pkill -f pytest )&` watchdog. NTFC runs pytest in-process, so no process
has "pytest" in its command line and the pattern only matched the
`bash -c` job script and the watchdog subshell (their script text
contains
the word); on a timeout it would have killed the whole step. It is
redundant anyway: NTFC bounds each test session with `timeout_session` in
the `config.yaml` of the nuttx tree (3600 s when not set, 6000 s for
`sim/citest`).
Follows apache/nuttx#20958 (merged), which removed the same watchdog from
nuttx in favour of NTFC's session timeout (7fe6168725).
Part of apache/nuttx#17717
## Impact
* CI only; no source changes.
* ntfc 0.0.1 -> 0.0.3 for the Linux build job. apache/nuttx CI already runs
0.0.3 with the same test cases (`release-0.0.2`).
* A failed NTFC installation now fails the job at the install step.
* No test limits change: the per-session limits come from the nuttx tree
and
stay at 3600 s (NTFC default) / 6000 s (`sim/citest`). On a timeout NTFC
stops the session, keeps its reports and exits with status 1, so the job
still fails.
* The old watchdog also (accidentally) bounded a hung *build* at 2 hours.
Without it the Linux job falls back to GitHub's default of 360 minutes
(same as in nuttx now). A step-level
`timeout-minutes` could be a follow-up if wanted.
Differences with the nuttx workflow that I left as they are:
* `NUTTX_ROMFS_PASSWD_PASSWORD` in the "Run builds" step: apps-only, added
on purpose by 1d15c81f6 for `sim/login`.
* The "Restore ccache" / "Prepare ccache for caching" and the
"Run host_info sanity check" steps exist in nuttx and not here. Not NTFC
related; I did not want to mix it in.
* nuttx 1c596841ec ("ci/workflow: resolve network timeout and MTU issues in
docker builds") added a `~/.curlrc` with curl timeouts/retries to the
"Run
builds" step and `--depth 1` to the `nuttx-ntfc-testing` clone. This is a
separate network-robustness change, not part of the watchdog removal, so
it
is not included here.
The rest of the NTFC block (pip flags `--default-timeout=100 --retries 10`,
`nuttx-ntfc-testing` tag `release-0.0.2`, the clone retries with backoff,
`NTFCDIR`) is identical to the current apache/nuttx `build.yml`.
## Testing
Validated locally for the nuttx PRs, with this repository as `../apps`
(upstream/master): `pip install ntfc==0.0.3` (CI flags) plus `sim:citest`
(`cibuild.sh -c -A -N -R -S`, gcc-12.5.0, `nuttx-ntfc-testing`
`release-0.0.2`):
1221 passed / 0 failed / 306 skipped. A copy of the sim `config.yaml` with
`timeout_session: 60` made NTFC stop by itself with
`session-timeout: 60.0 sec exceeded`, keep its results in `result/` and exit
with status 1.
In this repository:
* `python -c "import yaml;
yaml.safe_load(open('.github/workflows/build.yml'))"`
parses; the `if`/`else` around `cibuild.sh` is intact (the `else` branch
now
only runs `cibuild.sh`).
* The retry block is byte-identical to the one in the current apache/nuttx
`.github/workflows/build.yml` (checked after #20958).
* `../nuttx/tools/checkpatch.sh -c -u -m -g upstream/master..HEAD` (the
command of `check.yml`) passes.
Caveat: the changed workflow itself was not run on GitHub Actions; the
failure
path of the install loop (3 failed attempts) was not triggered.
Generated-by: Claude Code (analysis, test runs and drafting); reviewed and
tested by me.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]