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

Hammer stdout logs do not always match file logs #27

Open
langston-barrett opened this issue Feb 15, 2016 · 1 comment
Open

Hammer stdout logs do not always match file logs #27

langston-barrett opened this issue Feb 15, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@langston-barrett
Copy link
Contributor

When a build script fails, Hammer logs that failure to its own stdout/stderr. However the "stdout" and "stderr" fields of that log line can be empty while the log files in logs/ are populated with the real stdout and stderr of running the build script. The expected behavior is that these would be identical.

@langston-barrett
Copy link
Contributor Author

Here's some more information that might be helpful while debugging this issue:

Sample spec:

---
name: test
version: 1.2.3
iteration: 1
license: ASL 2.0
description:  a test
url: https://github.com/test/test
vendor: test
type: rpm

targets:
  - src: '{{.BuildRoot}}/{{.Name}}'
    dest: '/usr/bin/{{.Name}}'

scripts:
  build: |
    echo "testing stdout"
    >&2 echo "testing stderr"
    exit 1

Logs:

test ➤ hammer build --log-level=debug
INFO[0000] loading packages                              root=/...
DEBU[0000] loading package                               path=/...
DEBU[0000] starting setup stage                          name=test stage=setup
INFO[0000] finished setup stage                          name=test stage=setup
DEBU[0000] starting build stage                          name=test stage=build
ERRO[0000] build script exited with a non-zero exit code  error=exit status 1 name=test stderr= stdout=
ERRO[0000] could not complete stage                      error=exit status 1 name=test stage=build
test ➤ cat logs/test-2016-06-14T12:50:13+01:00-stdout.log 
testing stdout% 
test ➤ cat logs/test-2016-06-14T12:50:13+01:00-stderr.log 
testing stderr%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant