Pass source-epoch to stages only if set

The client side does meta.get("source-epoch", default), but for
this to work we need to have the key unset if not specified,
but currently we set it to None.

Also, make sure the check for "not None" is explicit, because
we do consider a value of `0` to be a valid source-epoch.
This commit is contained in:
Alexander Larsson 2022-02-08 10:24:40 +01:00 committed by Christian Kellner
parent 1897eaf8bc
commit d57eeb38b9

View file

@ -96,11 +96,13 @@ class Stage:
def prepare_arguments(self, args, location):
args["options"] = self.options
args["meta"] = {
args["meta"] = meta = {
"id": self.id,
"source-epoch": self.source_epoch
}
if self.source_epoch is not None:
meta["source-epoch"] = self.source_epoch
# Root relative paths: since paths are different on the
# host and in the container they need to be mapped to
# their path within the container. For all items that