threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

chatflow: we should validate the flist url #763

Closed zaibon closed 4 years ago

zaibon commented 4 years ago

I did make a mistake in the flist url when trying to deploy a container. The reservation eventually failed but we could have validated the format of the flist upfront to avoid the mistake sooner.

2020-06-10_2273x693_scrot

grimpy commented 4 years ago

We actually validate that the path to the flist is downloadable... do you suggest we download the entire flist and validate it's valid?

zaibon commented 4 years ago

But how come It accepted my url then ?

zaibon commented 4 years ago

hum actually looking at it twice, the flist url is correct in my reservation. So this is a bug in zos...

grimpy commented 4 years ago

i noticed you have a space in the beginning seems our lib didnt have a problem with that and zos does so it seems... ok this can be stripped and hardened

grimpy commented 4 years ago

from the zos error i see we could do an extra check if the url + ".md5" also exists

zaibon commented 4 years ago

from the zos error i see we could do an extra check if the url + ".md5" also exists We could do that indeed

grimpy commented 4 years ago

I assume you entered it in the form

zaibon commented 4 years ago

https://explorer.testnet.grid.tf/explorer/reservations/461360 "flist": " https://hub.grid.tf/arehman/v2-harmony-0-4.flist",

Right is it in the reservation like this. So my first quetion remains, we could have catched that in the form no ? Just saw you comment. All good we're on the same page

BolaNasr commented 4 years ago

Fixed: https://github.com/threefoldtech/jumpscaleX_threebot/commit/bb6b1e03372a07b73dac98e60bc3e8fe2de4fe34

Pishoy commented 4 years ago

verified flist URL with .md having spaces before and after flist URL

BolaNasr commented 4 years ago

https://github.com/threefoldtech/jumpscaleX_threebot/commit/48b9f9876e494526e2a9c1450805f77a203dd7d7

Pishoy commented 4 years ago

verified .md files gives, incorrect URL