Skip to content

Commit

Permalink
Fix issue with ConfigSecretVolumeItem
Browse files Browse the repository at this point in the history
  • Loading branch information
Molaire committed Aug 14, 2023
1 parent 97036b7 commit 9bf1c61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tron/config/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ def _asdict(self) -> dict:
d = super()._asdict().copy()
items = d.get("items", [])
if items is not None and items:
# the config parsing code appears to be turning arrays into tuples - however, updating the
# code we think is at fault breaks a non-trivial amount of tests. in the interest of time, we're
# just casting to a list here, but we should eventually circle back here
# and either ensure that we always get a list from the config parse code OR document that we're
# expecting Tron's config parsing code to return immutable data if this is behavior we want to depend on.
d["items"] = list(d["items"])
for i, item in enumerate(items):
if isinstance(item, ConfigSecretVolumeItem):
d["items"][i] = item._asdict()
Expand Down

0 comments on commit 9bf1c61

Please sign in to comment.