Skip to content

Commit

Permalink
use correct deco for limiting keys. (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
saikonen authored Oct 24, 2023
1 parent 161a449 commit 06925b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metaflow/plugins/aws/aws_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def compute_resource_attributes(decos, compute_deco, resource_defaults):
Returns a dictionary of resource attr -> value (str).
"""
assert compute_deco is not None

supported_keys = set([*resource_defaults.keys(), *compute_deco.attributes.keys()])
# Use the value from resource_defaults by default (don't use None)
result = {k: v for k, v in resource_defaults.items() if v is not None}

Expand All @@ -111,7 +111,7 @@ def compute_resource_attributes(decos, compute_deco, resource_defaults):
# the value zero.
#
# Skip attributes that are not supported by the decorator.
if k not in [*resource_defaults.keys(), *deco.attributes.keys()]:
if k not in supported_keys:
continue

if my_val is None and v is None:
Expand Down

0 comments on commit 06925b4

Please sign in to comment.