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

fixing name for nextcloud deployment in collabora install script #285

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

wejdross
Copy link
Member

@wejdross wejdross commented Dec 13, 2024

Summary

  • The Nextcloud deployment name changed with the latest nextcloud helm chart version and had to update collabora install script argument to ensure proper installation

Checklist

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • Update tests.
  • Link this PR to related issues.

@wejdross wejdross added bug Something isn't working minor labels Dec 13, 2024
@wejdross wejdross self-assigned this Dec 13, 2024
@wejdross wejdross changed the title fixing name for nextcloud deployment fixing name for nextcloud deployment in collabora install script Dec 13, 2024
@wejdross wejdross requested a review from TheBigLee December 13, 2024 11:53
@@ -540,7 +540,7 @@ func createInstallCollaboraJob(comp *vshnv1.VSHNNextcloud, svc *runtime.ServiceR
Command: []string{
"bash",
"-cefx",
fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName(), svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN),
fmt.Sprintf("oc exec -i deployments/%s -- /install-collabora.sh \"%s\" \"%s\" \"%s\"", comp.GetName()+"-nextcloud", svc.Config.Data["isOpenshift"], comp.GetName(), comp.Spec.Parameters.Service.Collabora.FQDN),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please update and use comp.GetWorkloadName()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This funtion returns GetName()

func (v *VSHNNextcloud) GetWorkloadName() string {
	return v.GetName()
}

why do we even keep such method?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just commited updated code to GetWorkloadName(), but I'm really unsure if that's the way we should go

Copy link
Collaborator

@zugao zugao Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLDR: we have one single place for getting the name of the workload so that we reduce potential bugs in the future.

During a feature request we needed the workload names of all our services. Later the implementation changed and we were not relying on on the workload names anymore. We still agreed to keep the functions anyway for the reason of this PR you opened. Unfortunately if you take a look at all our service api implementations you will realise that not all services have their workload name comp.GetName(). You have to see these methods as constants for each service and most of them luckily have the same name as comp.GetName(). To keep our code bug free, whenever there are constants we need to put them in our APIs.

@wejdross wejdross requested review from TheBigLee and zugao December 16, 2024 08:47
@wejdross wejdross merged commit 2609178 into master Dec 16, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants