Fix display_version comparison to account for 100+ versions (#423)

This commit is contained in:
Anna Scholtz 2022-04-29 11:38:15 -07:00 коммит произвёл GitHub
Родитель 35e3f93a03
Коммит 40054cd3fe
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -28,6 +28,10 @@ WORKDIR /app
# First copy requirements so we can take advantage of docker caching. # First copy requirements so we can take advantage of docker caching.
COPY requirements/*.txt /app/ COPY requirements/*.txt /app/
# temporary workaround for the following error: ImportError: cannot import name 'Feature' from 'setuptools'
RUN pip install setuptools==45
RUN pip install --require-hashes --no-cache-dir -r all.txt RUN pip install --require-hashes --no-cache-dir -r all.txt
COPY . /app COPY . /app

Просмотреть файл

@ -5,6 +5,10 @@ services:
image: postgres:9.5-alpine image: postgres:9.5-alpine
logging: logging:
driver: "none" driver: "none"
ports:
- "5432:5432"
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
redis: redis:
image: redis:3.2-alpine image: redis:3.2-alpine

Просмотреть файл

@ -113,8 +113,8 @@ def update_measures(application_name, platform_name, channel_name,
WHERE WHERE
submission_date = \'{submission_date.strftime('%Y-%m-%d')}\' submission_date = \'{submission_date.strftime('%Y-%m-%d')}\'
AND application = \'{params['application_name']}\' AND application = \'{params['application_name']}\'
AND display_version > \'{params['min_version']}\' AND mozfun.norm.truncate_version(display_version, \'major\') > {params['min_version']}
AND display_version < \'{params['max_version']}\' AND mozfun.norm.truncate_version(display_version, \'major\') < {params['max_version']}
AND build_id > \'{params['min_build_id']}\' AND build_id > \'{params['min_build_id']}\'
AND build_id < \'{params['max_build_id']}\' AND build_id < \'{params['max_build_id']}\'
AND os_name = \'{params['os_name']}\' AND os_name = \'{params['os_name']}\'