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

Full baseline is never generated because since filter marks mutations as ignored due to not being unchanged compared to target #1803

Open
rouke-broersma opened this issue Nov 14, 2021 · 12 comments
Assignees
Labels
🐛 Bug Something isn't working Feat: Baseline Priority: Medium Issues that have a workaround or but should be fixed

Comments

@rouke-broersma
Copy link
Member

rouke-broersma commented Nov 14, 2021

Describe the bug
The since filter marks mutations as ignored based on git information, this causes the full baseline for the baseline feature to never be generated making the baseline feature pretty much useless.

Expected behavior
If a baseline does not exist, a full mutation report should be generated even if there were no changes based on git information.

Additional context
This problem is caused by the splitting of the since and the baseline filter. These used to be one combined filter which meant that we could arrange things in such a way that the filtering was correct. Now that they are separated filters they run after each other. This makes sense, the baseline should first be determined and then the baseline information should be extended with information from git. However this should not happen in the case when a baseline does not exist and thus a fresh baseline should be generated. Our current filter setup does not allow for this scenario.

@rouke-broersma rouke-broersma added the 🐛 Bug Something isn't working label Nov 14, 2021
@rouke-broersma rouke-broersma self-assigned this Nov 14, 2021
@rouke-broersma rouke-broersma changed the title Full baseline is never generated because since filter marks mutations as unchanged Full baseline is never generated because since filter marks mutations as changed Nov 14, 2021
@rouke-broersma rouke-broersma changed the title Full baseline is never generated because since filter marks mutations as changed Full baseline is never generated because since filter marks mutations as ignored due to not being changed Nov 14, 2021
@rouke-broersma rouke-broersma changed the title Full baseline is never generated because since filter marks mutations as ignored due to not being changed Full baseline is never generated because since filter marks mutations as ignored due to not being unchanged compared to target Nov 14, 2021
@rouke-broersma rouke-broersma removed their assignment Nov 14, 2021
@rouke-broersma
Copy link
Member Author

This is a problem because the baseline filter implicitly enables the since filter. We should remove this implicit enable. However we then lose the capability of determining that the baseline is incorrect due to undetected changes..

@richardwerkman @Stijn-Rutten what do you think

@Stijn-Rutten
Copy link
Contributor

Removing the implicit enable would not fix anything. When the since feature is disabled we would place all the results from the baseline in the current test run. Then we would not edit any mutant results and thus none of the mutants covered by the baseline would change. Only new mutants would get a new result. All mutants covered by the old result could have wrong results. The most viable option I can think of right now is checking if a baseline is provided. If this is not the case we should disable both the baseline filter and the since filter. After we have done that we would run a complete test of all mutations. After that we can upload a fresh baseline.

@richardwerkman
Copy link
Member

We could add a create-baseline command that stores the baseline in the desired storage provider after doing a complete run.

@rouke-broersma
Copy link
Member Author

Wouldn't want to put the burden on the user when we can already detect that there is no baseline. This was supposed to be automatic (and used to be automatic).

@rouke-broersma
Copy link
Member Author

The best solution IMO is to extract the actual git logic into a new class. Use this class both in the since filter and the baseline filter. Then we should not allow since and baseline to be enabled at the same time. This way both filters can share the existing logic but the baseline filter can choose not to enable the git filtering when there is no existing baseline.

@Stijn-Rutten
Copy link
Contributor

@rouke-broersma would that mean either one is active at a given time? If baseline is enabled, since is disabled and vice versa?

@rouke-broersma
Copy link
Member Author

Yes, at that point they cannot be enabled at the same time and there would also be no reason for the to be enabled at the same time. Since does since without the baseline stuff and baseline makes sure it takes git information into account to make sure the report is as correct as possible. Enabling both would then be pointless.

@richardwerkman
Copy link
Member

Then it would make sense to turn them into commands like we wanted to. However that would introduce a breaking change

@rouke-broersma
Copy link
Member Author

We can have them as both commands and options until the next major update and simply show a validation error if both are turned on for now.

@rouke-broersma rouke-broersma self-assigned this Jul 27, 2022
@rouke-broersma rouke-broersma added the Priority: High Pressing issue. Should be resolved as quick as possible. label Jul 27, 2022
disouzam added a commit to disouzam/blast-furnace-mass-balance that referenced this issue Dec 27, 2022
…references

-  Full baseline is never generated because since filter marks mutations as ignored due to not being unchanged compared to target #1803
    - stryker-mutator/stryker-net#1803 (comment)

-  feat(baseline): Allow force creating fresh baseline #2124
    - stryker-mutator/stryker-net#2124
@dupdob
Copy link
Member

dupdob commented Feb 2, 2023

what is the status of this issue? Asking because it is old and marked as high priority ?
Shall the priority be revised?

@richardwerkman
Copy link
Member

I guess the priority isn't that high as nobody outside of the stryker team noticed this (it seems). I stated on an implementation but got distracted and started on other work... Somebody else could pick this up if they want. Or I will continue after finishing the test detail feature

@richardwerkman richardwerkman added Priority: Medium Issues that have a workaround or but should be fixed and removed Priority: High Pressing issue. Should be resolved as quick as possible. labels Feb 2, 2023
@rouke-broersma rouke-broersma moved this to In Progress in Baseline Jun 9, 2023
@richardwerkman
Copy link
Member

Will be fixed by #1560

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working Feat: Baseline Priority: Medium Issues that have a workaround or but should be fixed
Projects
Status: In Progress
Development

No branches or pull requests

4 participants