Skip to content
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

fix(kuma-cp) supported versions fix #2193

Merged
merged 1 commit into from
Jun 22, 2021

Conversation

bartsmykla
Copy link
Contributor

Summary

As we were using caret ranges ^ instead of tilde ranges ~
to catch the latest versions (1.1.0, 1.2.0) both of them could
catch the 1.2.0 version. Versions are delivered to our gui
as a hashmap, and when gui on the 1.2.0 version was asking our api
for the supported version of envoy it could receive the response
from range ^1.2.0 and then, everything was fine, and sometimes
it could receive a response from the ^1.1.0 range, and then
it was displaying warning.

It was happening because in the gui, we are iterating over
the hashmap with versions, and there is no consistency in
the order of keys (which is normal).

Also added tests to make sure there is always only one constraint
per version, to not allow similar situation to happen again.

Testing

  • Unit tests
  • E2E tests
  • Manual testing on Universal
  • Manual testing on Kubernetes

As we were using caret ranges `^` instead of tilde ranges `~`
to catch the latest versions (1.1.0, 1.2.0) both of them could
catch the 1.2.0 version. Versions are delivered to our gui
as a hashmap, and when gui on the 1.2.0 version was asking our api
for the supported version of envoy it could receive the response
from range `^1.2.0` and then, everything was fine, and sometimes
it could receive a response from the `^1.1.0` range, and then
it was displaying warning.

It was happening because in the gui, we are iterating over
the hashmap with versions, and there is no consistency in
the order of keys (which is normal).

Also added tests to make sure there is always only one constraint
per version, to not allow similar situation to happen again.

Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla requested a review from a team as a code owner June 22, 2021 09:53
@bartsmykla bartsmykla merged commit e2bd183 into kumahq:master Jun 22, 2021
@bartsmykla bartsmykla deleted the fix/versions branch June 22, 2021 11:53
mergify bot pushed a commit that referenced this pull request Jun 22, 2021
As we were using caret ranges `^` instead of tilde ranges `~`
to catch the latest versions (1.1.0, 1.2.0) both of them could
catch the 1.2.0 version. Versions are delivered to our gui
as a hashmap, and when gui on the 1.2.0 version was asking our api
for the supported version of envoy it could receive the response
from range `^1.2.0` and then, everything was fine, and sometimes
it could receive a response from the `^1.1.0` range, and then
it was displaying warning.

It was happening because in the gui, we are iterating over
the hashmap with versions, and there is no consistency in
the order of keys (which is normal).

Also added tests to make sure there is always only one constraint
per version, to not allow similar situation to happen again.

Signed-off-by: Bart Smykla <bartek@smykla.com>
(cherry picked from commit e2bd183)
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.

2 participants