diff --git a/CHANGES.md b/CHANGES.md index 415b0c51..0804d441 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -13,6 +13,13 @@ development source code and as such may not be routinely kept up to date. # __NEXT__ +## Bug fixes + +* We've fixed and future-proofed a compatibility bug with a third-party library + that can occur under very specific conditions when `nextstrain build` submits + AWS Batch jobs. + ([#261](https://github.com/nextstrain/cli/pull/261)) + # 6.2.0 (28 February 2023) diff --git a/nextstrain/cli/runner/aws_batch/jobs.py b/nextstrain/cli/runner/aws_batch/jobs.py index b79d3d84..e4729930 100644 --- a/nextstrain/cli/runner/aws_batch/jobs.py +++ b/nextstrain/cli/runner/aws_batch/jobs.py @@ -288,9 +288,11 @@ def override_definition(base_definition_name: str, image: str) -> str: derived_definition["jobDefinitionName"] = derived_definition_name derived_definition["containerProperties"]["image"] = image - # These are AWS-assigned keys returned by describe_job_definitions() which + # Remove AWS-assigned keys returned by describe_job_definitions() which # aren't supported as keyword arguments by register_job_definition(). - for key in {'jobDefinitionArn', 'revision', 'status'}: + register_inputs = batch.meta.service_model.operation_model("RegisterJobDefinition").input_shape.members + + for key in set(derived_definition) - set(register_inputs): del derived_definition[key] batch.register_job_definition(**derived_definition)