-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ECTEEN-87: Fix circleci jobs. (#64)
* Fix ECTEEN-87
- Loading branch information
Showing
14 changed files
with
164 additions
and
86 deletions.
There are no files selected for viewing
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 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 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
Binary file removed
BIN
-6.91 KB
fixtures/normandy-nextgen-study-example-a@mozilla.org-0.3-signed.xpi
Binary file not shown.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM python:3.11 | ||
|
||
COPY ping_server.py /code/ | ||
|
||
WORKDIR /code | ||
|
||
RUN pip install flask | ||
|
||
ENTRYPOINT [ "python" ] | ||
|
||
CMD [ "ping_server.py" ] |
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
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) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 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
Oops, something went wrong.