[2.0.0rc7] progress updates not sent to plugins if printTimeLeft is not None

Aperta Adatta ai principianti
#5,485 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Leggi il blocco di report del progresso in src/octoprint/printer/standard.py intorno alle righe collegate nell’issue, poi confrontalo con la versione 1.x e il commit c7f7cdfcb19107fb0a51fcdf37d3527fd36a29a8 per vedere come è stata introdotta la guardia printTimeLeft. Controlla i test printer esistenti sotto tests/printer/ ed esegui il modulo pertinente per stabilire una baseline. Fatto significa che ProgressPlugin.on_print_progress() viene invocato al variare del progresso anche quando printTimeLeft è None, con un test che copre il caso saltato in precedenza.

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

Descrizione

triage
The problem

Hi, I think there's a regression compared to Octoprint 1.x

In the 1.x releases, the progress updates are reported to plugins, unless the progress is None, in standard.py. This has been working great.

However, in the 2.x branch, the progress updates are only reported if printTimeLeft is not None, in standard.py, but printTimeLeft is not always None.

While investigating missing progress notifications in OctoPod, I noticed that ProgressPlugin.on_print_progress() is called at 0% when a print starts, but never again as the print progresses.

I added logging at the very beginning of OctoPod's on_print_progress() callback. It logged the initial progress=0, but nothing afterward, even though http calls to /api/job reported:

{
  "completion": 14.000000000000002,
  "printTimeLeft": 7500,
  "printTimeLeftOrigin": "printer"
}

I believe this impacts all plugins that depend on progress updates (octopod in my case): they do not receive progress updates at all during the prints. This was introduced in this commit, earlier on the 2.x branch

I'm unfamiliar with Octoprint's codebase, so I might be missing something, but I'd say if you moved the progress reporting back outside of this printTimeLeft condition, similar to 1.x code, that would solve this issue.

Thanks in advance for your time!

Did the issue persist even in safe mode?

I cannot test this issue in safe mode (state why below)

If you could not test in safe mode, please state why ("currently printing" is NOT an excuse!)

I need to observe the impact of this issue on plugins.

Version of OctoPrint

2.0.0rc7

Operating system running OctoPrint

Linux

Browser and version of browser, operating system running browser

No response

Printer model & used firmware incl. version

Prusa Core One, firmware 8.0.0, but same previously on 6.5.7

Systeminfo Bundle

octoprint-systeminfo-20261115152506.zip[^bundle1]

Checklist of files to include below
  • Contents of the JavaScript browser console (always include in cases of issues with the user interface)
  • Screenshots and/or videos showing the problem (always include in case of issues with the user interface)
  • GCODE file with which to reproduce (always include in case of issues with GCODE analysis or printing behaviour)
Additional information & file uploads

I'm sending the systeminfo bundle, with the serial logs at the point where the print progress is 37% while octopod never received any progress update.

[^bundle1]: octoprint-systeminfo-20261115152506.zip (bundleviewer) (download)
OctoPrint: 2.0.0rc7
Python: 3.14.10
OS: Linux-6.12.95+deb12-amd64-x86_64-with-glibc2.41
Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/157.0.0.0 Safari/537.36

Lingua principale
Python
Stelle
9.2k
Fork
1.7k
Merge medio
4g 21h
PR unite (30g)
6

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 OctoPrint/OctoPrint

Tutte le issue di OctoPrint/OctoPrint

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.