```$ pulumi env run ai-dev pnpm dev Warning: Refe...
# esc
r
Copy code
$ pulumi env run ai-dev pnpm dev 
Warning: Referring to an environment name ('ai-dev') without a project is deprecated.
Please use 'cortexclick/default/ai-dev' or 'default/ai-dev' instead.
I can understand why y'all did this (presumably to disambiguate and reduce errors in some cases), but I not a fan. Why do I need to be forced to type out
default
if I am not utilizing project structure?
w
I can't speak for the Pulumi team, but the pre-GA default environment of ESC fell out of fashion pretty fast for me. Once you get even 10+ environments a default/* starts to get unwieldy. The project requirement makes for a nice nesting view in Pulumi Cloud and aligns with the IaC pattern of project/stack. Feels likely the rationale for depreciating a true automatically prefixed 'default' namespace is somewhere in there.
r
Can totally understand that hierarchy of environments via projects is valuable. Just don't see the point in deprecating the shorthand for
foo
that automatically resolves to
$DEFAULT_ORG/default/foo
Feels like an unnecessary inconvenience for the simple case and searching for the rationale behind the decision.
r
Hey Evan! Appreciate the feedback. As you pointed out, the purpose is largely to disambiguate and avoid errors and prevent special-casing any particular project name. While this is currently just a warning, it will become an error in the future. All project names are equal, including
default
🙂
r
Thanks for the response. To clarify, there isn't any literal ambiguity right? Today
pulumi env run [environment]
is just an alias to
default-org/default/environment
which is unambiguous. This code even suggests that it is unambiguous and that this format is marked as "legacy": https://github.com/pulumi/esc/blob/e9e5988d30e143afc372b4f5708de0c2f3fd0aa2/cmd/esc/cli/env.go#L113-L125 Just trying to get a clear picture of why this had to be marked as legacy and removed. Tried digging through some PRs, but I couldn't really find anything in issues or PR descriptions that outlined the rationale for the change. Closest thing I found was this PR comment: https://github.com/pulumi/esc/pull/369#discussion_r1710348227 My closest guess is that you all don't want people accidentally creating envs in the default project, or unexpectedly opening a env that exists in both default and another project. I can understand that, but I am not at the scale where I need or care about projects. I just don't want to unnecessarily type stuff every time - especially if there isn't a problem with ambiguity and the goal is to just protect me from myself. Is there a happy medium here? Maybe support could be added for $PULUMI_ESC_DEFAULT_PROJECT so that the short commands can be kept?
Happy to just turn this into an issue as well if you'd prefer.
r
Yes please open an issue! I def get where you're coming from and adding support for a default project setting might be the right happy medium.
r
r
Thanks @refined-alligator-39489! I think for the use case you've described it's not ambiguous since a single part of the path has to be the environment name. The ambiguity starts when you have
{prefix}/name
where we aren't sure did you mean
{org}/default/name
or
$DEFAULT_ORG/{project}/name
. Another big part of deprecating this was to align with how stacks function where they have to belong to a project. We can follow up on the issue as I'm sure there is a happy medium. 😄
r
👋 great to hear from you again @ripe-translator-94678! 😃
r
👋 yeah! I hope you're doing well and having a good holiday season
r
Definitely understand the ambiguity with
prefix/name
and seems kinda impossible to support that format in a way that works predictably well. And yeah, I'm just concerned about the case where you only specify
name
I'm just trying to avoid typing extra things through my own laziness 😂 though at the end of the day, it isn't like this will stop me from using ESC. Love the product!
r
😆 makes sense - I think we have a ticket open internally around more defaulting of projects / environments that may help out for some of this.