Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace naming convention is not convenient. #15

Open
TonyWildish-BH opened this issue Mar 22, 2024 · 1 comment
Open

Workspace naming convention is not convenient. #15

TonyWildish-BH opened this issue Mar 22, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request MVP Things that need to be considered for the MVP release

Comments

@TonyWildish-BH
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Setting roles for researchers in the Azure Portal requires knowing which workspace they're using, and which resource group it maps to. Currently, the mapping is managed by using the last 4 digits of the workspace UUID in the resource group name. This involves a manual, and error-prone, lookup.

Describe the solution you'd like
A tool, possibly the TRE cli, or a bespoke alternative, that can start from names, not IDs, and do the job cleanly. That tool would currently have to look up the workspace ID from the name, then find the resource group it maps to.

An alternative, which sits purely in Azure-land, is if the resource group can be either named for, or tagged with, the workspace name. This then lets us look up the right resource group with the AZ cli, and do everything from there. This is my preferred solution, as it can make billing reports easier to navigate too, probably.

Describe alternatives you've considered
An alternative would be a bespoke TRE admin portal, but that's more work.

Additional context
Manual effort is going to be OK for the alpha and the MVP, but not when we get into production.

@TonyWildish-BH TonyWildish-BH added enhancement New feature or request MVP Things that need to be considered for the MVP release labels Mar 22, 2024
@TonyWildish-BH TonyWildish-BH self-assigned this Jun 13, 2024
@TonyWildish-BH
Copy link
Collaborator Author

See also microsoft#3666, which shows MS are aware of the problem.

See also api_app/db/repositories/workspaces.py, at least, where code like this is to be found:

    # Remove this method once not using last 4 digits for naming - https://github.com/microsoft/AzureTRE/issue
s/3666
    async def is_workspace_with_last_4_id(self, workspace_id: str) -> bool:
        query = self.workspaces_query_string() + f' AND ENDSWITH(c.id, "{workspace_id[-4:]}")'
        workspaces = await self.query(query=query)
        return len(workspaces) > 0

Beaurk :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request MVP Things that need to be considered for the MVP release
Projects
None yet
Development

No branches or pull requests

1 participant