-
Notifications
You must be signed in to change notification settings - Fork 1
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
Restore Code Coverage Verification in GitHub Actions Workflow #9
Comments
i could not see a valid purpose for codecoverage. using features just because they exist doesn't make a lot of sense. was it useful in someway? i couldn't see it. How? "crucial for maintaining high code quality and ensuring adequate test coverage" |
Keeping code coverage in open source projects is super important for several reasons. First off, it helps catch bugs early. By writing tests for your code, you can find and fix issues before they become a problem for users. This makes the project more reliable and trustworthy, which is crucial for attracting and keeping users and contributors. When contributors, especially new ones, see that the project has good test coverage, they feel more confident in making changes or adding new features. They know that if something goes wrong, the tests will catch it. This makes it easier for people to contribute without the fear of breaking existing functionality. Good test coverage also helps keep the codebase clean and maintainable. As the project evolves, having a solid suite of tests ensures that new changes don’t introduce bugs. It also makes refactoring code safer and more manageable because you can rely on the tests to verify that everything still works as expected. Take this project as example, you only are able to work comfortable because of the level of the coverage that this codebase represent nowadays. Moreover, tests serve as a form of documentation. They show how different parts of the code are supposed to work, which is incredibly helpful for anyone trying to understand the codebase, especially newcomers. By integrating tests with continuous integration (CI) tools, you can automate the quality checks. This means that every time someone makes a change, the tests run automatically, ensuring that the code quality remains high. In short, maintaining good code coverage keeps the project healthy, makes it easier and safer to contribute, and ensures that the code remains reliable and understandable. It’s a win-win for both the maintainers and the contributors. also could you add me as a maintainer? merge to main branches needs to be well explained in the PR's. the ones from sign-keys... the project from Microsoft already had it in place, not sure why you changed it. |
i am not saying no to anything but i really need to understand the why. if i understand correctly, please excuse my ignorance, but testing has not been removed. github/workflows/dotnetcore-build.yml runs on every push/pull and the last line is Test. that line runs all of the UnitTests and complains on failures are you suggesting adding after the Test line the additional items i removed? Generate Report, Check Coverage, Coveralls GitHub Action? i removed the Check Coverage line because it failed every time |
Yes, so if anyone implements new feature and the coverage of the code drops the pull request wont complete, maintaining the good quality gate and coverage of the lines |
yes i see the need for this. i am readding it. |
If you notice this line It says we need to maintain 96% of coverage in the original project
|
cover coverage complains about a lot of the original code. i am going to start focusing on some of these issues. |
I can work on it once I get home, |
Also before fixing the issues, we need to understand why is it complaining as the previous version in Microsoft repository it was passing normally 👍🏾 |
the ones from sign-keys... the project from Microsoft already had it in place, not sure why you changed it. the public key was published to the repository but not the private key, so technically it was not signing release builds. this has been fixed and the private key remains unpublished |
the workflow, as expected, is failing due to codecoverage. the original existing code is filled with issues, according to codecoverage |
please do not complete the Pull Request if the workflow is not passing, I will have to reopen this one. we need to guarantee that 96% of the code is covered, for this build it failed. sorry |
the original branch failed with this too which was my original reason for removing. |
Im fixing it, give me a second, will open a PR they were all passing in the original project. https://github.com/microsoft/RulesEngine/actions/workflows/dotnetcore-build.yml |
i have it working up to the point of Check Coverage |
i need unit tests for the new code? which is why its failing? |
yes, your new code is not tested, so it dropped the quality, and then it's not passing. You should roll back the changes in this file, and keep it as it was. the ones you marked as obsolete should not be obsolete, as they are working fine. https://github.com/microsoft/RulesEngine/blob/main/src/RulesEngine/RulesEngine.cs |
i agree that the obsolete methods are working fine but the reason for change is they are confusingly named. they also do not support the solved issues that have been brought up. they were only marked obsolete to prevent breaking changes. their use is confusing and not appropriately named for what they accomplish. RulesEngine file is confusing just to navigate and understand what is going on partly due to naming conventions that have been used. |
To be honest, I suggest we revert the changes made in this fork, focusing solely on bug fixes. Therefore, our priority should be to address the existing bugs without introducing new features at this time. This approach ensures we do not disrupt the current user base and build confidence in the project's reliability. |
I understand the method names can be confusing, but many users are familiar with them as they are. Changing them now might just add to the confusion and disrupt workflows. Moreover, the new names haven't been properly tested yet. Rushing these changes could lead to issues and erode trust in the new implementation. It's nice to maintain stability and ensure thorough testing before making any significant changes. Let's focus on clarity and reliability to keep user confidence high. I would suggest to focus only in the bug fixes, even creating a new fork, and open PR's from scratch solving each problem at time. let me know what you think |
i agree with what you are saying, really i do. i rushed some of the changes that i made and should have created PR's for those changes. |
I know some big companies use this repo, and seeing these changes reviewed by only one contributor is a bit messy. If you want, I can fork the repo myself and add you as a contributor. @abbasc52, requested us and I would like to keep it. Also, @timophe-91 has some concerns about the direction as he mentioned it is a working environment, I do have some concerns too as I have it in my production environment that could affect a large number of people if not tested properly. let me know your thoughts on this 🙌 |
i want to thank you for the time you take to completely answer my questions. i will revert the obsolete code back. |
mostly reverted back. i removed all of the methods i added plus the obsolete attribute. |
Nice man, tomorrow morning I will do a comparison with the original code so we can do a descriptive change, thanks for that 🙂 |
main branch has some differences but it passed, barely. |
Great, I'll compare the changes right now and create a PR. Once that's done, I'll merge it soon. Moving forward, we'll open pull requests with detailed explanations and rationales for each implementation. This will ensure clarity and transparency in our development process. |
i should have done that from the beginning, moving forward i will. thank you for the assistance and taking the time to provide detailed thoughts |
once you have gone through main (and approved) i will push a nuget package |
The PR is open reverting the changes maintained the bug fixes, also keeping the codeql code coverage and unit tests levels |
i had an essay prepared for you with the many issues i believe existed in that PR. but..i can create a pull request with my changes to it. |
On code coverage, it served as a good check for new changes being tested. You can reduce the percentage in coverage check till you guys stabilize the repo. On signing, i would recommend generating new signing( it was used for a feature called 'strongname'. It is not mandatory, it just limits few people who are using strongname restriction in their project from using non signed nugets |
Nice, we will create PRs from now on, would be great to complete them always with a second pair of eyes. @abbasc52 would be nice if you could review them, I know you cant maintain it or anything but we would appreciate if you could review them sometimes and add some comments if needed just by the time we make it stable 😀 |
@asulwer lets open PRs with specific changes If you could open it and don't complete until theres another pair of eyes looking to it. Would be great to add the policy so minimal of 2 reviews in order to complete the PR into main |
in the future we can adjust the policy to include more reviewers. as we have just you and i lets keep it to one. right now the merged PR has broken the solution. before any packages are fixed the issues need to be solved. we need a stable branch with discussion about what's to be removed and what should be kept. right now i am not feeling good about this fork |
We can release a version, no worries about it, because we have it almost exactly the way in the original package 😀 I make sure we didn't change any behavior, I just added the cancellation token from in the context, so the users and use it |
How did it broken the solution the build passed together with three test and coverage and codeql? 🧐 |
look at the solution using (windows File Explorer) old code and new code has been mixed |
Noo, look it on github, you need to clone it back again those files are only in your machine |
i have a PR open with my corrections linking to open issues for each correction |
this issue is now off topic. i have created issues for 'some' of the issues found with the merge |
Description:
The code coverage verification step was previously part of our GitHub Actions build process but has been removed. This step is crucial for maintaining high code quality and ensuring adequate test coverage. We need to investigate why it was removed and reintegrate it into our CI/CD pipeline.
Steps to Reproduce:
Expected Behavior:
Actual Behavior:
The text was updated successfully, but these errors were encountered: