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

NXDRIVE-2363: [macOS] Fix auto-update issues #2291

Merged
merged 1 commit into from Dec 9, 2020

Conversation

BoboTiG
Copy link
Contributor

@BoboTiG BoboTiG commented Dec 8, 2020

  • Fixed the SIGKILL:9 error when unmounting the volume. This was due to the xattr modification on the new folder. I am not sure why, but skipping that step fixed the issue.

  • Fixed the SIGKILL:9 error when unloading the Finder extenstion. This was due to the fact that the extension was stopped twice. The second time ended on error.

  • Removed the code looking for the FinderSync PID that was not working. The information is not really useful though.

  • Use the plistlib module to find the volume mount point, more reliable and future proof.

@nuxeojenkins
Copy link
Contributor

View issue in JIRA: NXDRIVE-2363: [macOS] Application auto-restart does not work since 4.3.0

@BoboTiG BoboTiG added the bugfix label Dec 9, 2020
@BoboTiG BoboTiG changed the title NXDRIVE-2363: Minor auto-update refactoring NXDRIVE-2363: [macOS Auto-updater refactoring and bug fixes Dec 9, 2020
@BoboTiG BoboTiG force-pushed the wip-NXDRIVE-2363-auto-update-improvments branch 2 times, most recently from 350dd7a to 08f27e6 Compare December 9, 2020 13:14
@BoboTiG BoboTiG changed the title NXDRIVE-2363: [macOS Auto-updater refactoring and bug fixes NXDRIVE-2363: [macOS] Fix auto-update issues Dec 9, 2020
@BoboTiG BoboTiG added macOS and removed improvement labels Dec 9, 2020
@BoboTiG BoboTiG force-pushed the wip-NXDRIVE-2363-auto-update-improvments branch from 08f27e6 to 361edc4 Compare December 9, 2020 13:18
- Fixed the `SIGKILL:9` error when unmounting the volume.
  This was due to the xattr modification on the new folder.
  I am not sure why, but skipping that step fixed the issue.

- Fixed the `SIGKILL:9` error when unloading the Finder extenstion.
  This was due to the fact that the extension was stopped twice.
  The second time ended on error.

- Removed the code looking for the FinderSync PID that was
  not working. The information is not really useful though.

- Use the `plistlib` module to find the volume mount point,
  more reliable and future proof.
@BoboTiG BoboTiG force-pushed the wip-NXDRIVE-2363-auto-update-improvments branch from 361edc4 to 8dec7d5 Compare December 9, 2020 13:44
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 9, 2020

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 2.27%.

Quality metrics Before After Change
Complexity 2.47 ⭐ 2.12 ⭐ -0.35 👍
Method Length 42.90 ⭐ 42.54 ⭐ -0.36 👍
Working memory 7.79 🙂 7.41 🙂 -0.38 👍
Quality 76.99% 79.26% 2.27% 👍
Other metrics Before After Change
Lines 503 523 20
Changed files Quality Before Quality After Quality Change
nxdrive/osi/darwin/darwin.py 77.62% ⭐ 78.30% ⭐ 0.68% 👍
nxdrive/updater/darwin.py 72.36% 🙂 79.73% ⭐ 7.37% 👍
nxdrive/updater/linux.py 81.50% ⭐ 81.25% ⭐ -0.25% 👎
nxdrive/updater/windows.py 93.23% ⭐ 91.98% ⭐ -1.25% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation
nxdrive/osi/darwin/darwin.py DarwinIntegration.send_content_sync_status 8 ⭐ 104 🙂 14 😞 54.00% 🙂 Extract out complex expressions
nxdrive/osi/darwin/darwin.py DarwinIntegration.is_partition_supported 5 ⭐ 101 🙂 14 😞 57.29% 🙂 Extract out complex expressions
nxdrive/osi/darwin/darwin.py DarwinIntegration.register_contextual_menu 0 ⭐ 44 ⭐ 10 😞 77.45% ⭐ Extract out complex expressions

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it by mentioning @sourcery-ai in a comment.

@BoboTiG BoboTiG merged commit a234f16 into master Dec 9, 2020
@BoboTiG BoboTiG deleted the wip-NXDRIVE-2363-auto-update-improvments branch December 9, 2020 14:14
@BoboTiG BoboTiG added this to the 4.5.0 milestone Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants