payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 25 forks source link

Metadata/UUIDs disable config option bug #426

Closed jo-basevi closed 2 months ago

jo-basevi commented 3 months ago

There’s a bug with configuring metadata: enable: false. This was added late on in the metadata/UUID changes. The idea behind this configuration option is that it would prevent the creation of new metadata files and UUIDs, and experiment name would either be:

The bug raises an AttributeError:AttributeError: 'Metadata' object has no attribute 'repo’ when enable: false.

Going through the metadata code again, it got me thinking more that this option doesn’t check for legacy archives. It is documented as If set to False, the UUID is left out of the experiment name used for archival.

I wonder whether the logic should be more consistent with the experiment naming with UUIDs and check for existence of archives. The idea was that disabling metadata generation could be useful for development as branches can still be used but it keeps metadata/uuids out of the git commits.

Or, should metadata: enable: false only use control directory names for experiment names to make the logic more simple. Another pro of using “legacy” names is if metadata: enable is set to true or removed, payu can still find the existing archive. Otherwise the logic probably should be extended to search for $CONTROL_DIR-$BRANCH archives.