Page MenuHomePhabricator

[nix] add logs to console while waiting for MariaDB to come up
ClosedPublic

Authored by ginsu on Sep 18 2023, 2:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 4:46 AM
Unknown Object (File)
Sun, Nov 3, 4:36 AM
Unknown Object (File)
Fri, Nov 1, 1:30 AM
Unknown Object (File)
Fri, Nov 1, 1:29 AM
Unknown Object (File)
Fri, Nov 1, 1:29 AM
Unknown Object (File)
Fri, Nov 1, 1:29 AM
Unknown Object (File)
Fri, Nov 1, 1:29 AM
Unknown Object (File)
Tue, Oct 15, 4:25 AM
Subscribers

Details

Reviewers
atul
varun
bartek
ashoat
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rCOMM0bdf8c8da1a4: [nix] add logs to console while waiting for MariaDB to come up
Summary

My nix environment got messed up when my laptop updated MacOS. @atul and I spent pretty much all day troubleshooting and at different points of the investigation were led astray since this sleep in this while loop hangs w/o giving any info to the dev. The actual issue was related to a DB corruption issue which required me to nuke my db and start from scratch. While this diff does not solve the underlying issue we hope that at the very least these logs might give any future devs who run into this issue a better idea of where to look.

In this Linear comment, @ashoat @atul and I discuss adding this log

Only in the case that issues are occurring. There's a sleep in a while loop when things are in the broken state, so it just hangs without giving the developer any useful information. If instead we did something loosely like echo "waiting for MariaDB Socket" && sleep 1 it might give the developer an idea of where to look.

Linear issue: https://linear.app/comm/issue/ENG-4980/ginsu-nix-issues

Test Plan

n/a

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Sep 18 2023, 2:00 PM
ginsu added reviewers: atul, varun, bartek.
ginsu requested review of this revision.Sep 18 2023, 2:20 PM
nix/mariadb-up-mac.nix
82–83 ↗(On Diff #31232)

I think we should either flip these two, or drop line 80

(Avoids saying the same thing at the same time twice)

address comments. (changed log to say "Still waiting for MariaDB socket" in hopes that this is more clear/explicit)

Looks good, left comments but they're purely personal preference so feel free to land as is

nix/mariadb-up-mac.nix
80 ↗(On Diff #31239)

I would maybe cut this line altogether

82 ↗(On Diff #31239)

Maybe make this sleep 3 or sleep 5?

83 ↗(On Diff #31239)
This revision is now accepted and ready to land.Sep 20 2023, 1:52 PM
ashoat requested changes to this revision.Sep 20 2023, 2:30 PM

What is the point of the outer if here...?

Also I think the sleep should come after the echo

This revision now requires changes to proceed.Sep 20 2023, 2:30 PM

simplify/address comments

This revision is now accepted and ready to land.Sep 21 2023, 1:01 PM