Skip to content

Do not record ignored build failures as successful - #4944

Open
Aschenbath wants to merge 1 commit into
SCons:masterfrom
Aschenbath:fix/1332-ignore-errors-without-recording-success
Open

Aschenbath wants to merge 1 commit into
SCons:masterfrom
Aschenbath:fix/1332-ignore-errors-without-recording-success

Conversation

@Aschenbath

Copy link
Copy Markdown

After a builder writes partial output and returns an error, scons -i currently records that output as successfully built. The next invocation reports it as up to date; with --cache-force, the failed output also enters the shared cache.

Finish ignored failures using the Taskmaster path that updates scheduling state without calling the successful-build callbacks. Dependent tasks and shared side effects can continue, while the failed action does not save a successful signature or force its output into CacheDir.

The new end-to-end regression runs repeated real builds with -i, --ignore-errors --cache-force, and -i -j 2 --cache-force. It checks retries with outputs present and removed, multiple outputs, dependent and independent tasks, successful cache reuse, and failure after a previously successful build. The manual and release notes describe the behavior. Partial files are retained; this does not add the delete-on-error feature discussed in #4747.

Validation on Windows / Python 3.12.12:

  • The new regression fails against the original source because a subsequent build returns success without retrying the failed action; it passes after the fix.
  • Taskmaster, filesystem, CacheDir, CLI option and interactive tests: 129 scripts passed, 1 platform skip, 0 failed (130 selected).
  • All 215 documentation XML files validate after running bin/docs-update-generated.py. Generated files are excluded from the change as requested by the repository guide.
  • The new test passes Ruff lint/format checks; git diff --check passes. Existing diagnostics are unchanged from an independent baseline checkout: 54 Ruff findings in Main.py, and 1,353 mypy errors across the repository.

Contributor checklist:

  • Added regression coverage for the changed behavior.
  • Updated CHANGES.txt and RELEASE.txt; read README.rst.
  • Updated the relevant documentation.

Developed and tested with substantial AI assistance (OpenAI Codex), disclosed in the commit trailer as well.

Fixes #1332.

Assisted-by: OpenAI Codex
Signed-off-by: Nash Aschenbath <wwh86696@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bad targets are cached with --ignore-errors

1 participant