-
Notifications
You must be signed in to change notification settings - Fork 178
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
[Tech Debt]: Cleanup Image Regex #1326
Comments
Here is Mr. airgapped / on-prem again :-) What about typing in a specific image by digest, not by tag, in BYON? As of now, that is not possible, is it? e.g. { fullURL: string; digest: string; imagestreamtagname: string; ... } or so
tag for imagestream / dashboard GUI when selecting available notebook images to start. For the image above, I'd want that to appear as jupyter-datascience-ubi9-python-3.9-2023a-20230515 later on, being imagestream tag.name On the other hand, the whole BYON image import functionality only works with the internal docker registry probably anyways, so no need to also make this sha256 digest format compatible? On import, is only an imagestream def created? If yes, that whole above idea is not necessary, unless someone absoiutely want to make sure to get an image by digest and not by tag from the external source registry. Related: Do think about using the image trigger annotation when assembling notebooks, though for making assembly of notebooks possibible on clusters without and with openshift internal registry, leading to the image-field of the StatefulSet derived from the Notebook being populated based on imagestream name and tag. Because the neat thing is: Even if tags.from.name is in tag-format, e.g. a usual quai.ui tag-based full path the the image, it resolves in the end to sha256 digest for the image-field. I am still in coordination with that with Joo Hoo Lee and Vaishnavi, though. |
Feature description
We implemented a Image regex in #1249 and it's got little explanation. We use it
string.match(regexp)
and the result is manuallymatch[4]
-- this is nightmarish for the next dev to read into this. Looking at the complex regexp is nasty too...Also, to tie it all off, the reg exp is duped in both back and frontend due to having no test runner in the backend and that's where the code usage is at.
Changes needed to clean this up:
parseImageURL(imageString)
and put the constant inside inside this function{ fullURL: string; tag: string; host: string; ... }
Using[1]
,[4]
should only be used in this function and thus documented as you put into a variable... ideally don't have groups you don't care about, or put them all in the object -- ie, what is[2]
and[3]
in the match string?Describe alternatives you've considered
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: