zalando-stups / kio

The application registry in the STUPS ecosystem
http://docs.stups.io/en/latest/components/kio.html
Other
23 stars 11 forks source link

Validate versions properly #66

Closed rafaelcaricio closed 8 years ago

rafaelcaricio commented 8 years ago

Currently KIO accepts versions like 1...0 and 0...---...0.

I think it is not good and we should validate the versions properly. This PR changes the regex that we use to validate. Although I am not sure if that is a feature or a bug. Just in case, there you have a PR so we can discuss.

prayerslayer commented 8 years ago

Thanks, I'll first check if we break existing patterns with this (unlikely though).

rafaelcaricio commented 8 years ago

@prayerslayer any updates?

lotharschulz commented 8 years ago

pls update with the latest status

prayerslayer commented 8 years ago

Hi, will do on Monday. Sorry for the delay!

rafaelcaricio commented 8 years ago

@prayerslayer Any updates?

prayerslayer commented 8 years ago

Ahhhh I'm so sorry :D Will do now!

prayerslayer commented 8 years ago

Checked with:

SELECT v_application_id, v_id
FROM zk_data.version
WHERE v_id NOT SIMILAR TO '[A-Za-z0-9]+([._-][A-Za-z0-9]+)*';

...and found one version, but this looks like a typo.

👏 for the tests!

prayerslayer commented 8 years ago

👍

rafaelcaricio commented 8 years ago

👍

rafaelcaricio commented 8 years ago