fix: log preflight issues as warnings#352
Merged
ArthurCRodrigues merged 1 commit intoJun 11, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts observability for the PreFlight validation path by treating predictable, student-caused validation failures as warnings rather than application errors. This aligns log severity with the pipeline’s intended behavior (PreFlight is expected to reject invalid submissions) and reduces false-positive alerts.
Changes:
- Downgraded logging for missing required submission files from
ERROR→WARNING. - Downgraded logging for failed setup commands (e.g., compile errors) from
ERROR→WARNING.
Member
Author
ArthurCRodrigues
approved these changes
Jun 11, 2026
Change logging level from error to warning for missing required files and failed setup commands in the preflight service. The conditions still append fatal PreflightError entries, but reduce log severity to avoid noisy error-level logs during these checks.
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.
Context
The PreFlight step is responsible for validating submissions before grading checking for required files and running setup commands (e.g., compilation). When these checks fail, it is expected behavior: the step exists precisely to catch invalid submissions.
However, failures in
check_required_filesandcheck_setup_commandswere being logged atERRORlevel, causing observability tools (e.g., alerting, dashboards) to treat them as application failures. Logs atERRORshould be reserved for unexpected failures in application procedures (e.g., failing to save grading results, failing to fetch a template), not for predictable, student-caused outcomes.Solution
Downgraded two
logger.errorcalls inPreFlightServicetologger.warning:check_required_files: a missing required file is a known, expected submission validation failure.check_setup_commands: a failed setup command (e.g., compilation error) is a known, expected submission validation failure.Calls that represent genuine application-level issues were left as
logger.error:PreFlightStep(infrastructure failure).check_setup_commandscalled with no sandbox directly via the service (defensive guard, indicates incorrect usage).Further clarifications
No behavior changes — only log severity is affected. Observability tools will no longer fire false-positive alerts for routine submission validation failures caught by PreFlight.
Related issues
Closes #351
Checklist