Skip to content

Conversation

@anondo1969
Copy link
Member

@anondo1969 anondo1969 commented Apr 3, 2025

Status

Ready for review

Description

  1. MLFlow: When user opens secrets page and agrees to auto fill credentials, mlflow credentials overridden

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

  1. MLFlow: When user sets subdomain with mlflow in it, secrets are not generated according to the secrets page pattern

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

The root cause of the mlflow subdomain bug is that, the chart avoids redundant naming when the release name already contains mlflow, but appends -mlflow otherwise. This conditional logic is why only mlflow-containing subdomains fail. The logic is implemented here: . From there,

If release name contains chart name it will be used as a full name.

Types of changes

bugfix

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 requested a review from churnikov April 3, 2025 11:15
@anondo1969 anondo1969 self-assigned this Apr 3, 2025
@anondo1969 anondo1969 added the bug Something isn't working label Apr 3, 2025
@anondo1969 anondo1969 marked this pull request as ready for review April 3, 2025 11:21
@anondo1969 anondo1969 requested a review from a team as a code owner April 3, 2025 11:21
@anondo1969 anondo1969 changed the title mlflow bug fix SS-1398 mlflow bug fix Apr 3, 2025
@anondo1969 anondo1969 changed the title SS-1398 mlflow bug fix SS-1398 mlflow subdomain bug fix Apr 3, 2025
regex=r"^(?!-)(?!.*mlflow)[a-z0-9-]{3,53}(?<!-)$",
message="Subdomain must be 3-53 characters long, contain only lowercase letters, digits, hyphens, "
"and cannot start or end with a hyphen",
"cannot contain 'mlflow', "
Copy link
Contributor

Choose a reason for hiding this comment

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

I personally don't like that it'll be shown for all apps, but we can discuss this

And could you please update the test case for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you. I used a different approach and fixed it from the secret name. The root cause of the mlflow subdomain bug is that, the chart avoids redundant naming when the release name already contains mlflow, but appends -mlflow otherwise. This conditional logic is why only mlflow-containing subdomains fail. The logic is implemented here: . From there,

If release name contains chart name it will be used as a full name.

I checked and it fixed the bug.

@anondo1969 anondo1969 requested a review from hamzaimran08 April 4, 2025 10:56
Comment on lines +323 to +328
# If release name contains chart name it will be used as a full name.
# see here: https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_names.tpl#L21-L37
if "mlflow" in subdomain.subdomain.lower():
secret_name = f"{subdomain.subdomain}-tracking"
else:
secret_name = f"{subdomain.subdomain}-mlflow-tracking"
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice work, thank you!

I think this will be more intuitive:)

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you! Yes, I agree :)

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.

One thing though, could you please update the manual test case for mlflow to reflect this issue?

@anondo1969
Copy link
Member Author

One thing though, could you please update the manual test case for mlflow to reflect this issue?

I will work on it.

Copy link
Collaborator

@hamzaimran08 hamzaimran08 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 to me. Only thing I would point out is there seems to be a light blue color on the Copy button after you click it (for me atleast). If that could be changed to one of the Serve colors that would be great. Good work.

@churnikov churnikov merged commit 6dc9bce into develop Apr 7, 2025
2 checks passed
@churnikov churnikov deleted the SS-1397_mlflow_subdomain_bug branch April 7, 2025 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants