Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into gui-add-qr-code
Browse files Browse the repository at this point in the history
  • Loading branch information
Max-7 committed Jun 21, 2021
2 parents f22bc3d + 2d2dfe2 commit 1ba4b2b
Show file tree
Hide file tree
Showing 522 changed files with 5,406 additions and 3,654 deletions.
127 changes: 89 additions & 38 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ trigger:
- '*'

variables:
python.version: '3.6'
python.version: '3.7'
# pyinstaller is picky on the version to use
python.version_for_macos_packaging: '3.8'
postgresql.version: '10'
winfsp.version: '1.7.20172'
postgresql.version: '12'
winfsp.version: '1.8.20304'
pytest.base_args: |
--log-level=DEBUG \
--durations=10 -v \
Expand Down Expand Up @@ -42,7 +42,8 @@ jobs:
set -eux
sudo apt-get update
python --version
pip install pip --user --upgrade
# pip 20.3 introduces the new dependency resolver
pip install pip>=20.3 --user --upgrade
pip install -r pre-requirements.txt
displayName: 'Bootstrap'
- bash: |
Expand Down Expand Up @@ -74,6 +75,28 @@ jobs:
python --version
pip install pre-commit
displayName: 'Bootstrap'
- bash: |
set -eux
# Commit signature is not mandatory for the repo (yet ?), however we
# want to make sure the signed commits are actually valid.
# Indeed, it seems the signature process breaks from time to time,
# see for instance commit 1e1535b010050c025d85b685e96e08db5e9cd7bb
# that is considered invalid, but has been generated 3mn after the valid
# 2df2c661a4774097615b7f66078207b15a56316b on the same computer with
# the same key...)
python -c "
from urllib.request import urlopen
import json
import re
match = re.match(r'refs/pull/([0-9]+)/merge', '$(Build.SourceBranch)')
if match:
pr_id = match.group(1)
r = urlopen(f'https://api.github.com/repos/Scille/parsec-cloud/pulls/{pr_id}/commits')
bad_commits = [c['sha'] for c in json.load(r) if c['commit']['verification']['reason'] == 'invalid']
if bad_commits:
raise SystemExit(f'''Invalid signatures in commits: {', '.join(bad_commits)}''')
"
displayName: 'Commits signatures'
- bash: |
set -eux
# Patch .pre-commit-config.yaml to force mixed-line-ending checks to LF
Expand All @@ -83,8 +106,7 @@ jobs:
pre-commit run --all-files --show-diff-on-failure
displayName: 'Pre-commit hooks check'
- bash: |
if ([[ $(Build.SourceBranch) = "refs/heads/master" ]] || [[ $(Build.SourceBranch) = "refs/tags/"* ]])
then exit 0; fi
# PRs must contain a newsfragment
for FILENAME in newsfragments/*
do
# If file never existed in master, consider as a new newsfragment
Expand All @@ -94,6 +116,7 @@ jobs:
then exit 0; fi
done
echo "NO NEW NEWSFRAGMENT FOUND" >&2
condition: eq(variables['Build.Reason'], 'PullRequest')
displayName: 'Newsfragment'
failOnStderr: true
- bash: |
Expand Down Expand Up @@ -125,7 +148,8 @@ jobs:
set -eux
sudo apt-get update
python --version
pip install pip --user --upgrade
# pip 20.3 introduces the new dependency resolver
pip install pip>=20.3 --user --upgrade
pip install -r pre-requirements.txt
sudo apt-get install \
postgresql-$(postgresql.version) \
Expand All @@ -139,7 +163,7 @@ jobs:
# Install the parsec wheel with all dependencies
WHEEL=$(ls $(Pipeline.Workspace)/wheel/parsec_cloud-*.whl)
echo $WHEEL
pip install --use-feature=2020-resolver $WHEEL[all]
pip install $WHEEL[all]
# Check dependency compatibility
pip check parsec[all]
displayName: 'Install'
Expand All @@ -152,6 +176,7 @@ jobs:
displayName: 'Tests memory'
- bash: |
set -eux
# `test_cli.py` uses `--postgresql` option to test DB migration cli
py.test $(pytest.base_args) \
tests/backend tests/test_cli.py --postgresql --runslow \
-n auto --max-worker-restart=0 -x \
Expand Down Expand Up @@ -209,7 +234,8 @@ jobs:
- bash: |
set -eux
python --version
pip install pip --user --upgrade
# pip 20.3 introduces the new dependency resolver
pip install pip>=20.3 --user --upgrade
pip install -r pre-requirements.txt
brew install \
postgres \
Expand All @@ -224,26 +250,25 @@ jobs:
# Install the parsec wheel with all dependencies
WHEEL=$(ls $(Pipeline.Workspace)/wheel/parsec_cloud-*.whl)
echo $WHEEL
pip install --use-feature=2020-resolver $WHEEL[all]
pip install $WHEEL[all]
# Check dependency compatibility
pip check parsec[all]
displayName: 'Install'
# Postgresql tests almost working, but _run function in tests/test_cli.py gives
# returncode of 1 instead of 0. Removed test_cli.py from this call as temporary fix
# doing tests only on tests/backend/*
# - bash: |
# set -eux
# py.test $(pytest.base_args) \
# tests/backend --postgresql --runslow \
# -n auto --max-worker-restart=0 -x \
# --junitxml=test-results-postgresql.xml
# displayName: 'Tests postgresql'
- bash: |
set -eux
py.test $(pytest.base_args) \
tests --runmountpoint --runslow -m mountpoint -x \
--junitxml=test-results-mountpoint.xml
displayName: 'Tests mountpoint'
tests --runmountpoint --runslow \
-n auto --max-worker-restart=0 -x \
--junitxml=test-results-memory.xml
displayName: 'Tests memory'
- bash: |
set -eux
# `test_cli.py` uses `--postgresql` option to test DB migration cli
py.test $(pytest.base_args) \
tests/backend tests/test_cli.py --postgresql --runslow \
-n auto --max-worker-restart=0 -x \
--junitxml=test-results-postgresql.xml
displayName: 'Tests postgresql'
#- bash: |
# set -eux
# py.test $(pytest.base_args) \
Expand Down Expand Up @@ -287,12 +312,14 @@ jobs:
- bash: |
set -eux
python.exe --version
pip install pip --user --upgrade
pip uninstall pipx -y # dunno why this thing is here...
# pip 20.3 introduces the new dependency resolver
pip install pip>=20.3 --user --upgrade
pip install -r pre-requirements.txt
choco install -y --limit-output winfsp --pre --version=$(winfsp.version)
choco install -y --limit-output winfsp --version=$(winfsp.version)
# Install winfsp-test and put it in PATH
mkdir winfsp-test
curl -L https://github.com/billziss-gh/winfsp/releases/download/v1.7/winfsp-tests-1.7.20172.zip -o winfsp-test/winfsp-tests.zip
curl -L https://github.com/billziss-gh/winfsp/releases/download/v1.8/winfsp-tests-1.8.20304.zip -o winfsp-test/winfsp-tests.zip
unzip winfsp-test/winfsp-tests.zip -d winfsp-test
echo "##vso[task.prependpath]$(Build.SourcesDirectory)\\winfsp-test"
displayName: 'Bootstrap'
Expand All @@ -304,7 +331,7 @@ jobs:
WHEEL_DIRECTORY=`python -c 'print(r"$(Pipeline.Workspace)/wheel".replace("\\\\", "/"))'`
WHEEL=$(ls $WHEEL_DIRECTORY/parsec_cloud-*.whl)
echo $WHEEL
pip install --use-feature=2020-resolver $WHEEL[all]
pip install $WHEEL[all]
# Check dependency compatibility
pip check parsec[all]
# Check winfsp-tests availability
Expand Down Expand Up @@ -386,9 +413,22 @@ jobs:
cp $(Build.SourcesDirectory)/setup.py src
cp $(Build.SourcesDirectory)/README.rst src
cp $(Build.SourcesDirectory)/HISTORY.rst src
VERBOSE_TAG=`git -C $(Build.SourcesDirectory) describe --tag`
sed -i "s#^\\(__version__ = \\).*\$#\\1'$VERBOSE_TAG'#" src/parsec/_version.py
sed -i "s/__PARSEC_VERSION__/$VERBOSE_TAG/" snap/snapcraft.yaml
# Retrieve Parsec version and customize it if we are not building on a tag
# See https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
if ([[ $(Build.SourceBranch) = "refs/tags/"* ]])
then
# Use tag name as version
VERSION=`git -C $(Build.SourcesDirectory) describe --tag`
else
# Use `<tag_name>+dev<commit_hash>` as version
VERSION=`sed -n 's/^__version__ = "\\(.*\\)"$/\\1/p' $(Build.SourcesDirectory)/parsec/_version.py`
COMMIT=`git -C $(Build.SourcesDirectory) rev-parse --verify --short HEAD`
VERSION="$VERSION.$COMMIT"
fi
echo "Version label: $VERSION"
sed -i "s#^\\(__version__ = \\).*\$#\\1'$VERSION'#" src/parsec/_version.py
sed -i "s/__PARSEC_VERSION__/$VERSION/" snap/snapcraft.yaml
# Now build the snap !
snapcraft --destructive-mode
mkdir dist
cp parsec*.snap dist
Expand Down Expand Up @@ -455,24 +495,35 @@ jobs:
modifyEnvironment: true
- bash: |
set -eux
pip install pip --user --upgrade
# pip 20.3 introduces the new dependency resolver
pip install pip>=20.3 --user --upgrade
# Path with backslash are a pain...
SOURCES_DIRECTORY=`python -c 'print(r"$(Build.SourcesDirectory)".replace("\\\\", "/"))'`
TEMP_DIRECTORY=`python -c 'print(r"$(Agent.TempDirectory)".replace("\\\\", "/"))'`
VERBOSE_TAG=`git -C $SOURCES_DIRECTORY describe --tag`
sed -i "s#^\\(__version__ = \\).*\$#\\1'$VERBOSE_TAG'#" $SOURCES_DIRECTORY/parsec/_version.py
# Retrieve Parsec version and customize it if we are not building on a tag
# See https://www.python.org/dev/peps/pep-0440/#local-version-identifiers
if ([[ $(Build.SourceBranch) = "refs/tags/"* ]])
then
# Use tag name as version
VERSION=`git -C $SOURCES_DIRECTORY describe --tag`
else
# Use `<tag_name>+dev<commit_hash>` as version
VERSION=`sed -n 's/^__version__ = "\\(.*\\)"$/\\1/p' $SOURCES_DIRECTORY/parsec/_version.py`
COMMIT=`git -C $SOURCES_DIRECTORY rev-parse --verify --short HEAD`
VERSION="$VERSION.$COMMIT"
fi
echo "Version label: $VERSION"
sed -i "s#^\\(__version__ = \\).*\$#\\1'$VERSION'#" $SOURCES_DIRECTORY/parsec/_version.py
cp -R $SOURCES_DIRECTORY/packaging/win32/ winbuild
displayName: 'Prepare build'
workingDirectory: $(Agent.TempDirectory)
# Must use cmd.exe here instead of bash otherwise `C:\Program Files\Git\bin\link.exe`
# takes priority over visual studio link.exe in PATH
- script: |
python freeze_parsec.py $(Build.SourcesDirectory)
python freeze_program.py $(Build.SourcesDirectory)
displayName: 'Freeze Parsec'
workingDirectory: $(Agent.TempDirectory)/winbuild
- bash: |
set -eux
curl -L https://github.com/billziss-gh/winfsp/releases/download/v1.7/winfsp-1.7.20172.msi -o winfsp-1.7.20172.msi
makensis.exe installer.nsi
mkdir dist
cp build/parsec*-setup.exe dist
Expand Down Expand Up @@ -521,8 +572,8 @@ jobs:

- job: 's4_linux_snap_upload'
displayName: 'Upload snap'
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
dependsOn: [s0_build_wheel, s1_qa, s1_linux_test, s1_macos_test, s1_windows_test, s2_linux_snap_build, s2_macos_app_build, s2_windows_installer_build, s3_linux_snap_test]
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))
timeoutInMinutes: 10
pool:
vmImage: 'ubuntu-latest'
Expand All @@ -547,8 +598,8 @@ jobs:

- job: 's4_wheel_pypi_upload'
displayName: 'Upload wheel on PyPI'
condition: startsWith(variables['build.sourceBranch'], 'refs/tags/')
dependsOn: [s0_build_wheel, s1_qa, s1_linux_test, s1_macos_test, s1_windows_test, s2_linux_snap_build, s2_macos_app_build, s2_windows_installer_build, s3_linux_snap_test]
condition: and(succeeded(), startsWith(variables['build.sourceBranch'], 'refs/tags/'))
timeoutInMinutes: 10
pool:
vmImage: 'ubuntu-latest'
Expand Down
5 changes: 4 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
rev: v0.812
hooks:
- id: mypy
additional_dependencies: [trio_typing, pendulum]
# Mypy will complain if it find two files with the same name which
# are not part of a package (typically occurs for packaging script helpers)
files: ^(parsec|tests)/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3 # Use the ref you want to point at
hooks:
Expand Down
112 changes: 112 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,118 @@ History
.. towncrier release notes start
Parsec v2.3.1 (2021-05-10)
--------------------------

Bugfixes
~~~~~~~~

* Fix blocking calls related to the local storage that might slow down the
application. (`#1713 <https://github.com/Scille/parsec-cloud/issues/1713>`__)
* Fix a regression that broke the "Remount workspace at a given timestamp"
button. (`#1723 <https://github.com/Scille/parsec-cloud/issues/1723>`__)

Miscellaneous internal changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Update recommanded macFUSE version to 4.1.0 for mountpoint on macOS. (`#1718
<https://github.com/Scille/parsec-cloud/issues/1718>`__)


Parsec v2.3.0 (2021-05-04)
--------------------------

Features
~~~~~~~~

* Allow read access to a workspace during a re-encryption. (`#1650
<https://github.com/Scille/parsec-cloud/issues/1650>`__)

Bugfixes
~~~~~~~~

* Fixed Dock icon behaviour on MacOS when app was closed with red X. (`#1519
<https://github.com/Scille/parsec-cloud/issues/1519>`__)
* Fix the server's stucking while it waits for a peer. (`#1625
<https://github.com/Scille/parsec-cloud/issues/1625>`__)
* Added filename normalization to fix conflicts on special characters on MacOS.
(`#1645 <https://github.com/Scille/parsec-cloud/issues/1645>`__)
* Fix confusing dialog when logging out with an on-going reencryption. (`#1663
<https://github.com/Scille/parsec-cloud/issues/1663>`__)
* Fix some blinking with the workspace buttons, especially while doing a
reencryption. (`#1665 <https://github.com/Scille/parsec-
cloud/issues/1665>`__)
* Enforce NFC string normalization for organization/device/user/entry id and
human handle. (`#1708 <https://github.com/Scille/parsec-
cloud/issues/1708>`__)
* Fix an issue with fuse mounpoints on linux where the shutdown procedure might
block forever (`#1716 <https://github.com/Scille/parsec-
cloud/issues/1716>`__)

Miscellaneous internal changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Update CLI command `parsec core bootstrap_organization` to accept params for
human/device label/email. (`#1674 <https://github.com/Scille/parsec-
cloud/issues/1674>`__)
* Improve synchronization performance by running the block uploads in parallel
(`#1678 <https://github.com/Scille/parsec-cloud/issues/1678>`__)
* Improve Windows installer for smaller size and faster install time. Also fix
uninstall when previous version has been installed in a custom location.
(`#1690 <https://github.com/Scille/parsec-cloud/issues/1690>`__)


Parsec v2.2.4 (2021-03-18)
--------------------------

Features
~~~~~~~~

* Made password validation stronger in the GUI (`#1601
<https://github.com/Scille/parsec-cloud/issues/1601>`__)
* Added MacOS Big Sur compatibility (`#1640 <https://github.com/Scille/parsec-
cloud/issues/1640>`__)

Bugfixes
~~~~~~~~

* Fix server event dispatching when a PostgreSQL database connection terminates
unexpectedly. (`#1634 <https://github.com/Scille/parsec-
cloud/issues/1634>`__)
* Fix unhandled exception in GUI when offline and workspace author UserInfo is
not in cache. Fix view on inconstent files in GUI. (`#1641
<https://github.com/Scille/parsec-cloud/issues/1641>`__)
* Fixed a mountpoint issue in MacOS that could cause errors during login or
unmounting a workspace. (`#1644 <https://github.com/Scille/parsec-
cloud/issues/1644>`__)
* Fixed style issues on dark mode MacOS (`#1646
<https://github.com/Scille/parsec-cloud/issues/1646>`__)
* Fix issue where workspace preview does not update when changes are made while
on maintenance. (`#1658 <https://github.com/Scille/parsec-
cloud/issues/1658>`__)

Deprecations and Removals
~~~~~~~~~~~~~~~~~~~~~~~~~

* Remove massively unused `--log-filter` option from `core gui` and `backend
run` commands. (`#1639 <https://github.com/Scille/parsec-
cloud/issues/1639>`__)

Client/Backend API evolutions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Bump api version to 1.3; Add the number of workspaces in the organization
stats (`#1655 <https://github.com/Scille/parsec-cloud/issues/1655>`__)

Miscellaneous internal changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Fix backend server infinite wait on HTTP-invalid incoming request. (`#1611
<https://github.com/Scille/parsec-cloud/issues/1611>`__)
* Disable logging to file by default when running the GUI client. (`#1638
<https://github.com/Scille/parsec-cloud/issues/1638>`__)


Parsec v2.2.3 (2021-01-29)
--------------------------

Expand Down
Loading

0 comments on commit 1ba4b2b

Please sign in to comment.