Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make it easier to test lsm compiles correctly #335

Open
3 tasks
edvgui opened this issue Jul 17, 2023 · 1 comment
Open
3 tasks

Make it easier to test lsm compiles correctly #335

edvgui opened this issue Jul 17, 2023 · 1 comment
Labels
usability This ticket is related to improved usability

Comments

@edvgui
Copy link
Contributor

edvgui commented Jul 17, 2023

Context

I think it shows well that testing allocation properly is not an easy thing and knowing whether an observed misbehavior comes from the allocator plugin or the tests is not obvious.
I think we need to do the following things to avoid this type of issues in the future:

  1. The allocation framework could be made more strict to fail when an allocation plugin is executed in a non validating compile.
  2. We should provide meaningful examples on how to test allocation with the lsm_project fixture (this is independent of allocation v3 so it can be published already).
  3. We should create a training about lsm allocation, and how it is bound to the lifecycle of a service.

Source: https://inmanta.slack.com/archives/C01QH7140NT/p1689152080989139

Actionable

  • Update allocation mocked endpoints (v1 and v2) to explicitly check that the service has a candidate attribute set.
  • Update compile method to assert (after the compile, when triggering a validation compile) that the state the service was in does have a state transfer starting from this state and with validation set to true.
  • Improve the examples of tests to show how to properly test a lifecycle, and highlight in the tests (by the usage of inline comments) the important things to check
@sanderr
Copy link
Contributor

sanderr commented Jul 18, 2023

For the third actionable, you can also actually highlight lines in code blocks.

@sanderr sanderr added process This ticket is about improving the development process or reducing technical depth usability This ticket is related to improved usability and removed process This ticket is about improving the development process or reducing technical depth labels Jul 18, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
usability This ticket is related to improved usability
Projects
None yet
Development

No branches or pull requests

2 participants