Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

dont break on debug logs #296

Merged
merged 5 commits into from
Jul 14, 2023
Merged

dont break on debug logs #296

merged 5 commits into from
Jul 14, 2023

Conversation

jakekaplan
Copy link
Contributor

The retrieved task definition looks something like this:

{'compatibilities': ['EC2', 'FARGATE'],
 'containerDefinitions': [{'cpu': 0,
                           'environment': [],
                           'essential': True,
                           'image': 'prefecthq/prefect:2-python3.10',
                           'mountPoints': [],
                           'name': 'prefect',
                           'portMappings': [],
                           'volumesFrom': []}],
 'cpu': '1024',
 'family': 'prefect__ecs-task-flow__ecs-task-deployment',
 'memory': '2048',
 'networkMode': 'awsvpc',
 'placementConstraints': [],
 'registeredAt': datetime.datetime(2023, 2, 23, 16, 52, 39, 140000, tzinfo=tzlocal()),
 'registeredBy': 'arn:aws:sts::576866164297:assumed-role/AWSReservedSSO_PowerUserAccess_8115307ed553845e/andrew.h@prefect.io',
 'requiresAttributes': [{'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.18'},
                        {'name': 'ecs.capability.task-eni'}],
 'requiresCompatibilities': ['FARGATE'],
 'revision': 1,
 'status': 'ACTIVE',
 'taskDefinitionArn': 'arn:aws:ecs:us-east-2:576866164297:task-definition/prefect__ecs-task-flow__ecs-task-deployment:1',
 'volumes': []}

this can't be json.dumps because of the datetime. This pr changes json.dumps to default to str if we can't serialize

@jakekaplan jakekaplan requested a review from a team as a code owner July 12, 2023 21:02
Copy link
Contributor

@zzstoatzz zzstoatzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@jakekaplan jakekaplan merged commit 0458819 into main Jul 14, 2023
6 checks passed
@jakekaplan jakekaplan deleted the broken-debug-log branch July 14, 2023 18:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants