Skip to content

Commit

Permalink
Don't rely on other conditions to stop a live log
Browse files Browse the repository at this point in the history
Whether the log chunk size is zero or the request is not the first, the
live log must not stop. Only rely on the list of returning codes
recognized as final states to stop the live log.

This prevents the case of stopping the live log when the log chunk size
is zero, the request is not the first one, and the code returned by the
API is "finished". "finished" is not a final state, and the live log
page should keep requesting AJAX calls until the code returned is a
final one (like "succeeded", "failed", ...).
  • Loading branch information
eduardoj committed Mar 10, 2022
1 parent ecea7c1 commit 244ccc1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,6 @@ def update_build_log
# retry the last chunk again, because build compare overwrites last log lines
if @log_chunk.length.zero? && !@first_request && !@finished
@log_chunk = get_log_chunk(@project, @package_name, @repo, @arch, chunk_start, chunk_end)
@finished = true
end

old_offset = @offset
Expand Down

0 comments on commit 244ccc1

Please sign in to comment.