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

Adds --stdout and --stderr args for writing output to files #57

Merged
merged 7 commits into from
Mar 13, 2019

Conversation

dleehr
Copy link
Member

@dleehr dleehr commented Mar 13, 2019

Adds optional command-line arguments to specify files for writing standard output and standard error

  • If specified, these files are written by piping through tee, meaning that stdout/stderr still are written to the kubernetes pod logs, but also to the named files.
  • This feature allows other tools that run calrissian in kubernetes (e.g. lando) to declare what files to write to, without a shell and without silencing job logs

Baseline functionality for #17

dleehr added 7 commits March 12, 2019 15:21
Python 3 raised ValueError: can't have unbuffered text I/O
…mode

- These streams fail to write text if they are binary
- Python 3 does not allow unbuffered text output
- Instead, just flush the streams at the end of the main function
- The tee process writes to stdout, so this was getting redirected into the stdout file
- Fixed by redirecting tee's output to stderr
@dleehr dleehr requested a review from johnbradley March 13, 2019 19:21
Copy link
Contributor

@johnbradley johnbradley left a comment

Choose a reason for hiding this comment

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

LGTM

@dleehr dleehr merged commit 4344785 into master Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants