-
Notifications
You must be signed in to change notification settings - Fork 74
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
Changes to set the ServerOfferedVersion and ServerOfferedHash always #246
Changes to set the ServerOfferedVersion and ServerOfferedHash always #246
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #246 +/- ##
==========================================
+ Coverage 75.18% 75.96% +0.78%
==========================================
Files 25 25
Lines 1656 1656
==========================================
+ Hits 1245 1258 +13
+ Misses 299 291 -8
+ Partials 112 107 -5 ☔ View full report in Codecov by Sentry. |
Please add a test case. Let's try to include cases one where the installation of the new version fails and another that succeeds. |
@srikanthccv the unit test you suggested will cut across many methods with in this file itself, it will be a huge undertaking compared to the code change that I made. |
Regardless of the size of the change, we should add tests. That's how we prove the change actually fixes it and having a test ensures the issue will not appear again in future. |
+1. For all bug fixes we want tests that demonstrate that there is a bug (tests fail before the fix) and that the PR fixes the bug (tests pass after the fix). I understand this adds more work, but this is important for maintaining the quality of the code and being confident about bug fixes. |
@phanidevavarapu I had opened a PR to add tests against your fork here phanidevavarapu#1. Did you get a chance to look at it? |
Fix incorrect package status version and hash update
Can you fix the conflicts and update the packagessyncer.go because I commented out the lines to show tests fail. |
@srikanthccv updated the PR, There is a test failing, but I don't see any failures in local. |
TestOfferUpdatedVersion/ws test got stuck, likely an indication of a real problem. |
@tigrannajaryan I am not sure how to approach this now, tests seems to failing and passing at random. Any help to have everything green is really appreciated. |
While the individual test case |
Can we approve and merge this ticket? |
@srikanthccv @tigrannajaryan please look into this. |
The changes look good to me. I tried running the workflow multiple times to see if shows flaky behaviour but it passed all runs. I still suspect the test is flaky since it passes now without any changes to the test case. |
@phanidevavarapu this looks good to me, thank you. Can you please resolve the conflicts so that we can merge? |
@tigrannajaryan the merge conflicts are resolved, please go ahead and merge. |
This PR will fix the bug #245, the ServerOfferedVersion and ServerOfferedHash are only set when the package is sent from the server the very first time.
The changes in this PR will make sure that the info is set all the time.