Open raddevon opened 1 year ago
This is really strange. I just launched UTM (a macOS GUI for QEMU), and I got the same thing — notifications for all of my EdgeDB instances. 🤔
Just closed it and re-launched it, and I didn't get the notifications. Seems it was only on initial launch of UTM.
I don't see any code that touches other services on upgrade. So probably this is some MacOS bug that shows notifications of all services when one is changed, as confirmed by UTM launch.
Can you also try upgrading an instance after UTM is installed and look whether UTM is also shown in notifications? (i.e. confirm that this is not EdgeDB-specific issue).
I have only ever seen these "off-topic" notifications referencing the edgedb
service although I have quite a few other background services running. Here's a partial list of some non-edgedb
services I run:
I run close to a dozen non-edgedb
services, and I've only ever seen notifications referencing those when installing the associated apps.
Looks like #1058 should fix it. Would you mind testing it git version? We do rewrite .plist
files on stop/start currently. So to test it you can stop and then start your instances (each of them separately, or just some of them to see that there are less notifications). And then do whatever was triggering this notification (i.e. the upgrade of some instance).
I don't mind testing it. How would I do that? I'm not sure how to run the CLI out of a particular branch.
If you have Rust installed run in the edgedb-cli repository:
git fetch
git checkout suppress_bg
cargo run -- instance stop -I <inst_name>
cargo run -- instance start -I <inst_name>
cargo run -- instance upgrade --force -I <other_inst_name>
You may also run cargo run --release -- <cli args>
to make CLI run faster (at the expense of the slower build).
This looks great, @tailhook! When I upgraded the instance, I got only the single notification. 🎉
It appears this didn't fix the issue after all, @tailhook (or else there has been a regression). This morning, I upgraded the CLI and created a new instance. Got a notification for each instance on my machine again.
Did you upgrade to the nightly? I think we didn't make a stable release.
I'm on 3.2.0-dev.1003+c9675ed
That might be because this fix only applies to newly created instances, i.e. it does not retroactively apply to all existing service units. IIRC we regenerate unit files on a stop
/start
cycle, so @raddevon, please try doing that to your old instances and see if the issue persists or not.
OK, so I would stop/start all of my instances to regenerate all unit files, upgrade the CLI again, and create a new instance? Am I understanding correctly, @elprans?
It seems this is also happening for instances a user has already destroyed according to a Discord user. See the thread attached to this message: https://discord.com/channels/841451783728529451/849377751370432573/1119215483183452180
Hm, non-removing service files is weird indeed. Can you try destroying the instance with logging enabled?
RUST_LOG=info edgedb instance destroy -I name
Otherwise, I'll try reproduce it on monday.
I can't reproduce it myself. Service files are removed as expected on my MacOS 11.2.
For those seeing the issue, does running sfltool resetbtm
from the terminal help? There was an issue with launch agents in Ventura (https://discussions.apple.com/thread/254341579?sortBy=rank) that occasionally shows up with this symptom.
When upgrading a local instance to a new server version, I get one OS-level notification that a background item has been added for each instance running on my system. I would expect to get only one for the newly upgraded instance.
Update: I've just noticed that I also get these notifications after restarting my system. I do not get any notifications for other background services, but I get one per EdgeDB instance upon restart. Added this as an alternative reproduction.
Steps to Reproduce:
or