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

Registry operator host alias for registry viewer not working #1028

Closed
Tracked by #410
michael-valdron opened this issue Feb 10, 2023 · 9 comments · Fixed by devfile/registry-operator#51
Closed
Tracked by #410
Assignees
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working severity/blocker Issues that prevent developers from working

Comments

@michael-valdron
Copy link
Member

michael-valdron commented Feb 10, 2023

Which area this feature is related to?

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

Go project

Operating System and version: N/A

Go Pkg Version: 1.18

Bug Summary

Describe the bug:

For the registry operator, the host alias should be able to be set after the operator is deployed and during the deployment of the devfile registry using the (*registryv1alpha1.DevfileRegistry).Status.URL devfile/registry-operator/pkg/registry/configmap.go#L56 which is set once the operator picks up the server hostname. However, in the current state cr.Status.URL is an empty string resulting in the registry viewer defaulting to the staging host alias of the community registry. A fix to operator will be needed to correct this.

To Reproduce:

Deploy the registry operator in any deployment environment, this will result in all stack/sample links (e.g. starter project download and raw devfile links) in the registry viewer pointing to the registry server to point to the one deployed in staging for the community registry.

Expected behavior

Stack/sample links in the registry viewer should point to the registry server deployed with it. cr.Status.URL needs to be set to the host address of the deployment clusters ingress route.

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable

Additional context

Any workaround?

This can also work with the following source, but this would require the registry admin to set the hostname before deploying the operator:

viewerEnvfile := fmt.Sprintf(`
ANALYTICS_WRITE_KEY=%s
DEVFILE_REGISTRIES=[{"name":"Community","url":"http://localhost:8080","fqdn":"http://%s.%s"}]`,
		cr.Spec.Telemetry.RegistryViewerWriteKey, IngressName(cr.Name), cr.Spec.K8s.IngressDomain)

"http://%s.%s": Additional source will be needed to set the right protocol based on spec.tls.enabled.

Suggestion on how to fix the bug

A proper fix would have the operator to set cr.Status.URL to the host address of the deployment cluster's ingress route.

Target Date: May 30, 2023

@openshift-ci openshift-ci bot added kind/bug Something isn't working area/registry Devfile registry for stacks and infrastructure labels Feb 10, 2023
@michael-valdron
Copy link
Member Author

Might be resolved by devfile/registry-operator#33

@michael-valdron
Copy link
Member Author

Might be resolved by devfile/registry-operator#33

As of writing this issue has not been resolved, will need further investigating into why cr.Status.URL is blank on deployment.

@michael-valdron michael-valdron self-assigned this Mar 10, 2023
@kim-tsao
Copy link
Contributor

Might be resolved by devfile/registry-operator#33

As of writing this issue has not been resolved, will need further investigating into why cr.Status.URL is blank on deployment.

I noticed this too. I think I had a patch with the fix when I was testing at one point and then it got removed when I committed the fix. Looking back at some of my local changes, I see there was a call to update the config map (after the status update) in the devfileregistry_controller.go file. I thought I created a patch for this. Let me look around

	//update the config map
	r.ensure(ctx, devfileRegistry, &corev1.ConfigMap{}, labels, "")
	if result != nil {
		return *result, err
	}

@michael-valdron
Copy link
Member Author

This bug seems to have resurfaced again and requires further investigation, reopening..

@michael-valdron
Copy link
Member Author

Added this issue to the current sprint plan, this bug was fixed in sprint 233 but resurfaced at some point during the last sprint. Further investigation into this is require to ensure a fully working registry viewer component under a devfile registry deployment via the registry operator.

@kim-tsao
Copy link
Contributor

Another bug to fix as part of epic #1007

@kim-tsao
Copy link
Contributor

It looks like the configmap is being updated but not the deployment

@kim-tsao kim-tsao moved this from To Do 📝 to In Progress 🚧 in Devfile Project Apr 27, 2023
@yangcao77 yangcao77 moved this from In Progress 🚧 to To Do 📝 in Devfile Project May 9, 2023
@thepetk thepetk moved this from To Do 📝 to Backlog in Devfile Project May 23, 2023
@michael-valdron
Copy link
Member Author

Another bug to fix as part of epic #1007

This epic is now being tracked by #410.

@rm3l
Copy link
Member

rm3l commented Sep 18, 2023

Remaining: testing effort

@kim-tsao kim-tsao moved this from To Do 📝 to In Progress 🚧 in Devfile Project Sep 19, 2023
@kim-tsao kim-tsao moved this from In Progress 🚧 to In Review 👀 in Devfile Project Sep 20, 2023
@michael-valdron michael-valdron linked a pull request Sep 21, 2023 that will close this issue
4 tasks
@github-project-automation github-project-automation bot moved this from In Review 👀 to Done ✅ in Devfile Project Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/registry Devfile registry for stacks and infrastructure kind/bug Something isn't working severity/blocker Issues that prevent developers from working
Projects
Status: Done ✅
Development

Successfully merging a pull request may close this issue.

3 participants