Page MenuHomePhabricator

Add a `tool-` prefix to Harbor namespaces
Closed, ResolvedPublic

Description

Harbor tool namespaces should have a tool- prefix to clearly separate them from the infrastructure components that will be hosted there. This is similar to the tool- prefix we are already using with Kubernetes namespaces.

Places that need updating/changing:

Related Objects

StatusSubtypeAssignedTask
ResolvedLucasWerkmeister
Resolvedmatmarex
ResolvedLegoktm
ResolvedLegoktm
Opendcaro
Resolveddcaro
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedNone
Resolveddcaro
Resolveddcaro
ResolvedRaymond_Ndibe
Resolveddcaro
ResolvedRaymond_Ndibe
Resolveddcaro
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe
ResolvedRaymond_Ndibe

Event Timeline

Change 913679 had a related patch set uploaded (by Raymond Ndibe; author: Raymond Ndibe):

[cloud/toolforge/toolforge-cli@main] cli: prefix wmcs-project to default image-name

https://gerrit.wikimedia.org/r/913679

@Raymond_Ndibe @dcaro Can I ask why the patches are going in a completely different direction that what's in the task description and what was discussed on IRC when it was created?

Change 913681 had a related patch set uploaded (by Raymond Ndibe; author: Raymond Ndibe):

[operations/software/tools-webservice@master] webservice: prefix wmcs-project where neccessary

https://gerrit.wikimedia.org/r/913681

@Raymond_Ndibe @dcaro Can I ask why the patches are going in a completely different direction that what's in the task description and what was discussed on IRC when it was created?

I'm not sure I understand you @taavi , can you explain a bit?

@Raymond_Ndibe @dcaro Can I ask why the patches are going in a completely different direction that what's in the task description and what was discussed on IRC when it was created?

I think he might mean that the code is using the vps project name as the prefix, instead of just a static 'tool-' (that was the idea of the ticket).

If it's that, yep, I noticed too, I was waiting to have a thought about it before merging any code, but the MR for the maintain-harbor was merged before I got some time (I should probably have put a note in the first review).

On one side, it makes the code a bit more complicated, and adds an extra configuration knob.

On the other, it might allow us to reuse the same harbor instance for more than one toolforge deployment at a time (ex. testing, on-demand toolsbetas, ...), though we don't really have that need yet. And makes it harder to get confused when looking at different harbor deployments (as they will have the vps project name in all the user repos).
Though I think that if we go this path, we should also take into account non-user repos.

So I think that for now, we can go with the first option, the simple one, and modify maintain-harbor to use a static 'tool-' prefix instead of using the project, and adapt the other patches accordingly.

@Raymond wdyt?

@Raymond wdyt?

Sorry, I have no opinion on that because I maintain MediaWiki core and extensions most of the time only.

@Raymond wdyt?

Sorry, I have no opinion on that because I maintain MediaWiki core and extensions most of the time only.

Oh sorry, wrong ping xd

@Raymond_Ndibe

Yes, that's what I meant, sorry for not being clear. I can see the advantages for both approaches but I think I prefer the static prefix for consistency with k8s namespaces. I was just more surprised to see a different change that what this task said without any kind of discussion at all.

@Raymond_Ndibe @dcaro Can I ask why the patches are going in a completely different direction that what's in the task description and what was discussed on IRC when it was created?

I think he might mean that the code is using the vps project name as the prefix, instead of just a static 'tool-' (that was the idea of the ticket).

If it's that, yep, I noticed too, I was waiting to have a thought about it before merging any code, but the MR for the maintain-harbor was merged before I got some time (I should probably have put a note in the first review).

On one side, it makes the code a bit more complicated, and adds an extra configuration knob.

On the other, it might allow us to reuse the same harbor instance for more than one toolforge deployment at a time (ex. testing, on-demand toolsbetas, ...), though we don't really have that need yet. And makes it harder to get confused when looking at different harbor deployments (as they will have the vps project name in all the user repos).
Though I think that if we go this path, we should also take into account non-user repos.

So I think that for now, we can go with the first option, the simple one, and modify maintain-harbor to use a static 'tool-' prefix instead of using the project, and adapt the other patches accordingly.

@Raymond wdyt?

ok then let me reverse most of the changes I made to conform

Change 913679 merged by jenkins-bot:

[cloud/toolforge/toolforge-cli@main] cli: add tool- prefix

https://gerrit.wikimedia.org/r/913679

Change 913681 merged by jenkins-bot:

[operations/software/tools-webservice@master] webservice: add tool- prefix

https://gerrit.wikimedia.org/r/913681