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

Issue on log parsing logic implemented by PR#1335 #1426

Closed
DiegoTavares opened this issue Jul 18, 2024 · 3 comments
Closed

Issue on log parsing logic implemented by PR#1335 #1426

DiegoTavares opened this issue Jul 18, 2024 · 3 comments

Comments

@DiegoTavares
Copy link
Collaborator

The new parsing logic implemented by #1335 has an issue when it comes to consuming lines from stdout and stderr in the following loops:

         with open(self.rqlog.name, 'a') as f:
                # Convert to ASCII while discarding characters that can not be encoded
                for line in frameInfo.forkedCommand.stdout:
                    line = line.encode('ascii', 'ignore')
                    f.write(line.decode('ascii') + '\n')
                for line in frameInfo.forkedCommand.stderr:
                    line = line.encode('ascii', 'ignore')
                    f.write(line.decode('ascii') + '\n')

This logic has to wait until all content of stdout is consumed before consuming content from stderr, which means users monitoring the logs of running jobs will not have a real-time feed of what the job is doing. Besides that, a failure might cause the process to exit before giving it the change to have the content of stderr processed.

@DiegoTavares
Copy link
Collaborator Author

FYI @ramonfigueiredo

@ramonfigueiredo
Copy link
Collaborator

FYI @ramonfigueiredo

Ok. I'll take a look on that asap.

Thanks!

@ramonfigueiredo
Copy link
Collaborator

ramonfigueiredo commented Jul 18, 2024

@DiegoTavares

I created a new PR to fix this problem. See the PR #1427

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

No branches or pull requests

2 participants