#change default namespace for all entities

11 messages · Page 1 of 1 (latest)

winter yacht
#

Hello,
How do i change the namespaces of all entities from default to the name of my github organization?

mellow sinew
#

I don't think there's widespread adoption of namespacing as it seems to be the message that namespaces shouldn't be used currently -- though i'd love to see some more discussion on the topic of namespaces as it seems like a powerful feature.

winter yacht
#

The problem I’m facing is that all the imported users and groups from github are mapped to User:default/* or Group:default/*. This prevents me from using the Templates feature along with assigning collaborators when creating a repo out of a template. Because during the register phase it tries to search for a group to assign the repo. The group in GitHub is having a combined slug of myOrg/myTeamName. But backstage tries default/myTeamName which doesnt exist in GitHub and i end up having a repo created with no one having access to it because the mapping didn’t happen.

I hope I’m not too cryptic..

winter yacht
#

in the publish step i see this warning:

2023-04-06T20:38:14.588Z warn: Skipping admin access for myorg/group:default/mygroup, Not Found

shy egret
winter yacht
#

thanks @shy egret this worked, however even when the new groups where under the correct org namespace. when creating a repo out of a template and use the new group myorg/mygroup..it still showed the warn in the github:publish step saying the group is not found and it's getting skipped.
this leads to a repo created without a team assigned to it as a collaborator

shy egret
#

maybe should be more like

name.replace(/^.*:/, '').replace('^default/', '');

or similar to remove the default namespace but not others?

winter yacht
#

I am wondering if i can bypass this problem by using something like: myorg/{{( parameters.repoUrl | parseRepoUrl)['owner'] }} filter to get the team directly with the org attached to it and use it either in the collaborators field or the access field in the github:publish step?

winter yacht
#

@shy egret do you think this makes sense?