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

build(chart): remove duplicates in client/server charts #1998

Merged
merged 2 commits into from
Sep 16, 2022

Conversation

ciyer
Copy link
Contributor

@ciyer ciyer commented Aug 12, 2022

Remove duplicate values from chart

/deploy renku-gateway=master #persist

@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 12, 2022 12:40 Inactive
@RenkuBot
Copy link
Contributor

You can access the deployment of this PR at https://renku-ci-ui-1998.dev.renku.ch

@ciyer ciyer force-pushed the 1976-chart-unification branch from 4646b47 to fe3bfd1 Compare August 12, 2022 14:24
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 12, 2022 14:25 Inactive
@ciyer ciyer marked this pull request as ready for review August 15, 2022 07:17
@ciyer ciyer requested a review from a team as a code owner August 15, 2022 07:17
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

I think we might want to merge the URLs in the values so that we don't have something like server.serverData.url + server.serverData.prefix anymore, but just uiServerUrl or even better server.url. The same applies to similar values like gatewayUrl that currently comes from different sources: gatewayUrl for the client and server.gateway.url for the server.

In the PR, we define ui.uiserverUrl in the helpers taking it from ui.server.*, which is confusing and not coherent with what we wrote here https://github.com/SwissDataScienceCenter/renku/blob/master/helm-chart/values.yaml.changelog.md#upgrading-to-renku-0150

I suggest aiming for the following structure:

ui:
  gatewayUrl:
  client:
    url:
    *
  server:
    url:
    *
  global:
    *

I would remove all the unnecessary global.* values, an probably also ui.ingress (is it actually used? If yes, then ui.client.ingress and its server counterpart are probably redundant). And give it a look to other values not used anymore, so that we have breaking changes only once and then we resume working with a clean values structure.

P.S: switching to ui.gatewayUrl and to ui.server.url will likely require changes to the server and/or client code. I don't mind if we keep them separate as server.url.base + server.url.prefix (easier to adapt the server code) or we just merge to server.url (easier to adapt for the client code) as long as we define them only once in the values.

@ciyer ciyer force-pushed the 1976-chart-unification branch from 59eb18f to b9ab7a0 Compare August 16, 2022 10:14
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 16, 2022 10:14 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from b9ab7a0 to 3d75652 Compare August 17, 2022 07:01
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 17, 2022 07:01 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 17, 2022 11:23 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 18, 2022 09:36 Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Thank you, this goes in the right direction!
I would change the baseUrl to client.url to follow the same structure of the gateway.
I'm also tempted to suggest dropping the url+prefix structure for the server. In that case, we would have just a full URL as server.url. The reason is that I find the naming a bit confusing since it's different than what we do with gateway and client; also, url is in fact what is usually defined as origin, and prefix is the pathname.
We might actually just limit to adding a comment to clarify that in the values, or maybe change the actual names so that they are server.origin and server.pathname (+ server.port).

Do you have any preference for how to handle that? I would probably go with the last suggestion (i.e. server.pathname + server.origin + server.port) or the first one (server.url, intended as full URL, and server.port -- that will require a little change to the config file to separate pathanme and origin).

@@ -46,9 +46,9 @@ spec:
- name: BASE_URL
value: {{ .Values.baseUrl | default (printf "%s://%s" (include "ui.protocol" .) .Values.global.renku.domain) | quote }}
Copy link
Member

Choose a reason for hiding this comment

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

I would change also the baseUrl to be client.url

@@ -228,16 +233,11 @@ server:

affinity: {}

serverData:
route:
url:
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a comment to explain that this URL should be the "origin" (i.e. schema + domain) only?

@@ -228,16 +233,11 @@ server:

affinity: {}

serverData:
route:
url:
port: 8080
prefix: /ui-server
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a comment to explain this is the "pathname"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As discussed, this can just be dropped from the values file. We do not need to give admins control over the pathname.

@ciyer
Copy link
Contributor Author

ciyer commented Aug 18, 2022

Thank you, this goes in the right direction! I would change the baseUrl to client.url to follow the same structure of the gateway. I'm also tempted to suggest dropping the url+prefix structure for the server. In that case, we would have just a full URL as server.url. The reason is that I find the naming a bit confusing since it's different than what we do with gateway and client; also, url is in fact what is usually defined as origin, and prefix is the pathname. We might actually just limit to adding a comment to clarify that in the values, or maybe change the actual names so that they are server.origin and server.pathname (+ server.port).

Do you have any preference for how to handle that? I would probably go with the last suggestion (i.e. server.pathname + server.origin + server.port) or the first one (server.url, intended as full URL, and server.port -- that will require a little change to the config file to separate pathanme and origin).

I like your suggestions. I myself stumbled on the fact that the url was not actually the url, which is annoying. I think it should be possible to further clean up the terminology so that the structures have enough flexibility but with sensible names.

@ciyer ciyer force-pushed the 1976-chart-unification branch from 36d71ff to 0996662 Compare August 18, 2022 14:40
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 18, 2022 14:51 Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Thank you! This looks cleaner to me. Just a minor change on the hard-coded "/ui-server" value and it's ready to get merged

Comment on lines 48 to 49
- name: SERVER_PREFIX
value: {{ .Values.server.serverData.prefix | default (printf "/ui-server") | quote }}
value: "/ui-server"
Copy link
Member

Choose a reason for hiding this comment

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

Keeping the env variable here and using a hard-coded string seems a bit counter-intuitive.
I would completely remove SERVER_PREFIX from here, and just hardcode it in server/src/config.ts in SERVER.prefix.

@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 09:19 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from bd56043 to 4f60081 Compare August 19, 2022 09:39
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 09:40 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from 4f60081 to 76dddd0 Compare August 19, 2022 10:53
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 10:53 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 12:26 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 13:43 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 August 19, 2022 15:55 Inactive
Copy link
Member

@lorenzo-cavazzi lorenzo-cavazzi left a comment

Choose a reason for hiding this comment

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

Looks good now, thanks!

Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

Sekhar, as we discussed I took a quick look at this helm chart PR. I think these changes look really good.

Just two minor things.

@ciyer ciyer force-pushed the 1976-chart-unification branch from edea3d2 to 05e7e1f Compare September 9, 2022 12:50
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 9, 2022 12:50 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 9, 2022 14:01 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 9, 2022 14:36 Inactive
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 12, 2022 08:49 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from a856047 to 81132b9 Compare September 12, 2022 12:50
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 12, 2022 12:51 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from 81132b9 to 8179978 Compare September 12, 2022 15:12
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 12, 2022 15:13 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from 8179978 to 3023c68 Compare September 13, 2022 12:20
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 13, 2022 12:21 Inactive
@ciyer ciyer force-pushed the 1976-chart-unification branch from 3023c68 to 41d0b2a Compare September 15, 2022 09:18
@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 15, 2022 09:18 Inactive
@olevski olevski self-requested a review September 15, 2022 09:24
olevski
olevski previously approved these changes Sep 15, 2022
Copy link
Member

@olevski olevski left a comment

Choose a reason for hiding this comment

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

Thank you!

@ciyer ciyer temporarily deployed to renku-ci-ui-1998 September 15, 2022 11:56 Inactive
Copy link
Contributor

@andre-code andre-code left a comment

Choose a reason for hiding this comment

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

🚀

@ciyer ciyer merged commit 72d01f3 into master Sep 16, 2022
@ciyer ciyer deleted the 1976-chart-unification branch September 16, 2022 13:47
@RenkuBot
Copy link
Contributor

Tearing down the temporary RenkuLab deplyoment for this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unify values from client and server sections
6 participants