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

Stream go build output #436

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Stream go build output #436

merged 1 commit into from
Apr 11, 2023

Conversation

sophiewigmore
Copy link
Member

Summary

Leverage the packit scribe.LogEmitter writer to stream go build logs in real-time

Use Cases

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@@ -98,7 +95,7 @@ func (p GoBuildProcess) Execute(config GoBuildConfiguration) ([]string, error) {

var paths []string
for _, target := range config.Targets {
buffer = bytes.NewBuffer(nil)
buffer := bytes.NewBuffer(nil)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We weren't logging anything about the go list process before, so I opted out of streaming the logs from that command to avoid cluttering the output. @paketo-buildpacks/go-maintainers let me know if you want me to add that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an example of what the go list output would be? Do we show it in the case of failure?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go list is what we use to determine the number of a name of binaries that we are going to compile when running go build it helps us assign a process type to every built. probably does not need to be streamed.

@sophiewigmore sophiewigmore self-assigned this Apr 11, 2023
@sophiewigmore sophiewigmore added the semver:patch A change requiring a patch version bump label Apr 11, 2023
@ForestEckhardt ForestEckhardt merged commit 72171f5 into main Apr 11, 2023
@ForestEckhardt ForestEckhardt deleted the stream-logs branch April 11, 2023 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants