Repository navigation
ci: sync NTFC setup with nuttx (ntfc 0.0.3, fail-fast install, drop watchdog) - #3943
Merged
Merged
Conversation
xiaoxiang781216
approved these changes
Oct 30, 2026
jerpelea
previously requested changes
Oct 30, 2026
jerpelea
left a comment
Contributor
There was a problem hiding this comment.
please explain
Generated-by: Claude Code
Brijesh-Thakkar
force-pushed
the
ci/ntfc-sync-with-nuttx
branch
from
October 30, 2026 15:33
d6e1979 to
3c58820
Compare
Contributor
Author
|
Thanks @jerpelea, I’d used the ASF Generated-by: tag instead of the Assisted-by: format from CONTRIBUTING.md 1.5. I’ve updated the commits to Assisted-by: Claude Code:claude-sonnet-5-5 above my Signed-off-by. The code is unchanged. To explain: I used Claude Code to help analyse the code, run the local tests I reviewed every line of the change and ran the tests myself, and the Signed-off-by is mine |
The Linux job installs ntfc==0.0.1, while apache/nuttx has used
ntfc==0.0.3 since 8f4a5b2bd3 (".github/workflows/build.yml: bump NTFC
to 0.0.3"). This workflow already uses the same nuttx-ntfc-testing tag
(release-0.0.2) as nuttx, and it runs the citest/run.sh scripts from the
nuttx tree it checks out, so the NTFC version should match too.
Part of apache/nuttx#17717
Assisted-by: Claude Code:claude-sonnet-5-5
Signed-off-by: Brijesh Thakkar <[email protected]>
The retry loop around "pip install ntfc" uses "&& break" and nothing after the loop checks the result, so when all three attempts fail the job carries on without NTFC. The failure then only shows up later, as a missing "ntfc" command in the citest run.sh script of the nuttx tree, which is hard to trace back to the network problem. Fail the job with a message after the last attempt, as apache/nuttx does. Part of apache/nuttx#17717 Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Brijesh Thakkar <[email protected]>
The Linux build job starts "( sleep 7200 ; ... ; pkill -f pytest )&" in the background before running cibuild.sh. It was meant to stop a hung test run, but it does not do that now that the runtime tests use NTFC: NTFC runs pytest in-process, so no process has "pytest" in its command line. The pattern only matches the "bash -c" job script and the watchdog subshell, because their script text contains the word "pytest". When it fires it kills the whole step instead of the tests. The watchdog is also redundant. NTFC bounds each test session itself with "timeout_session" in the config section of the citest config.yaml files of the nuttx tree (3600 seconds when not set, 6000 seconds for sim/citest), enforced through pytest-timeout --session-timeout. When the limit is reached NTFC stops the session, keeps its reports and exits with status 1, so the job still fails. Note that the session timeout covers the test session only, not the build. This matches the change made in apache/nuttx. Part of apache/nuttx#17717 Assisted-by: Claude Code:claude-sonnet-5-5 Signed-off-by: Brijesh Thakkar <[email protected]>
Brijesh-Thakkar
force-pushed
the
ci/ntfc-sync-with-nuttx
branch
from
October 31, 2026 06:20
3c58820 to
fe9fe46
Compare
Contributor
Author
|
The Linux jobs failed at the “Docker Pull” step (ghcr blob digest mismatch) before any build or NTFC step ran, so it looks like a registry hiccup. I’ve rebased onto current master to re-run CI. |
xiaoxiang781216
approved these changes
Oct 31, 2026
casaroli
approved these changes
Nov 1, 2026
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
Bring the NTFC part of
.github/workflows/build.ymlin line with apache/nuttx(three commits):
ntfc==0.0.1tontfc==0.0.3. apache/nuttx has used 0.0.3 since8f4a5b2bd3. This workflow already uses the same
nuttx-ntfc-testingtag(
release-0.0.2) and runs thecitest/run.shscripts of the nuttx tree itchecks out, so the NTFC version should match.
pip install ntfcfails on the last attempt. The loopwas
pip install ... && breakwith nothing after it, so after threefailed attempts the job carried on and failed later with a missing
ntfccommand. It now prints "Failed to install NTFC after 3 attempts" and
exits 1, as in nuttx.
( sleep 7200 ; echo Killing pytest after timeout... ; pkill -f pytest )&watchdog. NTFC runs pytest in-process, so no processhas "pytest" in its command line and the pattern only matched the
bash -cjob script and the watchdog subshell (their script text containsthe word); on a timeout it would have killed the whole step. It is
redundant anyway: NTFC bounds each test session with
timeout_sessioninthe
config.yamlof the nuttx tree (3600 s when not set, 6000 s forsim/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
0.0.3 with the same test cases (
release-0.0.2).stay at 3600 s (NTFC default) / 6000 s (
sim/citest). On a timeout NTFCstops the session, keeps its reports and exits with status 1, so the job
still fails.
Without it the Linux job falls back to GitHub's default of 360 minutes
(same as in nuttx now). A step-level
timeout-minutescould be a follow-up if wanted.Differences with the nuttx workflow that I left as they are:
NUTTX_ROMFS_PASSWD_PASSWORDin the "Run builds" step: apps-only, addedon purpose by 1d15c81 for
sim/login."Run host_info sanity check" steps exist in nuttx and not here. Not NTFC
related; I did not want to mix it in.
docker builds") added a
~/.curlrcwith curl timeouts/retries to the "Runbuilds" step and
--depth 1to thenuttx-ntfc-testingclone. This is aseparate 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-testingtagrelease-0.0.2, the clone retries with backoff,NTFCDIR) is identical to the current apache/nuttxbuild.yml.Testing
Validated locally for the nuttx PRs, with this repository as
../apps(upstream/master):
pip install ntfc==0.0.3(CI flags) plussim:citest(
cibuild.sh -c -A -N -R -S, gcc-12.5.0,nuttx-ntfc-testingrelease-0.0.2):1221 passed / 0 failed / 306 skipped. A copy of the sim
config.yamlwithtimeout_session: 60made NTFC stop by itself withsession-timeout: 60.0 sec exceeded, keep its results inresult/and exitwith status 1.
In this repository:
python -c "import yaml; yaml.safe_load(open('.github/workflows/build.yml'))"parses; the
if/elsearoundcibuild.shis intact (theelsebranch nowonly runs
cibuild.sh)..github/workflows/build.yml(checked after #20958).../nuttx/tools/checkpatch.sh -c -u -m -g upstream/master..HEAD(thecommand 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.
Assisted-by: Claude Code:claude-sonnet-5-5 (analysis, local test runs and drafting). I reviewed every change and ran the tests myself.