Граф коммитов

94 Коммитов

Автор SHA1 Сообщение Дата
Kevin Meinhardt 04cf44bbb2
Merge requirements files and document dependency management (#21838) 2024-02-21 13:20:01 +01:00
Mathieu Pillard 0c5c155e4b
Remove local mirror of MySQL repo (#21901)
* Revert "Build local mysql apt mirror to work around upstream repo breakage  (#21018)"

This reverts commit 550a4a4754.

* Update MySQL GPG key

* Stop forcing buster
2024-02-21 12:30:00 +01:00
Andrew Williamson b1b0de11a5
Update Dockerfile
add missing `/`
2023-07-19 12:34:15 +01:00
Mathieu Pillard 550a4a4754
Build local mysql apt mirror to work around upstream repo breakage (#21018)
* Build local mysql apt mirror to work around upstream repo breakage
2023-07-19 13:18:05 +02:00
Mathieu Pillard 7730f6f3bb
Drop Django 3.2 tests (#20693) 2023-05-15 14:51:24 +02:00
Andrew Williamson e8d549c6c2
Enable django4.2 deployment (#20612)
* allow django41 installation via make; add CI matrix

* ManifestStaticFilesStorage with sourceMappingURL

* test against django4.2rc1

* import django.core.files.File directly

* handle django4.2 being precise with timeuntil

* bump django4.2 to release

* fix reviewer tools css/js

* don't downgrade django3.2

* prettier fix

* handle timesince being more picky (again)

* default to django42
2023-04-26 09:44:31 +01:00
Mathieu Pillard 5c0e7a3c88
Merge deployment and development Dockerfiles (#20480)
* Merge deployment and development Dockerfiles
* Stop using root to install dependencies
* Run make commands from os with --user olympia
2023-03-23 15:46:56 +01:00
Andrew Williamson d3d85ade8c
replace geoip lookup with HTTP_X_COUNTRY_CODE request header (#19603) 2022-08-24 15:18:28 +01:00
Andrew Williamson d42c7750f5
upgrade to python 3.10 (#19568)
* run CI with python3.10

* change Dockerfile.deploy too
2022-08-17 18:25:13 +01:00
Mathieu Pillard 41d4eba243
Upgrade pygit2 to 1.10.0, remove libgit2-dev dependency (#19570)
We shouldn't need libgit2-dev anymore (and it outdated anyway) because
the latest pygit2 versions provide precompiled wheels that match our
setup.
2022-08-17 10:18:46 +02:00
Andrew Williamson 837951428c
upgrade to python39 (#17945)
* upgrade to python3.9

* py3.9 fix - replace .getiterator with .iter

* include libgit2-dev in Dockerfile[.deploy] setup too
2021-09-22 14:52:54 +01:00
Andrew Williamson 1157e9c2cd
drop django2.2 compat (#17515)
* drop django22 CI & support in Dockerfile/Makefile

* rm obsolete fallbacks

* drop django-jsonfield-backport
2021-07-20 10:03:10 +01:00
Andrew Williamson 4b4b8b2407
default local dev to django3.2; deploy to addons-dev with 3.2 (#17452) 2021-07-08 10:31:48 +01:00
Mathieu Pillard 09030e01bb
Use MySQL client & libs, not MariaDB (#15932)
We're using MySQL 8.0 from MySQL, not MariaDB, so client libs should
follow for consistency - especially as MariaDB doesn't support the
default auth method MySQL 8 uses.

Also contains a slight refactor of the Dockerfile-s to have fewer
steps and be more consistent with each other.
2020-11-06 12:20:43 +01:00
Lucky Sivagurunathan cdb112303a
Add package-lock to version control (#14909) 2020-08-04 17:03:38 +02:00
William Durand cf2f6a7826
Switch to Terser for JS minification (#15129) 2020-07-31 16:24:53 +02:00
Mathieu Pillard 44808c2c91
Switch to Python 3.8 (#15074)
* Remove obsolete code to build a webext dictionary from a legacy one

* Simplify SafeZip initialization code

We don't need to store is_valid, since an exception will be raised
if something is invalid.

* Cleanup temporary directory for invalid zips in extract_extension_to_dest()

* Switch to Python 3.8

- Rename BadZipfile to BadZipFile as the former is deprecated
- Support BadZipFile being raised earlier (when instantiating
  the ZipFile) in validation process

* Also remove test for build_webext_dictionary_from_legacy

* Remove a stray `is_valid` on a `SafeZip` instance

* Fix test now that we consider badzipfile errors fatal
2020-07-29 12:05:10 +02:00
William Durand 94f792f86a
Add file after deps install in dockerfiles (#14247) 2020-05-12 13:12:35 +02:00
William Durand 09bbe0a616
Refactor get_mime_type_for_blob() (#14211) 2020-05-11 11:52:34 +02:00
championshuttler d17bc0b389 Upgrade docker image to latest Debian Buster 2020-04-20 18:17:55 +05:30
William Durand 57e7dffe7a
Update pygit2 to 1.1.1 (#13925) 2020-04-08 11:54:04 +02:00
William Durand e7b906b290
Revert "Update pygit2 to 1.1.1 (#13921)" (#13924)
This reverts commit 1107b0a00c.
2020-04-07 19:00:50 +02:00
William Durand 1107b0a00c
Update pygit2 to 1.1.1 (#13921) 2020-04-07 18:11:25 +02:00
Christopher Grebs b4ceb66311 Revert "Move to a rolling debian-testing release for libmagic and libg… (#13488)"
This reverts commit d0272a9b3a.
2020-02-18 17:51:34 +01:00
Christopher Grebs d0272a9b3a
Move to a rolling debian-testing release for libmagic and libg… (#13488)
* Move to a rolling debian-testing release for libmagic and libgit2

Fixes #13487
Unblocks #13391

And at least refs #12924, #12357 (these need further testing)

* Roll back temporary change
2020-02-18 11:15:17 +01:00
Mathieu Pillard fb1b722a6c
Update Dockerfile to no longer fetch geoip database
It's not needed for local envs. Geoip queries will fail, but that should be ok.

Fixes https://github.com/mozilla/addons-server/issues/13181
2020-01-09 17:02:36 +01:00
Christopher Grebs b9ac5f4413
Run dockerfile commands with correct user. (#12579)
This updates various things…

* make use o `--user` argument of pip and `$PYTHONUSERBASE` to install python libraries in the correct places where the `olympia` user has permissions
* Add a new `rootshell` command

Fixes #12366

* Correct if statement

* Use separate tag for easier testing

* Try running directly with user olympia

* Small cleanup

* Add docs

* Fix comment

* Add 'rootshell' command

* Build circleci for local dev

* Fix pip execution by using 'python -m' to fetch the correct pip

* Pick up upstream user/group for builds and implement PYTHONUSERBASE and PIP_USER

* Correctly pass USER_ID and GROUP_ID to Dockerfile when building

* Small cleanups

* Build our test branch

* Fall back to manual uploads for testing

* Cleanup

* Revert back to :latest tag
2019-10-22 11:24:05 +02:00
Andrew Williamson 6748a96134
move all the make commands that operate on a single container to Makefile-docker (#12121)
* move all the make commands that operate on a single container to Makefile-docker

* add default user to Dockerfile

* revert the PYTHON_COMMAND var change
2019-08-29 12:10:25 +01:00
Benjamin Forehand Jr fa6aed7253
Add python script for fxa email gen. (#11954)
* Add python script for fxa email gen.
2019-07-30 09:38:50 -05:00
Christopher Grebs f65c4e1ed3
Install libpcre3-dev to avoid pcre related warning 2019-07-19 15:48:59 +02:00
Christopher Grebs 0c6206eef3
Fix Dockerfile.deploy, add libmagic-dev update for prod/dev builds too.
Follow-up for #11690, refs #11534
2019-06-25 17:20:28 +02:00
Christopher Grebs cd86316dc2
Update 'file' version to fix json<->html detection for reviewe… (#11690)
* Update 'file' version to fix json<->html detection for reviewer api.

Fixes #11534

* Add fixture file

* Rollback to xenial, install libmagic-dev manually

* Add libmagic1 dependency too

* test amd64

* Add required libmagic-mgc dependency

* Add explaining comment

* Try out using ubuntu disco sources for libmagic installation

* Force installation from the disco repo.
2019-06-25 05:04:56 -07:00
Andrew Williamson 6aebb99b1f
remove support for django1.11 and python2 (#11195) 2019-04-15 15:17:10 +01:00
Andrew Williamson ec4ac13ad7
deploy django22 on -dev & defaul on local dev (#11025) 2019-03-27 11:37:52 +00:00
Mathieu Pillard 19e782a96d Stop building Python 2 images 2019-03-25 11:55:09 +01:00
pyup.io bot 12ef19a886 Update pygit2 to 0.28.0 (#10962)
This PR updates [pygit2](https://pypi.org/project/pygit2) from **0.27.4** to **0.28.0**.



<details>
  <summary>Changelog</summary>
  
  
   ### 0.28.0
   ```
   -------------------------

- Upgrade to libgit2 0.28
  `878 &lt;https://github.com/libgit2/pygit2/issues/878&gt;`_

- Add binary wheels for Linux
  `793 &lt;https://github.com/libgit2/pygit2/issues/793&gt;`_
  `869 &lt;https://github.com/libgit2/pygit2/pull/869&gt;`_
  `874 &lt;https://github.com/libgit2/pygit2/pull/874&gt;`_
  `875 &lt;https://github.com/libgit2/pygit2/pull/875&gt;`_
  `883 &lt;https://github.com/libgit2/pygit2/pull/883&gt;`_

- New ``pygit2.Mailmap``, see documentation
  `804 &lt;https://github.com/libgit2/pygit2/pull/804&gt;`_

- New ``Repository.apply(...)`` wraps ``git_apply(..)``
  `841 &lt;https://github.com/libgit2/pygit2/issues/841&gt;`_
  `843 &lt;https://github.com/libgit2/pygit2/pull/843&gt;`_

- Now ``Repository.merge_analysis(...)`` accepts an optional reference parameter
  `888 &lt;https://github.com/libgit2/pygit2/pull/888&gt;`_
  `891 &lt;https://github.com/libgit2/pygit2/pull/891&gt;`_

- Now ``Repository.add_worktree(...)`` accepts an optional reference parameter
  `814 &lt;https://github.com/libgit2/pygit2/issues/814&gt;`_
  `889 &lt;https://github.com/libgit2/pygit2/pull/889&gt;`_

- Now it&#39;s possible to set SSL certificate locations
  `876 &lt;https://github.com/libgit2/pygit2/issues/876&gt;`_
  `879 &lt;https://github.com/libgit2/pygit2/pull/879&gt;`_
  `884 &lt;https://github.com/libgit2/pygit2/pull/884&gt;`_
  `886 &lt;https://github.com/libgit2/pygit2/pull/886&gt;`_

- Test and documentation improvements
  `873 &lt;https://github.com/libgit2/pygit2/pull/873&gt;`_
  `887 &lt;https://github.com/libgit2/pygit2/pull/887&gt;`_

Breaking changes:

- Now ``worktree.path`` returns the path to the worktree directory, not to the
  `.git` file within
  `803 &lt;https://github.com/libgit2/pygit2/issues/803&gt;`_

- Remove undocumented ``worktree.git_path``
  `803 &lt;https://github.com/libgit2/pygit2/issues/803&gt;`_
   ```
   
  
</details>


 

<details>
  <summary>Links</summary>
  
  - PyPI: https://pypi.org/project/pygit2
  - Changelog: https://pyup.io/changelogs/pygit2/
  - Repo: http://github.com/libgit2/pygit2
</details>
2019-03-25 11:53:37 +01:00
Christopher Grebs f8d9198b50
Implement mimetype categorization for easier file-type / preview detection (#10750)
This implements more advanced file-type detection based on `python-magic` thus we don't rely on the files extensions anymore but actually verify their content (header) before serving it to the client and reviewer.

Fixes #10685  (and actually rewrites it's meaning)
2019-02-22 14:01:44 +01:00
Mathieu Pillard 34f21aa8f8
Stop storing ip_address in abuse reports - lookup country via geoip instead (#10745)
Stop storing ip_address in abuse reports - lookup country via geoip instead
2019-02-22 12:32:37 +01:00
Christopher Grebs f26a150086
Remove amo-validator, remove support for uploading legacy-addons. (#10553)
* Remove amo-validator, remove more support for uploading legacy-addons.

This is dropping most of our compatibility checks for legacy add-ons and
completely blocks them from being uploaded.

We workaround this block for mozilla-signed add-ons by issuing the same
error, just as a warning instead of an actual error.

This affected *loads* of our tests so the PR contains more test-changes
then I'd like.

In addition to that this PR adds file extension validation for uploads,
we only did that in our JavaScript and never in our code. So from now
on, we have a hard limit to only allow whatever is in
`VALID_EXTENSIONS`.

Further...

* drop amo-validator and related dependencies
* remove `dump_apps` management command
* removed unused fixture files from the repo

Fixes #10502

Future improvement idea for our test-suite: Unify add-on file fixtures
under one single folder to avoid any duplication.

There is most certainly some more improvements that could be made to
code and test structure but I went for the least changes, it's way too
huge already :-/

* Fix syntax error in JavaScript, thus ui tests

* Switch back to passing 'channel' around

* Move valid addon file extensions to constants/base

* Fix validate() call

* Fix more tests

* Update src/olympia/devhub/tests/test_views_validation.py

Co-Authored-By: EnTeQuAk <cg@webshox.org>

* Remove old comment

* Issue description specific only to Thunderbird and Seamonkey if targeting thunderbird or seamonkey
2019-02-01 08:52:04 +01:00
Mathieu Pillard af842876b7 Install Python3 in development container
This also adds support for specifiying which version to use when installing
packages, though at the moment it's not possible to switch python versions
without reinstalling everything, because both versions share /usr/local/bin
2019-01-14 16:19:47 +01:00
Christopher Grebs 8f7331bed7
Don't explicitly install npm, update Python to 2.7.15
Our docker builds were broken because of some inter-dependency weirdness
going on when you're installing npm and nodejs in one apt-get call. To
be honest I was too lazy to look up the actual root cause given the fix
is quite simple and npm is part of nodejs anyway.

This PR updates the Python version to 2.7.15 along the way.
2019-01-02 11:54:19 +01:00
Christopher Grebs 5655295e05
Run validator via subprocess, huge cleanup along the way (#9682)
This ports all amo-validator related code to run via subprocess. This
makes us less blocked by it not running on Python 3, there may still be
some installation / execution related bits to actually run it via python
2 instead of python 3 but that's something for later.

* Cleans up how and where we're setting _BIN settings for all the
binaries we're calling
* Backports `unicodehelper` from validator
* Removes `requeue_uploads` since it's been broken and unused for at
least 3-4 years
* Remove Standalone Add-on Compatibility Checker (/developers/addon/check-compatibility/)
* Remove compat-check related bits from standalone add-on upload
* Remove more bulk compat report stuff that isn't used anymore
* Removed zadmin application_versions.json view, unused

Fixes #9670
"Fixes" #8857
2018-10-16 08:30:16 +02:00
Christopher Grebs d6e85cea5a
Add pygit2 dependency. (#9497)
* Add debian stretch backports repo as discussed with @autrilla
* Add libgit2-dev dependency that's needed by pygit2 (via debian stretch
to get the proper version that's required by up-to-date pygit2)
* Add pygit 0.27.1

Fixes #9496
2018-09-24 13:15:49 +02:00
Christopher Grebs 0b807e2a5e
Add uuid to the list of packages installed in our Dockerfile 2018-08-30 09:48:26 +02:00
bqbn f922c5e1f2
Upgrade to use node 8 (#9188) 2018-08-17 10:35:25 -07:00
Andrew Williamson 3faf451dca
remove Stylus (#7820) 2018-03-19 22:19:31 +08:00
Mathieu Pillard 3ff221a52a Run new image uploads through pngcrush, add a command to handle existing ones
Icons and previews for both themes and non-themes should go through pngcrush.
For the existing content, the command `crush_images_for_top_addons` focuses
on the content displayed on landing pages only and should only be run once.
2018-02-27 01:52:45 +01:00
Christopher Grebs 50203d149e
don't remove things in update_deps then? 2018-02-19 18:59:29 +01:00
Christopher Grebs 07dee02dde
Use docker-compose restart instead of supervisorctl.
* Make also use of setting PYTHONDONTWRITEBYTECODE inside the docker
  image to reduce it's size considerably
* Remove some outdated code-parts
* Rename `olympia` inside our worker image to `olympia-worker`
* remove all build and cache folders after every `make update_deps`
  (which might help avoid any more package update/install ambiquities)

Fixes #7518
2018-02-19 17:47:51 +01:00
Andrew Williamson c05e4cfdf1
Generate static theme Preview on version submit (#7475) 2018-02-14 22:27:16 +08:00