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

Hide useless logs and add useful ones #31

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Hide useless logs and add useful ones #31

merged 1 commit into from
Jan 29, 2024

Conversation

DonggeLiu
Copy link
Collaborator

Hide numerous download progress logs from wget2 and gsutil.
Add logs for cloud experiments to look for anomalies.

Use "" to prevent globbing and work splitting
@@ -354,7 +354,11 @@ def build_and_run(self, generated_project: str, target_path: str,
check=True,
cwd=oss_fuzz_checkout.OSS_FUZZ_DIR)
except sp.CalledProcessError as e:
print('Failed to evaluate target on cloud:', e.stdout, e.stderr)
print(f'Failed to evaluate {os.path.realpath(target_path)} on cloud:',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we migrate to logging.info,debug etc in a future PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes!
Created #34.

mkdir results-report
cd results-report
# Spin up the web server generating the report (and bg the process).
PYTHONPATH=. /venv/bin/python3 report/web.py "${RESULTS_DIR:?}" "${WEB_PORT:?}" &
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can be for another PR: Can we replace the PYTHONPATH invocation here?

Also one other thing, it's hard to use this script locally because the local venv path may be different. Can we instead just have this invoke python3 by default, and allow this to be overridden by e.g. PYTHON for infra usages?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can be for another PR: Can we replace the PYTHONPATH invocation here?

Yes, let me create another PR for this.

it's hard to use this script locally because the local venv path may be different. Can we instead just have this invoke python3 by default, and allow this to be overridden by e.g. PYTHON for infra usages?

Yep, good point!
I will address this in a separate PR.

@DonggeLiu DonggeLiu merged commit be5191f into main Jan 29, 2024
1 check passed
@DonggeLiu DonggeLiu deleted the better_logging branch January 29, 2024 23:32
@DonggeLiu DonggeLiu mentioned this pull request Jan 29, 2024
DonggeLiu added a commit that referenced this pull request Jan 30, 2024
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