-
Notifications
You must be signed in to change notification settings - Fork 2
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 ECTEEN-87: Fix circleci jobs. #64
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
FROM ubuntu:lunar | ||
FROM ubuntu:devel | ||
|
||
USER root | ||
|
||
|
@@ -11,8 +11,8 @@ ENV DEBIAN_FRONTEND=noninteractive \ | |
MOZ_HEADLESS=1 \ | ||
LC_ALL=C.UTF-8 \ | ||
LANG=C.UTF-8 \ | ||
FIREFOX_VERSION=112.0 \ | ||
GECKODRIVER_VERSION=0.33.0 | ||
FIREFOX_VERSION=120.0 \ | ||
GECKODRIVER_VERSION=0.34.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
# Install requirements to install tools | ||
RUN dependencies=' \ | ||
|
@@ -66,7 +66,8 @@ RUN mv /usr/bin/geckodriver /usr/bin/geckodriver2 \ | |
&& chmod +x /usr/bin/geckodriver | ||
|
||
# Install python deps | ||
RUN pip install -r requirements.txt | ||
RUN pip install poetry \ | ||
&& poetry install | ||
|
||
# Download older firefox nightly | ||
RUN FIREFOX_OLD_DOWNLOAD_URL=$(python3 utilities/download_old_firefox.py) \ | ||
|
b4handjr marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.10 | ||
b4handjr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
COPY ping_server.py /code/ | ||
|
||
WORKDIR /code | ||
|
||
RUN pip install flask | ||
|
||
ENTRYPOINT [ "python" ] | ||
|
||
CMD [ "ping_server.py" ] | ||
b4handjr marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
import json | ||
import os | ||
import zlib | ||
|
||
from flask import Flask, request | ||
from flask.json import jsonify | ||
|
||
app = Flask("ping_server") | ||
|
||
PINGS = [] | ||
|
||
|
||
@app.route("/pings", methods=["GET", "DELETE"]) | ||
def pings(): | ||
if request.method == "GET": | ||
return jsonify(PINGS) | ||
|
||
if request.method == "DELETE": | ||
PINGS.clear() | ||
return "" | ||
|
||
|
||
@app.route( | ||
"/submit/<path:telemetry>", | ||
methods=["POST"], | ||
) | ||
def submit(telemetry): | ||
|
||
if request.method == "POST": | ||
request_data = request.get_data() | ||
|
||
if request.headers.get("Content-Encoding") == "gzip": | ||
request_data = zlib.decompress(request_data, zlib.MAX_WBITS | 16) | ||
|
||
ping_data = json.loads(request_data) | ||
|
||
# Store JSON data to self.pings to be used by wait_for_pings() | ||
PINGS.append(ping_data) | ||
return "" | ||
return "" | ||
|
||
|
||
if __name__ == "__main__": | ||
port = int(os.environ.get("PORT", 5000)) | ||
app.run(debug=True, host="0.0.0.0", port=port) | ||
b4handjr marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ profile = "black" | |
skip_gitignore = true | ||
|
||
[tool.mypy] | ||
python_version = "3.10" | ||
python_version = "3.11" | ||
b4handjr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
disable_error_code = "attr-defined" | ||
disallow_untyped_calls = false | ||
follow_imports = "normal" | ||
|
@@ -43,6 +43,7 @@ pytest-rerunfailures = "^13.0" | |
mypy = "^1.8.0" | ||
isort = "^5.13.2" | ||
flake8 = "^7.0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really relevant to anything (but I do enjoy me some linting topics; and apparently commenting on merged PRs)… Anyways... in case you're bored one day and wanted to see how ruff compares to other toolings. 🤷 |
||
beautifulsoup4 = "^4.12.3" | ||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: Why 120? https://whattrainisitnow.com/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't matter too much as there is a script to update it to the latest version on line 48