Skip to content

copy_ts() returns non-existent keys #172

Open
@khaeru

Description

@khaeru

@Jihoon discovered that copy_ts() returns Keys like:

[<copy ts -2e5ad320a27116a4:>, <copy ts 1df562ba0f86f8c8:>]

which should, instead, be strings like:

["copy ts -2e5ad320a27116a4", "copy ts 1df562ba0f86f8c8"]

Using the former, invalid keys as inputs to further computations leads to a no-op.

This is likely due to the use of genno.core.key.single_key():

k1 = rep.add("from_url", f"scenario {_id}", quote(other))
k2 = rep.add("get_ts", f"ts data {_id}", k1, filters)
return single_key(rep.add("store_ts", f"copy ts {_id}", "scenario", k2))

Since that's mainly for type checking, we can adjust like:

k_result = f"copy ts {_id}"
rep.add(k_result, "store_ts", "scenario", k2)
return k_result

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreportgenno-based reporting and post-solve processing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions