on 2.18.0 I'm getting warnings about the `env.FOO`...
# general
c
on 2.18.0 I'm getting warnings about the
env.FOO
syntax being depreciated and:
Copy code
10:35:44.98 [WARN] DEPRECATED: pants.backend.helm.target_types.HelmDeploymentValuesField.format_with() is scheduled to be removed in version 2.19.0.dev0.
 ==> /home/ecsb/.cache/nce/65aa4f2a6c1f9bac672c0df94ae34c7170e5c071cda35e9b725945831905c122/bindings/venvs/2.18.0/lib/python3.9/site-packages/pants/util/memo.py:123
                return memoized_results[key]
            result = func(*args, **kwargs)
            memoized_results[key] = result
But as far as I can tell this repo is not using that syntax anywhere. (I tried upgrading to
2.19.0a0
past the deprecationion and things work so I think I'm right about that.) I'm also confused about "when" the message appears. It shows up "sometimes", but not reliably if I run
pants --no-local-cache --no-pantsd
c
it seems this deprecation is not conditional at all based on how you use that field, but it has indeed been removed in 2.19 [1]. So for now, I’d say it’s a nuance to glance over in 2.18.. you may setup an log ignore filter to get rid of it if it’s too noisy: https://www.pantsbuild.org/docs/reference-global#ignore_warnings [1]: https://github.com/pantsbuild/pants/commit/b509c74a8092699a0c2d8442c6efa81fc4383aef
b
Ugh, that’s not so good. Can you file an issue about it? It might be something that can slot into 2.18.1 or .2
c
b
What goals are you running to see this (occasionally)?
Also, do you use the
values
field on
helm_deployment
at all? If so, can you give some examples of what's in them? I can reproduce the first warning about
format_with
but not the one about
{env.X}
when there's no subtitution
https://github.com/pantsbuild/pants/pull/20217 has a fix for that one I can reproduce
c
Thanks for taking a look! There isn't an examples-helm repository and I couldn't get it to repro with a total toy example.
values
is in use, here are a few lightly edited deployments
Copy code
helm_deployment(
    name="prerequisites-localdev",
    release_name="prerequisites",
    sources=["prerequisites-common-values.yaml"],
    chart="//3rdparty/chart/datahub:datahub-prerequisites",
)

helm_deployment(
    name="datahub-localdev",
    release_name="datahub",
    sources=["common-values.yaml"],
    values={
        "datahub-frontend.ingress.hosts[0].host": f"datahub-localdev-{env('LOCALDEV_SIGIL', env('USER', 'john-hancock'))}.<http://dev.corp.io|dev.corp.io>",
    },
    chart="//3rdparty/chart/datahub:datahub",
)


helm_deployment(
    name="deploy-localdev",
    release_name="cron-ingest-rds",
    values={
        "image": "projects/corp_datahub/ingest/rds:rds-ingester",
        # Set as needed for testing, but try not to walk away for the day with
        # them constantly running
        "cron_schedule": "7 * * * *",
        "profiling_cron_schedule": "7 0 * * *",
    },
    sources=["values.yaml"],
    chart="./chart:chart",
)
Re goals, I got it for
list
and
fmt fix lint check
all together
👍 1
b
huh, weird, I can reproduce it now, but seemingly with identical code to what I couldn't reproduce it with before. Very weird, as you observed too.
Aha, it looks like it's https://github.com/pantsbuild/pants/issues/20219. Fix in https://github.com/pantsbuild/pants/pull/20220. Thanks @curved-manchester-66006
1