Open ElenaKhaustova opened 1 week ago
We currently solved the problem for https://github.com/kedro-org/kedro/issues/4329 by adding logic to update VERSIONED_FLAG_KEY
if version
is provided.
We keep this issue open until we decide whether we want to fix it within Dataset Versioning
workstream.
Description
Currently, we have several options to mark dataset as versioned.
Option 1 - set
versioned: true
via configurationOption 2 - pass
version
object to dataset constructorOut
KedroDataCatalog.from_config
method allow to passload_versions
andsave_versions
: https://github.com/kedro-org/kedro/blob/075d59b1776c585698c677ec3619bc30b15ea8bc/kedro/io/kedro_data_catalog.py#L267However, the condition required to set version is
versioned
flag set toTrue
: https://github.com/kedro-org/kedro/blob/075d59b1776c585698c677ec3619bc30b15ea8bc/kedro/io/core.py#L542, otherwise passed load and save versions are ignored.So we have Option 3 to set the version via
KedroDataCatalog.from_config
and for that both versioned flag andload_versions
/save_version
should be set.Context
load_versions
/save_version
parameters are ignored when creating catalog viaKedroDataCatalog.from_config
if versioned flag is not set.load_versions
/save_version
via config.versioned
flag when , but most - don't: https://github.com/kedro-org/kedro/blob/075d59b1776c585698c677ec3619bc30b15ea8bc/kedro/io/cached_dataset.py#L89Possible Implementation
load_versions
or/andsave_version
providedPossible Alternatives
Make only step two as a temporal solution without breaking change.