Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/checkWorkflows.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe("Workflows pages", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/privateProject.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe("Basic public project functionality", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/publicProject.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("Basic public project functionality", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/rstudioSession.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Basic rstudio functionality", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/testDatasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ describe("Basic datasets functionality", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/updateProjects.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("Fork and update old projects", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v1");
},
validateLogin,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/useSession.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe("Basic public project functionality", () => {
// Stop the session -- mind that anonymous users cannot pause sessions
cy.deleteSession({ fromSessionPage: true });

cy.robustLogin();
cy.robustLogin("v1");
});

it("Start a new session on a project without permissions.", () => {
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/v2/anonymousNavigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const loggedSession = {
id: ["anonymousNavigation-loggedUser", getRandomString()],
setup: () => {
cy.log("Logged in session");
cy.robustLogin();
cy.robustLogin("v2");
},
};

Expand Down
6 changes: 3 additions & 3 deletions cypress-tests/cypress/e2e/v2/dashboardV2.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getRandomString, validateLogin } from "../../support/commands/general";
import { getRandomString, validateLoginV2 } from "../../support/commands/general";
import { generatorProjectName } from "../../support/commands/projects";
import { ProjectIdentifierV2 } from "../../support/types/project.types";
import {
Expand Down Expand Up @@ -39,9 +39,9 @@ describe("Dashboard v2 - Authenticated user", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLogin,
validateLoginV2,
);
getUserNamespaceAPIV2().then((namespace) => {
if (namespace) {
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/v2/groupBasics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe("Group - create, edit and delete", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/v2/projectBasics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe("Project - create, edit and delete", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down
4 changes: 2 additions & 2 deletions cypress-tests/cypress/e2e/v2/projectResources.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe("Project resources - work with code, data, environments", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand All @@ -54,7 +54,7 @@ describe("Project resources - work with code, data, environments", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down
4 changes: 2 additions & 2 deletions cypress-tests/cypress/e2e/v2/searchEntities.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe("Search for resources: groups, projects, users", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down Expand Up @@ -84,7 +84,7 @@ describe("Search for resources: groups, projects, users", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down
2 changes: 1 addition & 1 deletion cypress-tests/cypress/e2e/v2/sessionBasics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Start a session that consumes project resources", () => {
cy.session(
sessionId,
() => {
cy.robustLogin();
cy.robustLogin("v2");
},
validateLoginV2,
);
Expand Down
20 changes: 11 additions & 9 deletions cypress-tests/cypress/support/commands/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ type RegisterAndVerifyProps = {
lastName?: string;
};

function registerAndVerify(props: RegisterAndVerifyProps) {
function registerAndVerify(renkuVersion : 'v1' | 'v2', props: RegisterAndVerifyProps) {
// Register with the CI deployment
const { email, password, firstName, lastName } = props;
cy.register(email, password, firstName, lastName);
Expand Down Expand Up @@ -107,25 +107,27 @@ function registerAndVerify(props: RegisterAndVerifyProps) {
// allow Gitlab to "settle" after the login and properly recognize the token and respond with 200.
// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(TIMEOUTS.short);
cy.request("ui-server/api/data/user").its("status").should("eq", 200);
cy.request("ui-server/api/user").then((response) => {
cy.request("/api/data/user").its("status").should("eq", 200);
if (renkuVersion === 'v1') {
cy.request("/api/user").then((response) => {
expect(response.status).to.eq(200);
expect(response.body).property("username").to.not.be.empty;
expect(response.body).property("username").to.not.be.null;
expect(response.body).property("state").to.equal("active");
});
});}
}

type RobustLoginProps = {
email: string;
password: string;
firstName?: string;
lastName?: string;

};

function robustLogin(props?: RobustLoginProps) {
function robustLogin(renkuVersion: 'v1' | 'v2',props?: RobustLoginProps) {
// Check if we are already logged in
cy.request({ failOnStatusCode: false, url: "ui-server/api/data/user" }).then(
cy.request({ failOnStatusCode: false, url: "/api/data/user" }).then(
(resp) => {
// we are already logged in
if (resp.status >= 200 && resp.status < 400) return;
Expand All @@ -139,7 +141,7 @@ function robustLogin(props?: RobustLoginProps) {
...props,
};

return registerAndVerify(localProps);
return registerAndVerify(renkuVersion, localProps);
},
);
}
Expand All @@ -162,8 +164,8 @@ declare global {
firstName?: string,
lastName?: string,
);
registerAndVerify(props: RegisterAndVerifyProps);
robustLogin(props?: RobustLoginProps);
registerAndVerify(renkuVersion: 'v1' | 'v2', props: RegisterAndVerifyProps);
robustLogin(renkuVersion: 'v1' | 'v2', props?: RobustLoginProps);
}
}
}
13 changes: 7 additions & 6 deletions cypress-tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions helm-chart/renku/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ dependencies:
condition: enableV1Services
- name: amalthea
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
version: "0.19.2"
version: "0.20.0"
condition: enableV1Services
- name: amalthea-sessions
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
version: "0.19.2"
version: "0.20.0"
- name: dlf-chart
repository: "https://swissdatasciencecenter.github.io/datashim/"
version: "0.3.9-renku-2"
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/renku/templates/gateway/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ data:
audience: renku
authorizedParty: renku-cli
revproxy:
enableV1Services: {{ .Values.enableV1Services | default false }}
renkuBaseUrl: {{ include "renku.baseUrl" . | quote }}
externalGitlabUrl: {{ .Values.global.gitlab.url | default "" | quote }}
k8sNamespace: {{ .Release.Namespace }}
Expand All @@ -54,6 +55,7 @@ data:
uiserver: {{ printf "http://%s" (include "ui-server.fullname" .) | quote }}
search: {{ printf "http://%s-search-api" .Release.Name | quote }}
login:
enableV1Services: {{ .Values.enableV1Services | default false }}
renkuBaseUrl: {{ include "renku.baseUrl" . | quote }}
loginRoutesBasePath: "/api/auth"
defaultAppRedirectURL: {{ include "renku.baseUrl" . | quote }}
Expand All @@ -66,12 +68,14 @@ data:
scopes: ["profile", "email", "openid", "microprofile-jwt"]
callbackURI: {{ printf "%s/api/auth/callback" (include "renku.baseUrl" .) }}
usePKCE: false
{{- if .Values.enableV1Services }}
gitlab:
issuer: {{ .Values.global.gitlab.url | quote }}
clientID: {{ .Values.gateway.gitlabClientId | default .Values.global.gateway.gitlabClientId | quote }}
scopes: ["openid", "api", "read_user", "read_repository"]
callbackURI: {{ printf "%s/api/auth/callback" (include "renku.baseUrl" .) }}
usePKCE: false
{{- end }}
oldGitLabLogout: {{ .Values.gateway.oldGitLabLogout | default false }}
logoutGitLabUponRenkuLogout: {{ .Values.gateway.logoutGitLabUponRenkuLogout | default true }}
redis:
Expand Down
4 changes: 4 additions & 0 deletions helm-chart/renku/templates/gateway/deployment-revproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ spec:
secretKeyRef:
name: {{ cat (include "renku.fullname" .) "-gateway" | nospace }}
key: oidcClientSecret
{{- if .Values.enableV1Services }}
- name: GATEWAY_LOGIN_PROVIDERS_GITLAB_CLIENTSECRET
valueFrom:
secretKeyRef:
name: {{ cat (include "renku.fullname" .) "-gateway" | nospace }}
key: gitlabClientSecret
{{- end }}
- name: GATEWAY_LOGIN_TOKENENCRYPTION_SECRETKEY
valueFrom:
secretKeyRef:
Expand All @@ -91,6 +93,7 @@ spec:
secretKeyRef:
name: {{ cat (include "renku.fullname" .) "-gateway" | nospace }}
key: cookieHashKey
{{- if .Values.enableV1Services }}
- name: GATEWAY_LOGIN_PROVIDERS_GITLAB_COOKIEENCODINGKEY
valueFrom:
secretKeyRef:
Expand All @@ -101,6 +104,7 @@ spec:
secretKeyRef:
name: {{ cat (include "renku.fullname" .) "-gateway" | nospace }}
key: cookieHashKey
{{- end }}
- name: GATEWAY_MONITORING_SENTRY_DSN
value: {{ .Values.gateway.sentry.dsn }}
- name: GATEWAY_POSTHOG_ENABLED
Expand Down
6 changes: 3 additions & 3 deletions helm-chart/renku/templates/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ spec:
spec:
containers:
- name: swagger
image: swaggerapi/swagger-ui
image: "{{ .Values.swagger.image.repository }}:{{ .Values.swagger.image.tag }}"
env:
- name: BASE_URL
value: /swagger
- name: URLS
value: >
[
{"url": "/api/renku/spec.json", "name": "core service"},
{"url": "/api/data/spec.json", "name": "data service"},
{"url": "/api/kg/spec.json", "name": "knowledge graph"},
{"url": "/api/notebooks/spec.json", "name": "notebooks service"},
{"url": "/api/data/spec.json", "name": "data service"},
{"url": "/api/renku/spec.json", "name": "core service"},
{"url": "/api/search/spec.json", "name": "search service"}
]
- name: OAUTH2_REDIRECT_URL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
key: chart_version
- name: HOMEPAGE
value: {{ toJson .Values.ui.client.homepage | quote }}
- name: CORE_API_VERSION_CONFIG
- name: CORE_API_VERSION_CONFIG
value: {{ toJson .Values.ui.client.coreApiVersionConfig | quote }}
- name: KEYCLOAK_REALM
value: {{ include "renku.keycloak.realm" . | quote }}
Expand All @@ -98,6 +98,8 @@ spec:
value: {{ toJson .Values.ui.client.sessionClassEmailUs | quote }}
- name: IMAGE_BUILDERS_ENABLED
value: {{ .Values.dataService.imageBuilders.enabled | quote }}
- name: LEGACY_SUPPORT
value: {{ printf "{\"enabled\": %t }" .Values.enableV1Services | quote }}
livenessProbe:
httpGet:
path: /
Expand Down
7 changes: 5 additions & 2 deletions helm-chart/renku/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,7 @@ gateway:
secretKey:
image:
repository: renku/renku-gateway
tag: "1.5.1"
tag: "1.6.0"
pullPolicy: IfNotPresent
service:
type: ClusterIP
Expand Down Expand Up @@ -1449,6 +1449,9 @@ core:
## Configuration for the Swagger-UI available at <renku-domain>/swagger
swagger:
enabled: true
image:
repository: swaggerapi/swagger-ui
tag: "latest"
## The image used in startup scripts to initialize different postgress databases
initDb:
image:
Expand Down Expand Up @@ -1582,7 +1585,7 @@ secretsStorage:

# This is used to indicate whether services needed exclusively for Renku V1 are deployed or not.
# The support for this feature is experimental and it should not be set to false in production at all.
enableV1Services: true
enableV1Services: false

podSecurityContext: {}
securityContext:
Expand Down
Loading