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): validate the bandwidth strictly #10371

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

spacewander
Copy link
Contributor

@spacewander spacewander commented Jun 3, 2024

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues --
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS --
  • Tests (Unit test, E2E tests, manual test on universal and k8s) --
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md? --
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

Signed-off-by: spacewander <spacewanderlzx@gmail.com>
@spacewander spacewander marked this pull request as ready for review June 3, 2024 15:12
@spacewander spacewander requested a review from a team as a code owner June 3, 2024 15:12
@spacewander spacewander requested review from slonka, jakubdyszkiewicz and lobkovilya and removed request for a team June 3, 2024 15:12
@spacewander
Copy link
Contributor Author

The test failed because unit mbps is used:

But according to the code in

var factor int // multiply on factor, to convert into kbps
switch units {
case "kbps":
factor = 1
case "Mbps":
factor = 1000
case "Gbps":
factor = 1000000
default:
return 0, errors.New("unsupported unit type")
}

The unit should be case-sensitive.

Which one needs to be changed?

@slonka
Copy link
Contributor

slonka commented Jun 12, 2024

Which one needs to be changed?

the test in

according to https://en.wikipedia.org/wiki/Metric_prefix

@spacewander
Copy link
Contributor Author

100mbps

So 100mbps means mill-bps. I will vote for changing the test as Envoy itself does not support this unit.

@slonka
Copy link
Contributor

slonka commented Jun 14, 2024

I will vote for changing the test as Envoy itself does not support this unit.

you can just change it

t
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
t
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
slonka
slonka previously approved these changes Jun 18, 2024
@slonka slonka dismissed their stale review June 18, 2024 07:58

do we need upgrade.md instructions?

d
Signed-off-by: spacewander <spacewanderlzx@gmail.com>
@spacewander
Copy link
Contributor Author

@slonka
Updated.

@slonka slonka changed the base branch from master to release-2.8 June 19, 2024 07:16
UPGRADE.md Outdated Show resolved Hide resolved
Signed-off-by: Krzysztof Słonka <slonka@users.noreply.github.com>
@slonka slonka added ci/skip-e2e-test PR: Don't run e2e tests and removed ci/skip-e2e-test PR: Don't run e2e tests labels Jun 19, 2024
@slonka slonka enabled auto-merge (squash) June 19, 2024 07:46
@slonka
Copy link
Contributor

slonka commented Jun 19, 2024

@slonka slonka merged commit ba31b94 into kumahq:release-2.8 Jun 19, 2024
18 checks passed
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.

None yet

2 participants