I created a new stack for a new project, without u...
# general
a
I created a new stack for a new project, without using
pulumi new
but now the project name is not showing up on the dashboard. I made sure that the project name in Pulumi.yaml was set correct, any reason why
stack init
wouldn't name these correctly?
c
The white space there is not the project name, it’s the repository name IIRC
So if you do not have repository integration, I believe it will be empty like that
The project name is the title in the 2 blocks that are cutoff in your screenshot
c
So if you do not have repository integration, I believe it will be empty like that
Yes, I believe this is the case. cc @colossal-beach-47527 to keep me honest here.
c
Yes. There are several pieces of data that power the stacks view. Every stack is associated with various pieces of metadata which we use to render that page. The large “gray background” widgets are how we organize stacks by their repository. The repository information isn’t available when you run
pulumi stack init
, but will be available after you run
pulumi up
. (Since as part of the update, we look if you are running within a
git
repo, and if so, inspect the origin if it is a GitHub repo, etc.) So it makes sense that the repo would be blank for a newly created stack. The project name and stack name should be set when you run
pulumi stack init
. The project name is what is found in
Pulumi.<stack-name>.yaml
, and is at the top of the “card with a white background”. The individual stack name is the label on each of those “purple rectangles” found on the project-card.
a
I see, does the tool lookup recursively from
Pulumi.yaml
location for the repo? because for 1 of those shown, I've already run an update and it is located inside a git repo
c
does the tool lookup recursively from
Pulumi.yaml
location for the repo?
Yes, I believe that is the case. Depending on the specific repo is configured though, we may not be pulling your repository information. We only check for a remote named
origin
, and only then IFF the URI matches certain well-known forms. (i.e. we err on the side of only persisting data we can parse/extract rather than just including the raw remote URI.) The specific code is here. If something seems amiss, and we should be pulling the repo information but are not, please file an issue and I can update the logic to detect your specific SCC provider, etc. https://github.com/pulumi/pulumi/blob/952b6d0d89f73c41bba57cf08f81847c0295c22d/cmd/util.go#L424 https://github.com/pulumi/pulumi/blob/952b6d0d89f73c41bba57cf08f81847c0295c22d/pkg/util/gitutil/git.go#L133
b
interesting information, what do we miss on that page or elsewhere when we use private gitlab ?
a
Ok, that explains our issues, we are using Phabricator for the
origin
remotes on those. We are switching to github either way so no big deal just have to change our origin remotes there.
c
@best-xylophone-83824, @adamant-dress-73325 I filed issue https://github.com/pulumi/pulumi/issues/3093, could you do me a huge favor and just add the URL for the
origin
of your
git
remote (change the domain/values if they are sensitive). Knowing the domain and/or URL structure, I can add support for those systems in Pulumi so things “just work” for you in the future. As far as what you are missing out on, only two things come to mind. - Like you called out at the beginning of this thread, we won’t be able to group your Pulumi Projects by their source repo when on your organization’s dashboard. That can be helpful to filter stacks, e.g. just hone in on the projects/stacks within your “website” or “data-tier” repository. - On the “stack activity page”, we link to the repo commit that the update was deployed at in some cases. (Since e.g. for GitHub repos, if we know the branch, repo, and commit we can build the right URL to send you to.) So it’s possible we could do something similar and link to a private GitLab instance or Phabricator instance.
b
So it’s possible we could do something similar and link to a private GitLab instance or Phabricator instance.
you can see gitlab URL structure on Gitlab itself it matches private Gitlab URLs, for instance
<https://gitlab.com/gitlab-org/gitlab-ce>
. You probably wont be able to reliably detect SCM , so if it was exposed somehow for us to set it can help
maybe most flexible way would be to provide a regexp with named capture groups to match against origin url
a
I gave our particular remote URL format in the issue for phab, it should be pretty common case for phab. But like Maxim says, reliably detecting SCM might be pretty hard since Phab/Gitlab can be self hosted/configured differently. From UX perspective the dashboard page perhaps can instead, change its info hierarchy from
Repo Name > Project Name > Stack Name
to
Project Name > Stack Name
and keep the repo icon around as a nice to have for common SCMs.