Unified logging approach for api and ingestion server#2380
Conversation
|
@ashiramin Can you add testing instructions for this change? It makes it much easier for maintainers to review the changes leading to reviews coming in sooner 🙂 |
@sarayourfriend Thank you for letting me know. I updated the testing instruction section in the PR description :) |
sarayourfriend
left a comment
There was a problem hiding this comment.
Looks good to me! I'll be happy to approve once @dhruvkb confirms whether the if condition is needed on "Cleanup ingestion-server test".
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
sarayourfriend
left a comment
There was a problem hiding this comment.
Apologies for not noticing this before, but I'd like to request that this change does not affect the local development experience by making the logs inaccessible locally. Before this change the logs would output to a file before the stack is torn down. I believe the easiest way to preserve this is to remove tearing down the stack from the Python script entirely. Instead, we can add test-logs test-clean-dc to test-local.
It would look something like this:
test-local:
pipenv run pytest {{ args }}
if [ -z "$CI" ]; then just test-logs && just test-clean-dc; fi
Please also update the test-clean-dc doc-comment as it'll now be regularly used.
|
Based on the low urgency of this PR, the following reviewers are being gently reminded to review this PR: @krysal Excluding weekend1 days, this PR was ready for review 9 day(s) ago. PRs labelled with low urgency are expected to be reviewed within 5 weekday(s)2. @ashiramin, if this PR is not ready for a review, please draft it to prevent reviewers from getting further unnecessary pings. Footnotes
|
@sarayourfriend made the change :) sorry it took me a bit longer. Please take a look |
sarayourfriend
left a comment
There was a problem hiding this comment.
Fantastic, thanks very much for your patience in the review process. I've tested this locally by running just ingestion_server/test-local with and without CI=1 and the behaviour is exactly as expected.
Thanks again very much for your contribution @ashiramin 🙏
stacimc
left a comment
There was a problem hiding this comment.
Thanks for your contribution and especially for your patience @ashiramin :)
Pinging @dhruvkb again for awareness, but I was able to test this locally and this looks good to me.
Fixes
Fixes #2031 by @dhruvkb
Description
Unified logging approach between api and ingestion server by logging container logs in ci/cd instead of inside python code. Now both
test-apiandtest-ingfollow a similar pattern of storing test logs..github/workflows/ci_cd.yml:ingestion_server/justfile:ingestion_server/test/integration_test.py:Testing Instructions
test-logscommand won't return anything since test containers are destroyeding_logsexists and has ingestion server test logs. This can be verified by downloadinging_logs.zipfileChecklist
Update index.md).main) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin