Skip to content

Commit

Permalink
fix: apply only supported attributes from resources decorator in batch (
Browse files Browse the repository at this point in the history
#1586)

* filter attributes pulled from resource_decorator for batch to only the supported ones.

* support all decorator attributes, not just resource_defaults
  • Loading branch information
saikonen committed Oct 24, 2023
1 parent abee358 commit 161a449
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metaflow/plugins/aws/aws_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def compute_resource_attributes(decos, compute_deco, resource_defaults):
# We use the non None value if there is only one or the larger value
# if they are both non None. Note this considers "" to be equivalent to
# the value zero.
#
# Skip attributes that are not supported by the decorator.
if k not in [*resource_defaults.keys(), *deco.attributes.keys()]:
continue

if my_val is None and v is None:
continue
if my_val is not None and v is not None:
Expand Down

0 comments on commit 161a449

Please sign in to comment.