Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Add "fast fail" option

Aperta
#131 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, testing

Direzione di ricerca

Inizia con le classi fetcher e check referenziate e con le posizioni dei runner in compliance/runners.py, quindi traccia il modo in cui vengono gestite le opzioni CLI e l'esecuzione combinata di fetcher/check. Usa il piano di test dell'issue per verificare il comportamento fetcher-only, check-only, combinato e predefinito, incluso il fatto che evidence, reports, fixers e notifiers vengano ignorati come specificato. Aggiungi la documentazione fast-fail richiesta e copri il relativo comportamento con local-locker.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

cli documentation enhancement runners

Overview

Adding a fast fail option when fetching and/or checking allows for the stop abruptly when an error is encountered during execution rather than continuing on with processing. This feature allows a user to ensure that reports are generated, fixers executed, remote locker is updated and notifications are sent ONLY if all tests (fetchers and checks) have not errored. Failing (not erroring) checks are still valid.

Requirements

  • Add a "fast fail" option that aborts the current execution immediately (upon first encountered/unexpected error)
  • When "fast fail" is invoked evidence is not committed or pushed to the remote evidence locker
  • When "fast fail" is invoked notifiers will not fire
  • The "fast fail" option will work on a fetcher execution
  • The "fast fail" option will work on a check execution
  • The "fast fail" option will work on a combined fetcher/check execution
  • Current functionality will not be compromised
  • Include documentation for "fast fail"

Approach

  • Add --fastfail to CLI options.
  • Update runner logic to immediately stop execution when an unexpected error is encountered during a test suite execution.
    • Add a fast fail result class for both fetcher and check execution that will stop execution upon first unexpected error.
      • Reference: fetcher test result class
      • Reference: check test result class
      • Leverage unittest.TextTestResult functionality to stop execution upon unexpected error. One possible route for a "fast fail" fetcher test result class would be to set shouldStop to True inside of a stopTest method when a non-dependency chaining error is encountred during the fetch. Similar can be done for a "fast fail" check test result class although here you would not need to guard against a dependency chaining error.
    • Provide different "fast fail" result classes to runners when --fastfail option is used.
  • Update CLI execution process to bypass check execution if an error is encountered during a fetcher processing. This is only applicable when fetchers and checks are executed as part of a single command execution.
  • Update documentation by providing content about the "fast fail" option. Content should include "fast fail" behavior for fetchers, checks and fetchers/checks combined. Provide details on the state of the local locker when execution is aborted due to "fast fail".

Security and Privacy

N/A

Test Plan

  • Test fetcher only execution
  • Test check only execution (If a check errors further processing (reports, fixers, notifiers) will not run)
  • Test combined fetcher/check execution
    • If a fetcher errors then no checks are to run
    • If a check errors further processing (reports, fixers, notifiers) will not run
  • Ensure current functionality is not changed when not using the --fastfail option
Lingua principale
Python
Stelle
77
Fork
24
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ComplianceAsCode/auditree-framework

Tutte le issue di ComplianceAsCode/auditree-framework

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.