Skip to content

Commit 741b5f6

Browse files
committed
Update (base update)
[ghstack-poisoned]
1 parent 5662a59 commit 741b5f6

2 files changed

Lines changed: 8 additions & 12 deletions

File tree

aws/lambda/gha-log-uploader/lambda_function.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
# Base64-encoded PEM, the same encoding torchci uses for its app key
3535
GITHUB_APP_PRIVATE_KEY = os.environ.get("GITHUB_APP_PRIVATE_KEY")
3636
BUCKET_NAME = "ossci-raw-job-status"
37-
LOG_CLASSIFIER_URL = "https://vwg52br27lx5oymv4ouejwf4re0akoeg.lambda-url.us-east-1.on.aws"
37+
LOG_CLASSIFIER_URL = (
38+
"https://vwg52br27lx5oymv4ouejwf4re0akoeg.lambda-url.us-east-1.on.aws"
39+
)
3840

3941
GITHUB_API_URL = "https://api.github.com"
4042
# Installation tokens last an hour. Refresh early so a warm invocation never

aws/lambda/gha-log-uploader/test_lambda_function.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,7 @@
22
from unittest.mock import MagicMock, patch
33

44
import lambda_function
5-
from lambda_function import (
6-
classify_log,
7-
download_log,
8-
installation_token,
9-
parse_event,
10-
)
5+
from lambda_function import classify_log, download_log, installation_token, parse_event
116

127

138
def make_response(status_code, content=b"log data", headers=None):
@@ -296,11 +291,10 @@ def test_a_github_blip_propagates_so_lambda_retries(self, s3):
296291
lambda_function,
297292
"download_log",
298293
side_effect=lambda_function.requests.RequestException("boom"),
299-
):
300-
with self.assertRaises(lambda_function.requests.RequestException):
301-
lambda_function.lambda_handler(
302-
{"repo": "pytorch/pytorch", "job_id": 5}, None
303-
)
294+
), self.assertRaises(lambda_function.requests.RequestException):
295+
lambda_function.lambda_handler(
296+
{"repo": "pytorch/pytorch", "job_id": 5}, None
297+
)
304298

305299

306300
if __name__ == "__main__":

0 commit comments

Comments
 (0)