Skip to content

Commit

Permalink
FIX: Remove restriction on attributes for PARENT sender type
Browse files Browse the repository at this point in the history
skipci
  • Loading branch information
cortadocodes committed Feb 6, 2025
1 parent 2c330fa commit 7b96f43
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions octue/cloud/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ def make_attributes(
}

if sender_type == "PARENT":
if forward_logs is None or save_diagnostics is None:
raise ValueError(
"`forward_logs` and `save_diagnostics` must be present in the attributes if the sender type is "
"'PARENT'."
)
if forward_logs:
attributes["forward_logs"] = bool(forward_logs)

attributes["forward_logs"] = bool(forward_logs)
attributes["save_diagnostics"] = save_diagnostics
attributes.update(make_minimal_dictionary(cpus=cpus, memory=memory, ephemeral_storage=ephemeral_storage))
attributes.update(
make_minimal_dictionary(
save_diagnostics=save_diagnostics,
cpus=cpus,
memory=memory,
ephemeral_storage=ephemeral_storage,
)
)

return attributes

0 comments on commit 7b96f43

Please sign in to comment.