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

fix(client): fix versionedUrlEndpoint() #2627

Merged
merged 2 commits into from
Jul 3, 2023

Conversation

leafty
Copy link
Member

@leafty leafty commented Jun 30, 2023

This can cause issue for projects using an unsupported metadata version.

/deploy #persist #cypress

@leafty leafty marked this pull request as ready for review June 30, 2023 14:21
@leafty leafty requested a review from a team as a code owner June 30, 2023 14:21
@leafty leafty temporarily deployed to renku-ci-ui-2627 June 30, 2023 14:21 — with GitHub Actions Inactive
@RenkuBot
Copy link
Contributor

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

@leafty leafty temporarily deployed to renku-ci-ui-2627 June 30, 2023 15:52 — with GitHub Actions Inactive
endpoint: string,
versionUrl: string | null | undefined
) {
const urlPath = versionUrl ? `${versionUrl}/${endpoint}` : `/${endpoint}`;
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 make this a bit more robust by always checking whether urlPath starts with /, adding it when that's not the case?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a good idea. I believe there are code paths that add a /, so checking for that and adding a slash if necessary seems like a good strategy.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in fc16765.

@leafty leafty temporarily deployed to renku-ci-ui-2627 July 3, 2023 07:51 — with GitHub Actions Inactive
@leafty leafty requested a review from lorenzo-cavazzi July 3, 2023 07:51
@leafty leafty deployed to renku-ci-ui-2627 July 3, 2023 09:32 — with GitHub Actions Active
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.

Lgtm! Thanks for fixing this

@leafty leafty merged commit 02801d7 into master Jul 3, 2023
@leafty leafty deleted the leafty/fix-versionedUrlEndpoint branch July 3, 2023 10:03
@RenkuBot
Copy link
Contributor

RenkuBot commented Jul 3, 2023

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.

4 participants