Hi fellows, I am trying to update an old `kedro` c...
# questions
f
Hi fellows, I am trying to update an old
kedro
code from
0.18.12
to
1.0.0
step by step, starting with version
0.19.15
. We had set up a test to be sure that our custom resolvers were working that reads as
Copy code
def test_custom_resolvers_in_example(
    project_path: Path,
) -> None:
    bootstrap_project(project_path=project_path)

    # Default value
    with KedroSession.create(
        project_path=project_path,
        env="example",
    ) as session:
        context = session.load_context()
        catalog = context._get_catalog()
        assert timedelta(days=1) == catalog.load("params:example-duration")
        assert datetime(1970, 1, 1, tzinfo=timezone.utc) == catalog.load(
            "params:example-epoch"
        )
It turns out this test was passing with version
0.18.12
with
CONFIG_LOADER_CLASS = OmegaConfigLoader
but it fails in version
0.19.15
. It seems that the environment is not taken into account and that the loader parses all the possible environments (therefore finding duplicates).
Copy code
E           ValueError: Duplicate keys found in .../conf/local/catalog.yml and .../conf/production/catalog.yml: hourly_forecasts, output_hourly_forecasts
Duplicate keys
doesn't seem to bring any message on Slack. Please let me know the mistake I made. Thanks in advance!
Actually, I have the same issue with just
kedro ipython --env=example
. 😅 Sorry if this is obvious.
OK, my deepest apologies, I found the culprit. I was missing the parameters in
CONFIG_LOADER_ARGS
indicated in https://docs.kedro.org/en/1.0.0/about/migration/#configuration-changes-in-019.
👍 2