Skip to content

APIv2: better build command sanitization #10025

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

Merged
merged 5 commits into from
Feb 15, 2023
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Feb 14, 2023

  • Update the regex by removing a / for Conda because it wasn't matching properly.
  • Move the logic into a util function sanitize_build_command
  • Use the helper from the serializer and also from when serving from the cold storage

This made the regex to not match properly.
@humitos humitos requested a review from a team as a code owner February 14, 2023 18:39
@humitos humitos requested a review from stsewd February 14, 2023 18:39
Copy link
Member

@stsewd stsewd left a comment

Choose a reason for hiding this comment

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

We should probably have a test for this

@humitos humitos changed the title APIv2: remove double \ APIv2: better build command sanitization Feb 15, 2023
@humitos
Copy link
Member Author

humitos commented Feb 15, 2023

I updated this PR to add a test case and also to solve the problem we had when returning the commands from the cold storage.

@humitos humitos enabled auto-merge (squash) February 15, 2023 15:24
@humitos humitos merged commit 9d1e0b1 into main Feb 15, 2023
@humitos humitos deleted the humitos/build-command-serializer branch February 15, 2023 15:38
@ericholscher
Copy link
Member

FWIW, I had a user who was confused about whether the conda env was being used, and the path to $CONDA_ENV was actually useful for them. Not a super important use case, but definitely something that could be notable. 🤔

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.

3 participants