When using a mix of project & group variables, it can be confusing to understand what group variables exist and how they may related/conflict with project level variables.
A simple iteration to help with this would be to show the group (inherited) variables in the project variables page.
Further details
Many enterprise customers will use group variables for stuff they have to set at a group level, but someone creating a new project in a group I may not be aware of what group variables exist.
Proposal
Show a read-only list of inherited variables (names, no values) and where they came from. The link should take you to where the value is defined so, if you have access, you can see and change the value.
The table includes columns:
Key => Variable name
Origin => Group name + link (not displayed in mockup)
What does success look like, and how can we measure that?
As a user, I can identify what group CI variables exist when I'm in the project.
Thanks Brendan, this would be very helpful. One thought might be that the group variables might want to be read-only, and also indicate the group where they're getting sourced from.
For instance, if I've created MY_VARIABLE at my top Group and also in my Sub-Group, the variable would show its value in the Group Variables section in the project under Sub-Group and would indicate that the value from Sub-Group is being used, not the Group value (or vice versa). Having a link to navigate to the owning group would also be helpful.
I think keeping them read only might make sense too, making the user navigate to the group that owns the variables to make edits.
@jhampton I spoke with a customer this week who has lots of nested subgroups which makes this a big pain point for them. Would be great if this could get prioritized
@dimitrieh this could probably use a UX check. The comments above that the source should be shown is relevant, along with a link there. I'm also not sure showing a hidden value with no unhide button is adding anything important for example.
@pburdette that is correct, in the project settings there is currently already a section for project variables. This adds another table displaying the variables it inherits from its parent groups.
@dimitrieh I have the functionality there. Of course this doesn't have the styling that's going to be implemented in #27480 (closed). It uses the previous styling there.
Should each key be a link? Maybe not?
The link that goes to the groups settings page for ci_cd ? Should we expand the section on load?
Is this making use of the table component styling? The headers seem a little too low on contrast.
Where does the origin blue icon link towards? If this links to the group, I'd argue that variables can be inherited from multiple groups due to hierarchy. Meaning that in the example, I'd expect dbz to be the name of the group and the anchor.
Is this making use of the table component styling? The headers seem a little too low on contrast.
Table component as in gitlab-ui? No this code is still in Haml, no Vue. I wasn't sure of the hex value from your mock. So I went with the light-grey class we have which is #bbb
Where does the origin blue icon link towards?
If this links to the group, I'd argue that variables can be inherited from multiple groups due to hierarchy. Meaning that in the example, I'd expect dbz to be the name of the group and the anchor.
Yes links to the group. We for sure can make the origin name the actual link. Interesting, do you have a use case you could share with me regarding project variables that are inherited from multiple groups? I was under the impression that a project could only belong to one group.
Can we allow for more width for the key values?
Yes! Do you mind giving a mockup so I can get this down pat?
Table component as in gitlab-ui? No this code is still in Haml, no Vue. I wasn't sure of the hex value from your mock. So I went with the light-grey class we have which is #bbb
Got it, can you make it so it has the same styling as the vue component?
Yes links to the group. We for sure can make the origin name the actual link. Interesting, do you have a use case you could share with me regarding project variables that are inherited from multiple groups? I was under the impression that a project could only belong to one group.
What do you mean by 'handle'? If I'm reading this correctly, this issue is just about showing existing group variables in the project variables settings view?
Yeah that's correct. Just didn't know if on backend if we needed to update this controller. It looks like it is handling everything for project specific views regarding ci/cd settings variables. Just thinking in terms of smartest way to get group level variable data into the setting view.
@jlenny I'd say normal. I'm going to pass it to a maintainer soon. Had to go through three reviewers before I could pass it to a maintainer. Should be merged soon.