Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: improve build log stream #7429

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

mgoltzsche
Copy link

@mgoltzsche mgoltzsche commented Jul 7, 2020

Improvements:

  • let build log methods return channel to let the caller
    handle streamed log lines within its own goroutine.
  • stream build log to long-term storage.
  • change storage provider interface to stream data.

Closes #7422

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

improve build log stream

Special notes for the reviewer(s)

Which issue this PR fixes

fixes #7422

pkg/logs/tekton_logging.go Outdated Show resolved Hide resolved
pkg/logs/tekton_logging.go Show resolved Hide resolved
@mgoltzsche mgoltzsche force-pushed the fix_build_log_stream branch from 5fdd1e4 to c7c8176 Compare July 7, 2020 16:31
go.sum Outdated Show resolved Hide resolved
@mgoltzsche mgoltzsche force-pushed the fix_build_log_stream branch 3 times, most recently from 8b3d387 to d2d4e1c Compare July 8, 2020 13:55
@mgoltzsche mgoltzsche force-pushed the fix_build_log_stream branch 4 times, most recently from 0ad26b1 to bf752fa Compare July 9, 2020 12:54
improvements:
* let build log methods return channel to let the caller
  handle streamed log lines within its own goroutine.
* stream build log to long-term storage.
* change storage provider interface to stream data.

Closes jenkins-x#7422

Signed-off-by: Max Goltzsche <mgoltzsche@cloudbees.com>
@mgoltzsche mgoltzsche force-pushed the fix_build_log_stream branch from bf752fa to e13cc93 Compare July 9, 2020 13:55
@mgoltzsche mgoltzsche changed the title WIP: refactor(build logs): improve build logging refactor: improve build log stream Jul 9, 2020
@abayer
Copy link
Contributor

abayer commented Jul 9, 2020

/lgtm

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abayer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot jenkins-x-bot merged commit 2647027 into jenkins-x:master Jul 9, 2020
abayer added a commit to abayer/jx that referenced this pull request Jul 20, 2020
For some reason, `io.Copy` was resulting in a "short write" error in
the build controller, and the best suspicion I've got at this point is
that it's a problem with the bucket writer closing early or something
along those lines. So let's instead go back to earlier behavior and
read the reader contents and write that directly rather than relying
on `io.Copy`.

fixes jenkins-x#7429 (hopefully!)

Signed-off-by: Andrew Bayer <andrew.bayer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stabilize & simplify build log stream
4 participants