-
Notifications
You must be signed in to change notification settings - Fork 172
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
Fix conversion issues regarding OpenJDK and pdfinfo #328
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This seems like the perfect solution. I tested in a series of scenarios of some commands failing. Other than the minor lint issues, feel free to merge. |
Remove a Poetry version pin to 1.2.2, which causes installation issues on systems with Python 3.11. The pin was originally introduced because Poetry 1.3 was deemed unstable, due to the following bugs: * #292 (comment) * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1029156 The first problem still stands, but we can circumvent it with the `--no-ansi` flag, at no functionality cost. The second problem has been resolved, but it never affected Ubuntu Focal in the first place. Refs #292
Add libqt5gui5 as a test dependency in the 'convert-test-docs' step. This package brings several other Qt and graphics libraries, which are the ones that we actually require to run the tests *with PySide6*. Else, we encounter this error: ``` Traceback (most recent call last): File "/home/circleci/project/dangerzone/gui/__init__.py", line 19, in <module> from PySide6 import QtCore, QtGui, QtWidgets ImportError: libEGL.so.1: cannot open shared object file: No such file or directory ``` Note that the same package is not required when importing PySide2.QtGui, which is why we hadn't encountered this issue before. Also, in the rest of our environments, we explicitly install libqt5gui5, in order to run the Dangerzone GUI.
deeplow
approved these changes
Feb 7, 2023
apyrgio
force-pushed
the
325-async
branch
2 times, most recently
from
February 7, 2023 16:06
fbd9d05
to
1a77c25
Compare
Fix an issue in our PyTest wrapper, that caused this recursion error: ``` File "shibokensupport/signature/loader.py", line 61, in feature_importedgc File "shibokensupport/feature.py", line 137, in feature_importedgc File "shibokensupport/feature.py", line 148, in _mod_uses_pysidegc File "/usr/lib/python3.10/inspect.py", line 1147, in getsourcegc lines, lnum = getsourcelines(object)gc File "/usr/lib/python3.10/inspect.py", line 1129, in getsourcelinesgc lines, lnum = findsource(object)gc File "/usr/lib/python3.10/inspect.py", line 954, in findsourcegc lines = linecache.getlines(file, module.__dict__)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 177, in __dict__gc self.__makeattr(name)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 157, in __makeattrgc result = importobj(modpath, attrname)gc File "/home/user/.cache/pypoetry/virtualenvs/dangerzone-hQU0mwlP-py3.10/lib/python3.10/site-packages/py/_vendored_packages/apipkg/__init__.py", line 75, in importobjgc module = __import__(modpath, None, None, ["__doc__"])gc File "shibokensupport/signature/loader.py", line 54, in feature_importgc RecursionError: maximum recursion depth exceededgc ``` This error seems to be related to pytest-dev/pytest#1794. By not importing `pytest` in our test wrapper, and instead executing directly, we can avoid it. Note that this seems to be triggered only by Shiboken6, which is why we hadn't previously encountered it.
Instead of reinstalling shadow-utils, use the actual fix that the Fedora devs have suggested (rpm --restore shadow-utils). The previous method does not seem to work on Fedora 37, and it threw the following error when building the development environment: Installed package shadow-utils-2:4.12.3-3.fc37.x86_64 (from koji-override-0) not available. Error: No packages marked for reinstall. Error: building at STEP "RUN dnf reinstall -y shadow-utils && dnf clean all": while running runtime: exit status 1
Drop PySide2 from our dependencies (previously used only on Linux environments) and use PySide6 in all dev environments. The reason is that PySide2 (from PyPI) does not support Python 3.11, and the variants that do (Fedora/Debian packages) need to backport fixes from PySide6. Our original attempt was to build PySide2 wheels for Python 3.11 but it was not simple, nor maintainable. So, we were left with two options: 1. Install Python 3.10 in dev environments that have Python 3.11 by default. 2. Use PySide6 in all of our environments. In both cases, we break package parity with the user's system, since we are not testing Dangerzone under the same conditions. However, since option (2) is forwards-compatible with where we want to move the project (use Qt6 and PySide6), we chose that one. Fixes #330
Run CI tests for Fedora 37 environments, now that we no longer require PySide2 as a dev dependency. Fixes #294
Commit d7be28e assumed that OpenJDK was required for the PDFtk package, which is no longer installed in the Dangerzone image, and thus was removed. Turns out that while LibreOffice does not depend on OpenJDK, it may produce corrupted PDFs if installed without it, and will not abort the operation. Reinstate OpenJDK to fix the issue of corrupted PDFs. Fixes #315
Convert the Dangerzone script that in the container to run commands asynchronously, via the asyncio module. The main advantage of this approach is that it's fast, easy, and safe to consume the command's streams, while the command is running in the background. Previously, we had implemented an approach that used non-blocking sockets, but those are easy to get wrong. For instance, timeouts were not exact, capturing output was brittle. Fixes #325
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the following conversion issues:
More importantly, we introduce async support in the Dangerzone script, which changes the way we run commands in the container.
Fixes #325
Fixes #315