Skip to content
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

Bump urllib3 from 1.26.18 to 1.26.19 in /backend/lambda_layers/aws_sdk #416

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions backend/ecs_tasks/delete_files/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ def build_matches(cols, manifest_object):
map(
lambda c: {
"MatchIds": matches[
COMPOSITE_MATCH_TOKEN.join(c["Columns"])
if "Columns" in c
else c["Column"]
(
COMPOSITE_MATCH_TOKEN.join(c["Columns"])
if "Columns" in c
else c["Column"]
)
],
**c,
},
Expand Down
2 changes: 1 addition & 1 deletion backend/ecs_tasks/delete_files/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ boto3==1.24.38
s3transfer==0.6.0
numpy==1.22.0
cryptography==42.0.4
urllib3>=1.26.18
urllib3>=1.26.19
aws-assume-role-lib>=2.10.0
tenacity==8.0.1
22 changes: 11 additions & 11 deletions backend/ecs_tasks/delete_files/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
# pip-compile --output-file=backend/ecs_tasks/delete_files/requirements.txt backend/ecs_tasks/delete_files/requirements.in
#
aws-assume-role-lib==2.10.0
# via -r requirements.in
# via -r backend/ecs_tasks/delete_files/requirements.in
boto3==1.24.38
# via
# -r requirements.in
# -r backend/ecs_tasks/delete_files/requirements.in
# aws-assume-role-lib
botocore==1.27.38
# via
Expand All @@ -17,39 +17,39 @@ botocore==1.27.38
cffi==1.16.0
# via cryptography
cryptography==42.0.4
# via -r requirements.in
# via -r backend/ecs_tasks/delete_files/requirements.in
jmespath==1.0.1
# via
# boto3
# botocore
numpy==1.22.0
# via
# -r requirements.in
# -r backend/ecs_tasks/delete_files/requirements.in
# pandas
# pyarrow
pandas==1.4.3
# via -r requirements.in
# via -r backend/ecs_tasks/delete_files/requirements.in
pyarrow==14.0.1
# via -r requirements.in
# via -r backend/ecs_tasks/delete_files/requirements.in
pycparser==2.21
# via cffi
python-dateutil==2.8.2
# via
# botocore
# pandas
python-snappy==0.6.1
# via -r requirements.in
# via -r backend/ecs_tasks/delete_files/requirements.in
pytz==2023.3.post1
# via pandas
s3transfer==0.6.0
# via
# -r requirements.in
# -r backend/ecs_tasks/delete_files/requirements.in
# boto3
six==1.16.0
# via python-dateutil
tenacity==8.0.1
# via -r requirements.in
urllib3==1.26.18
# via -r backend/ecs_tasks/delete_files/requirements.in
urllib3==1.26.19
# via
# -r requirements.in
# -r backend/ecs_tasks/delete_files/requirements.in
# botocore
6 changes: 3 additions & 3 deletions backend/ecs_tasks/delete_files/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@ def get_requester_payment(client, bucket):
return (
remove_none(
{
"RequestPayer": "requester"
if request_payer["Payer"] == "Requester"
else None,
"RequestPayer": (
"requester" if request_payer["Payer"] == "Requester" else None
),
}
),
request_payer,
Expand Down
2 changes: 1 addition & 1 deletion backend/lambda_layers/aws_sdk/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
boto3==1.24.38
urllib3>=1.26.18
urllib3>=1.26.19
aws-assume-role-lib>=2.10.0
2 changes: 1 addition & 1 deletion backend/lambda_layers/aws_sdk/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ s3transfer==0.6.0
# via boto3
six==1.16.0
# via python-dateutil
urllib3==1.26.18
urllib3==1.26.19
# via
# -r backend/lambda_layers/aws_sdk/requirements.in
# botocore
2 changes: 1 addition & 1 deletion backend/lambda_layers/boto_utils/python/boto_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def json_lines_iterator(content, include_unparsed=False):
for i, line in enumerate(lines):
try:
parsed = json.loads(line)
except (json.JSONDecodeError) as e:
except json.JSONDecodeError as e:
raise ValueError(
"Serialization error when parsing JSON lines: {}".format(
str(e).replace("line 1", "line {}".format(i + 1)),
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/data_mappers/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
DataMapper handlers
"""

import json
import os

Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/jobs/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Job handlers
"""

import json
import os

Expand Down
31 changes: 16 additions & 15 deletions backend/lambdas/jobs/stats_updater.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Job Stats Updater
"""

import json
import logging

Expand Down Expand Up @@ -33,9 +34,9 @@ def _aggregate_stats(events):
stats += Counter(
{
"TotalQueryCount": 1,
"TotalQuerySucceededCount": 1
if event_name == "QuerySucceeded"
else 0,
"TotalQuerySucceededCount": (
1 if event_name == "QuerySucceeded" else 0
),
"TotalQueryFailedCount": 1 if event_name == "QueryFailed" else 0,
"TotalQueryScannedInBytes": event_data.get("Statistics", {}).get(
"DataScannedInBytes", 0
Expand All @@ -53,18 +54,18 @@ def _aggregate_stats(events):
]:
stats += Counter(
{
"TotalObjectUpdatedCount": 1
if event_name == "ObjectUpdated"
else 0,
"TotalObjectUpdateSkippedCount": 1
if event_name == "ObjectUpdateSkipped"
else 0,
"TotalObjectUpdateFailedCount": 1
if event_name == "ObjectUpdateFailed"
else 0,
"TotalObjectRollbackFailedCount": 1
if event_name == "ObjectRollbackFailed"
else 0,
"TotalObjectUpdatedCount": (
1 if event_name == "ObjectUpdated" else 0
),
"TotalObjectUpdateSkippedCount": (
1 if event_name == "ObjectUpdateSkipped" else 0
),
"TotalObjectUpdateFailedCount": (
1 if event_name == "ObjectUpdateFailed" else 0
),
"TotalObjectRollbackFailedCount": (
1 if event_name == "ObjectRollbackFailed" else 0
),
}
)

Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/jobs/status_updater.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Job Status Updater
"""

import json
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/queue/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Queue handlers
"""

import random
import json
import os
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/settings/handlers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Settings handlers
"""

import json

import boto3
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/check_queue_size.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to check the SQS Queue Size
"""

import boto3

from decorators import with_logging
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/check_task_count.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to check the number of running and pending tasks
"""

import logging
import boto3

Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/emit_event.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to emit events
"""

from uuid import uuid4

from boto_utils import emit_event
Expand Down
12 changes: 7 additions & 5 deletions backend/lambdas/tasks/execute_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ def make_query(query_data):
queryable_matches = (
cast_as_str.format(escape_column(col["Column"]))
if is_simple
else cast_as_str.format(escape_column(col["Columns"][0]))
if len(col["Columns"]) == 1
else "concat({})".format(
columns_composite_join_token.join(
"t.{0}".format(escape_column(c)) for c in col["Columns"]
else (
cast_as_str.format(escape_column(col["Columns"][0]))
if len(col["Columns"]) == 1
else "concat({})".format(
columns_composite_join_token.join(
"t.{0}".format(escape_column(c)) for c in col["Columns"]
)
)
)
)
Expand Down
9 changes: 6 additions & 3 deletions backend/lambdas/tasks/generate_queries.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task for generating Athena queries from glue catalog aka Query Planning
"""

import json
import os
import boto3
Expand Down Expand Up @@ -434,9 +435,11 @@ def column_mapper(col):
result = {
"Name": col["Name"],
"Type": result_type,
"CanBeIdentifier": col["CanBeIdentifier"]
if "CanBeIdentifier" in col
else result_type in ALLOWED_TYPES or type_is_decimal_with_precision,
"CanBeIdentifier": (
col["CanBeIdentifier"]
if "CanBeIdentifier" in col
else result_type in ALLOWED_TYPES or type_is_decimal_with_precision
),
}

if has_children:
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/orchestrate_ecs_service_scaling.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to orchestrate scaling for a ECS Service
"""

import boto3

from decorators import with_logging
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/purge_queue.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to purge an SQS queue
"""

import boto3

from decorators import with_logging
Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/scan_table.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Task to scan a DynamoDB table
"""

import boto3
from boto3.dynamodb.types import TypeDeserializer

Expand Down
1 change: 1 addition & 0 deletions backend/lambdas/tasks/submit_query_results.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Submits results from Athena queries to the Fargate deletion queue
"""

import os

import boto3
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ typing-extensions==4.6.0
# aws-sam-translator
# black
# pydantic
urllib3==1.26.18
urllib3==1.26.19
# via
# -r ./backend/ecs_tasks/delete_files/requirements.txt
# -r ./backend/lambda_layers/aws_sdk/requirements.txt
Expand Down
4 changes: 3 additions & 1 deletion tests/unit/ecs_tasks/test_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,9 @@ def test_it_gets_tagging_args():
client.get_object_tagging.return_value = {
"TagSet": [{"Key": "a", "Value": "b"}, {"Key": "c", "Value": "d"}]
}
assert {"Tagging": "a=b&c=d",} == get_object_tags(
assert {
"Tagging": "a=b&c=d",
} == get_object_tags(
client, "bucket", "key"
)[0]

Expand Down
Loading