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

All: Drop the modern-syslog dependency, always use console directly #631

Merged
merged 1 commit into from
Mar 8, 2025

Conversation

mgol
Copy link
Member

@mgol mgol commented Mar 7, 2025

Writing logs to syslog made sense when we run the Download Builder on machines running a lot of other things. Now we're using Digital Ocean droplets where we deploy Docker images which already provides isolation.

In addition to that, Digital Ocean provides a view of console logs, but the build & deploy phases only print regular console logs, not syslog messages. This made debugging a recent deploy crash much harder than it should have been.

Writing logs to syslog made sense when we run the Download Builder on machines
running a lot of other things. Now we're using Digital Ocean droplets where we
deploy Docker images which already provides isolation.

In addition to that, Digital Ocean provides a view of console logs, but the
build & deploy phases only print regular console logs, not syslog messages. This
made debugging a recent deploy crash much harder than it should have been.
@mgol mgol added Needs review Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Mar 7, 2025
@mgol mgol requested review from Krinkle and timmywil March 7, 2025 23:45
@mgol mgol self-assigned this Mar 7, 2025
Copy link
Member

@Krinkle Krinkle left a comment

Choose a reason for hiding this comment

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

Makes sense to me!

@Krinkle
Copy link
Member

Krinkle commented Mar 8, 2025

@mgol I'm surprised DigitalOcean's App Platform doesn't forward syslog by default into the build output (or expose it somewhere else). No concern from my side.

@mgol mgol removed Needs review Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Mar 8, 2025
@mgol mgol merged commit 0530834 into jquery:main Mar 8, 2025
4 checks passed
@mgol mgol deleted the no-syslog branch March 8, 2025 13:10
@mgol
Copy link
Member Author

mgol commented Mar 8, 2025

I merged this & I pushed the commit to the deployed branch and the deploy logs now were:

[2025-03-08 17:13:10] Image Cache Cleanup: { cached: 0, deleted: 0 }
[2025-03-08 17:13:10] Built Packages Cache Cleanup: { cached: 0, deleted: 0 }
[2025-03-08 17:13:10] HTTP Server running at http://0.0.0.0:8080
[2025-03-08 17:13:10] Caught exception: TypeError: Cannot read properties of undefined (reading 'toString')
[2025-03-08 17:13:10]     at /app/lib/themeroller-image.js:347:24
[2025-03-08 17:13:10]     at Socket.<anonymous> (/app/lib/themeroller-image.js:52:12)
[2025-03-08 17:13:10]     at Socket.emit (node:events:529:35)
[2025-03-08 17:13:10]     at endReadableNT (node:internal/streams/readable:1400:12)
[2025-03-08 17:13:10]     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[]

instead of the previous enigmatic:

[2025-03-06 17:07:12] HTTP Server running at http://0.0.0.0:8080
[]

The goal was achieved then. The fix is at #632.

I was not too worried about pushing a known broken commit as Digital Ocean automatically reverts to the last good image and the site is working as it used to.

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

Successfully merging this pull request may close these issues.

2 participants