Skip to content

Drop Scalar.Service on macOS #458

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

Merged
merged 5 commits into from
Oct 29, 2020

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Oct 27, 2020

Getting ahead of this: Git v2.29.0.vfs.0.0 includes git maintenance start which can do most of our background maintenance. We enabled that for the Linux platform since that platform never had a C# service. This allows us to also drop the service on macOS (and all native code for macOS!).

Here are some other things that make this PR complete:

  1. Ensure that an upgrade will remove the Scalar service on macOS. The icon in the menu bar should disappear.
  2. Add a post-install step that runs the ConfigStep on all registered repositories. (We will run this on Linux as well in a later PR.)

For the 20.10.178 release, we only promoted background maintenance via
Git and cron for the Linux platform because it did not have a service
project. We are now removing the service on macOS, so use the background
maintenance on all platforms _except_ Windows.

Signed-off-by: Derrick Stolee <[email protected]>
Signed-off-by: Derrick Stolee <[email protected]>
This pre-install check was only checking if Git processes were
running, but that's not required for our installer. It reduces
our installer wizard by one extra click.

Signed-off-by: Derrick Stolee <[email protected]>
Before we delete the .plist files during install, make sure to clear
away the previous services and related processes.

Signed-off-by: Derrick Stolee <[email protected]>
Upon install, we can look for the Scalar-registered repos then
run 'scalar run config' do update whatever config options we have
updated since the last version.

Signed-off-by: Derrick Stolee <[email protected]>
@derrickstolee derrickstolee marked this pull request as ready for review October 28, 2020 18:29
@derrickstolee derrickstolee changed the title [WIP] drop Scalar.Service on macOS Drop Scalar.Service on macOS Oct 28, 2020
@derrickstolee derrickstolee merged commit f2072b6 into microsoft:main Oct 29, 2020
@derrickstolee derrickstolee mentioned this pull request Dec 1, 2020
derrickstolee added a commit that referenced this pull request Dec 17, 2020
In #458, we dropped the `Scalar.Service` application from the macOS platform and depended entirely on `git maintenance start` to initialize background maintenance. This had two issues:

1. The `cron`-based background maintenance does not sufficiently create a user environment for GCM Core to store credentials. This causes it to start loading pop-ups on the hour every hour for the `prefetch` task. This item is handled upstream as `ds/maintenance-part-4`, which creates platform-specific maintenance abilities, including macOS integration with `launchd`/`launchctl`.
2. The maintenance jobs don't look at the shared object cache! While we were depending on `git maintenance run --task=<task>` inside `scalar run <job>`, I forgot that `scalar run` sets `GIT_OBJECT_DIRECTORY` so something inside of `git maintenance run` needs to do the same. This is being answered by microsoft/git#301.

As for Scalar, the only thing we need to do is consume this new version of Git and test that `git maintenance run` does the same thing as `scalar run`. Hold it to the same standards.
derrickstolee added a commit that referenced this pull request Mar 11, 2021
…r cleanups

Brew updated their CLI. Hence, `scalar upgrade` is currently broken. Users will need to run `brew upgrade --cask scalar[-azrepos]` to upgrade to a version including this fix.

Further, since #458 dropped the Scalar service, the _next_ upgrade will fail because the service is still registered, just not running. Relax the conditions there.

I was also getting build failures locally around the internal verb parameters. They are no longer used, so just drop them. Keep the command-line reference around so we don't break compat with any potential consumers.
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