Details
- Reviewers
- None
- Group Reviewers
Reviewers - Maniphest Tasks
- T861: mimetype indexer: edge case makes the indexer fail miserably
- Commits
- rDCIDXa6ce5993e8e4: 'import magic' then check it's the right one, instead of using pkg_resources.
rDCIDXa8668c5cb5e3: Add support for python-magic in addition to file_magic, and make it the default.
Diff Detail
- Repository
- rDCIDX Metadata indexer
- Branch
- python-magic
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 8151 Build 11747: tox-on-jenkins Jenkins Build 11746: arc lint + arc unit
Event Timeline
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/189/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/189/console
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/190/ for more details.
swh/indexer/mimetype.py | ||
---|---|---|
34 | With this, the tool registration mechanism must change. With this, that becomes dynamic. Right now, the configuration is the one by default referencing python3-magic [1] [1] https://forge.softwareheritage.org/source/swh-indexer/browse/master/swh/indexer/mimetype.py$38-44 |
swh/indexer/mimetype.py | ||
---|---|---|
34 | Agreed. Let's put this diff on hold while we migrate to introspecting tools. |
requirements.txt | ||
---|---|---|
3 | I would keep file_magic by default here as python-magic is not packaged in Debian stretch (python3-magic deb package corresponds to file_magic). |
requirements.txt | ||
---|---|---|
3 | Might be related to a bug I also observed in the webapp, I used a dirty workaround that seems to do the job (see https://forge.softwareheritage.org/source/swh-web/browse/master/swh/web/browse/utils.py$71). |
requirements.txt | ||
---|---|---|
3 | Effectively, so backporting the python3-magic deb package from testing to stretch is required before production deployment. I could also benefit from it in the webapp and remove my dirty hack. |
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/191/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/192/ for more details.
swh/indexer/mimetype.py | ||
---|---|---|
15–20 | If they're both available with import magic, they're incompatible and shouldn't really be installed at the same time. Could we just check that the magic module has an attribute that's only available in the version we want, and fail importing if it doesn't? |
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/193/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/193/console
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/194/
See console output for more information: https://jenkins.softwareheritage.org/job/DCIDX/job/tox/194/console
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/196/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/198/ for more details.
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/199/ for more details.
I'm ok with the idea.
This needs to be in pending state or something.
This diff's code depends on a not-yet existing backport package python-magic to be built IIUC.
Build is green
See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/624/ for more details.