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

SS-1206 Site dir option should have path validation #259

Merged

Conversation

anondo1969
Copy link
Contributor

@anondo1969 anondo1969 commented Nov 27, 2024

Description

Source: https://scilifelab.atlassian.net/browse/SS-1206

The site-dir option in shinyproxy apps should disallow paths/like\ this . This would fail in the helm deployment.

We’d like side-dir to be compatible with k8s labels specification Labels and Selectors

Valid label value:

  1. must be 63 characters or less (can be empty),

  2. unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]),

  3. could contain dashes (-), underscores (_), dots (.), and alphanumerics between.

Checklist

If you're unsure about any of the items below, don't hesitate to ask. We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • This pull request is against develop branch (not applicable for hotfixes)
  • I have included a link to the issue on GitHub or JIRA (if any)
  • I have included migration files (if there are changes to the model classes)
  • I have included, reviewed and executed tests (unit and end2end) to complement my changes
  • I have updated the related documentation (if necessary)
  • I have added a reviewer for this pull request
  • I have added myself as an author for this pull request
  • In the case I have modified settings.py, then I have also updated the studio-settings-configmap.yaml file in serve-charts

Further comments

Anything else you think we should know before merging your code!

@anondo1969 anondo1969 self-assigned this Nov 27, 2024
@anondo1969 anondo1969 marked this pull request as ready for review November 27, 2024 13:08
@anondo1969 anondo1969 requested a review from churnikov November 27, 2024 13:08
Copy link
Contributor

@churnikov churnikov left a comment

Choose a reason for hiding this comment

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

After my two comments lgtm to merge

Comment on lines +5 to +6
import regex as re
from django.core.exceptions import ObjectDoesNotExist, ValidationError
Copy link
Contributor

Choose a reason for hiding this comment

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

Isort was not applied here

Copy link
Contributor

Choose a reason for hiding this comment

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

apps/helpers.py Outdated Show resolved Hide resolved
made type hint correct

Co-authored-by: Nikita Churikov <[email protected]>
@anondo1969 anondo1969 merged commit 2e4b834 into develop Nov 29, 2024
2 checks passed
@anondo1969 anondo1969 deleted the SS-1206-Site-dir-option-should-have-path-validation branch November 29, 2024 09:53
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.

2 participants