Skip to content

Commit

Permalink
Merge branch 'main' into systemtest-gcp
Browse files Browse the repository at this point in the history
  • Loading branch information
relud authored May 3, 2024
2 parents a4043ea + c8166bd commit 9b7719f
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 171 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,4 +110,4 @@ workflows:
- main:
filters:
tags:
only: /.*/
only: /v.*/
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
echo DEPLOYMENT_ENV=prod >> "$GITHUB_ENV"
- name: Push the Docker image to GAR
if: env.IMAGE_TAG != ''
uses: mozilla-it/deploy-actions/docker-push@v3.9.0
uses: mozilla-it/deploy-actions/docker-push@v3.11.1
with:
local_image: local/antenna_deploy_base:latest
image_repo_path: ${{ secrets.DOCKER_IMAGE_PATH }}
Expand Down
14 changes: 12 additions & 2 deletions antenna/health_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from collections import OrderedDict
import json
import logging
import os

import falcon
import markus
Expand Down Expand Up @@ -35,11 +36,20 @@ def __init__(self, basedir):
def on_get(self, req, resp):
"""Implement GET HTTP request."""
mymetrics.incr("version.count")
version_info = json.dumps(get_version_info(self.basedir))
version_info = get_version_info(self.basedir)
# FIXME(willkg): there's no cloud provider environment variable to use, so
# we'll cheat and look at whether there's a "gcs" in
# CRASHMOVER_CRASHSTORAGE_CLASS; this is termporary and we can remove it
# once we've finished the GCP migration
version_info["cloud"] = (
"GCP"
if "gcs" in os.environ.get("CRASHMOVER_CRASHSTORAGE_CLASS", "")
else "AWS"
)

resp.content_type = "application/json; charset=utf-8"
resp.status = falcon.HTTP_200
resp.text = version_info
resp.text = json.dumps(version_info)


class LBHeartbeatResource:
Expand Down
1 change: 0 additions & 1 deletion bin/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ echo ">>> pytest"

export PYTHONPATH=/app/:${PYTHONPATH:-}
PYTEST="$(which pytest)"
PYTHON="$(which python)"

# Wait for services to be ready (both have the same endpoint url)
urlwait "${CRASHMOVER_CRASHPUBLISH_ENDPOINT_URL}" 15
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ services:
# https://hub.docker.com/r/localstack/localstack/
# localstack running a fake S3 and SQS
localstack:
image: localstack/localstack:1.1.0
image: localstack/localstack:3.4.0
environment:
- SERVICES=s3,sqs
- DEFAULT_REGION=us-east-1
Expand Down
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tool.ruff]
line-length = 88
target-version = "py311"

[tool.ruff.lint]
# Enable pycodestyle (E), pyflakes (F), bugbear (B), and bandit (S) rules
select = ["E", "F", "B", "S"]
line-length = 88
# Ignore line length violations that aren't fixed by formatting
ignore = ["E501"]
target-version = "py311"

[tool.ruff.flake8-quotes]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"

[tool.ruff.lint.per-file-ignores]
Expand Down Expand Up @@ -48,7 +49,7 @@ github_project = "antenna"
bugzilla_product = "Socorro"
bugzilla_component = "Infra"
main_branch = "main"
tag_name_template = "%Y.%m.%d"
tag_name_template = "v%Y.%m.%d"


[tool.service-status]
Expand Down
40 changes: 20 additions & 20 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Production requirements
attrs==23.1.0
boto3==1.28.78
botocore==1.31.78
datadog==0.47.0
dockerflow==2022.8.0
everett==3.2.0
falcon==3.1.1
fillmore==1.1.0
google-cloud-storage
attrs==23.2.0
boto3==1.34.95
botocore==1.34.95
datadog==0.49.1
dockerflow==2024.4.2
everett==3.3.0
falcon==3.1.3
fillmore==1.2.0
google-cloud-storage==2.16.0
gunicorn==22.0.0
isodate==0.6.1
markus==4.2.0
sentry-sdk==1.34.0
google-cloud-pubsub==2.19.3
sentry-sdk==1.45.0
google-cloud-pubsub==2.21.1

# Development requirements
bandit==1.7.5
bandit==1.7.8
click==8.1.7
freezegun==1.2.2
more-itertools==10.1.0
pip-tools==7.3.0
pytest==7.4.3
freezegun==1.5.0
more-itertools==10.2.0
pip-tools==7.4.1
pytest==8.2.0
requests==2.31.0
ruff==0.1.3
Sphinx==7.2.6
sphinx-rtd-theme==1.3.0
ruff==0.4.2
Sphinx==7.3.7
sphinx-rtd-theme==2.0.0
urlwait==1.0
werkzeug==3.0.1
werkzeug==3.0.2
Loading

0 comments on commit 9b7719f

Please sign in to comment.