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(MeshTrace): invalid sampling default values #11548

Merged

Conversation

michaelbeaumont
Copy link
Contributor

@michaelbeaumont michaelbeaumont commented Sep 25, 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) --

Changelog: skip

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
@michaelbeaumont michaelbeaumont marked this pull request as ready for review September 25, 2024 07:29
@michaelbeaumont michaelbeaumont requested a review from a team as a code owner September 25, 2024 07:29
@michaelbeaumont michaelbeaumont requested review from Automaat and lukidzi and removed request for a team September 25, 2024 07:29
@michaelbeaumont michaelbeaumont changed the title fix(MeshTrace): sampling default values fix(MeshTrace): invalid sampling default values Sep 25, 2024
Copy link
Contributor

@slonka slonka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to add a test to prevent re-introducing this? How did this pass validation tests the first time?

ok so the original PR never changed the tests to check if it work 👀

#8557

@michaelbeaumont
Copy link
Contributor Author

michaelbeaumont commented Sep 25, 2024

Don't we need to add a test to prevent re-introducing this? How did this pass validation tests the first time?

How could we ever reintroduce this?

So would we have validation that sets every object field to the empty value to test if the default values of that field's fields are correct?

@michaelbeaumont
Copy link
Contributor Author

michaelbeaumont commented Sep 25, 2024

ok so the original PR never changed the tests to check if it work 👀

In particular this only shows up if sampling: is set but not all the fields are set. (and only on Kubernetes)

@slonka
Copy link
Contributor

slonka commented Sep 25, 2024

So would we have validation that sets every object field to the empty value to test if the default values of that field's fields are correct?

That will also be beneficial. It's just that if we change the default from "100" to "100%" then we NEED to change the unit tests as well.

@michaelbeaumont
Copy link
Contributor Author

It's just that if we change the default from "100" to "100%" then we NEED to change the unit tests as well.

What exactly would the test test, just that the default values we enter aren't invalid?

Note this also only shows up with Kubernetes because of #6070

@slonka
Copy link
Contributor

slonka commented Sep 25, 2024

@michaelbeaumont can you add an error case with explicit "80%"?

@michaelbeaumont
Copy link
Contributor Author

@michaelbeaumont can you add an error case with explicit "80%"?

What would that test?

@slonka
Copy link
Contributor

slonka commented Sep 25, 2024

What would that test?

well exactly the problem that we hit 🤔 EDIT: I agree that now it's of not that much value but it would've been useful in the past

@michaelbeaumont michaelbeaumont enabled auto-merge (squash) September 25, 2024 08:29
@michaelbeaumont michaelbeaumont merged commit 79a2389 into kumahq:master Sep 25, 2024
19 checks passed
Copy link
Contributor

github-actions bot commented Sep 25, 2024

backporting to release-2.8 with action

backporting to release-2.7 with action
backporting to release-2.6 with action
backporting to release-2.5 with action

kumahq bot pushed a commit that referenced this pull request Sep 25, 2024
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
kumahq bot pushed a commit that referenced this pull request Sep 25, 2024
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
kumahq bot pushed a commit that referenced this pull request Sep 25, 2024
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
kumahq bot pushed a commit that referenced this pull request Sep 25, 2024
Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
michaelbeaumont added a commit that referenced this pull request Sep 25, 2024
…11551)

fix(MeshTrace): invalid sampling default values (#11548)

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Co-authored-by: Mike Beaumont <mjboamail@gmail.com>
michaelbeaumont added a commit that referenced this pull request Sep 25, 2024
…11552)

fix(MeshTrace): invalid sampling default values (#11548)

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Co-authored-by: Mike Beaumont <mjboamail@gmail.com>
michaelbeaumont added a commit that referenced this pull request Sep 25, 2024
…11553)

* fix(MeshTrace): invalid sampling default values (#11548)
* test(kumactl): update golden files

Signed-off-by: Mike Beaumont <mjboamail@gmail.com>
Co-authored-by: Mike Beaumont <mjboamail@gmail.com>
@michaelbeaumont michaelbeaumont deleted the fix/mesh-trace-sampling-defaults branch September 26, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants