-
-
Notifications
You must be signed in to change notification settings - Fork 813
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
Addressing Continuous Refreshing in Development Environment #1466
Addressing Continuous Refreshing in Development Environment #1466
Conversation
Our Pull Request Approval ProcessWe have these basic policies to make the approval process smoother for our volunteer team. Testing Your CodePlease make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:
The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing. ReviewersDo not assign reviewers. Our Queue Monitors will review your PR and assign them.
Reviewing Your CodeYour reviewer(s) will have the following roles:
CONTRIBUTING.mdRead our CONTRIBUTING.md file. Most importantly:
Other
|
@palisadoes Could you please review this PR? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1466 +/- ##
===========================================
+ Coverage 92.77% 97.32% +4.55%
===========================================
Files 134 134
Lines 3238 3443 +205
Branches 904 1040 +136
===========================================
+ Hits 3004 3351 +347
+ Misses 225 87 -138
+ Partials 9 5 -4 ☔ View full report in Codecov by Sentry. |
@chandel-aman Please fix the failing test, or document here why the failed test is acceptable. Thank you. |
@beingnoble03 @rishav-jha-mech Please take a look. This is a show stopper bug |
The check for the PR workflow on the schema.graphl file is showing some error, which is not related to any changes made in this PR. Regarding the tests, none of them are failing, and they have 100% coverage. |
Please fix the merge conflicts. We have a bug in the |
Certainly! I'll work on fixing the merge conflicts. |
@chandel-aman can you please explain the approach you have taken here? And, how does this fix the issue? |
Sure! Issue Explanation:
Example Scenario:
Resulting Problem:
Solution Approach:
Outcome:
|
Ah, I see. I hope you have replaced all the |
The documentation issue was caused by a bug in our push workflow. This has been fixed.
|
Certainly, sir! |
This reverts commit 521d8b5.
Merge with the latest upstream the documentation update bug has been fixed |
Can we recommend a temporary fix to this issue by setting the default port for Talawa Admin to be something other than the default port 3000? That way the endpoint for Talawa Admin will more likely be unique? |
The documentation file bug has been fixed.
Merging with your upstream should have no conflicts |
Yes, we could do that as a temporary fix, however that will depend on the port not having conflicting data in its localstorage. However, if we choose a port which is not used commonly this would avoid this issue from being triggered for the time being. |
Thank you! |
ea445d3
to
22e77d9
Compare
@palisadoes @beingnoble03 @aashimawadhwa @rishav-jha-mech |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chandel-aman @palisadoes this looks good. But, we'll have to ensure that everyone uses these functions instead of localStorage.xyz
(which most of the contributors, unaware of these functions, would be using).
…into continuous-refreshing
…into continuous-refreshing
@palisadoes
And below is the script that checks the usage of localstorage in modified files. I appreciate your guidance. It appears that the pre-commit hook is effectively detecting changes locally, but it's not identifying any modified files in the workflow. Could you please offer some guidance on where I might be encountering an issue? Thank you. |
Create another script that scans the entire repo for use in the PR, or use the same script with a CLI flag to do so |
@chandel-aman please fix the conflicts |
The PR workflow is functioning as intended, checking for any usage of |
Can you make those tests run correctly without the |
Sir, I did try, but the current version of |
@beingnoble03 @aashimawadhwa @rishav-jha-mech Please review. The problem still occurs occasionally with the temporary fix on port 4321 |
@aashimawadhwa @rishav-jha-mech @beingnoble03 Could you please review this PR? |
Please fix the conflicting file. It was recently renamed. |
@chandel-aman fix the failing test and conflicting PR. The code LGTM |
can you resolve the confllicts @chandel-aman, |
@rishav-jha-mech @aashimawadhwa I've resolved the conflict and there are no failing tests. Could you please merge this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏼 Can be merged @palisadoes
What kind of change does this PR introduce?
Bug
Issue Number:
Fixes #1370
Did you add tests for your changes?
Yes
Snapshots/Videos:
1370.mp4
Summary
The issue of continuous refreshing occurs when local storage data is overwritten by another application running on the same port as Talawa-admin. This PR addresses the problem by introducing a prefix added to the key stored in local storage, ensuring the uniqueness of the key and preventing it from being overwritten.
In the first part of the video, we run the current Talawa-admin on port 3000 to log in. Without logging out, we stop the Talawa-admin server and run another application on port 3000. We observe token conflicts, which modify the value of the token. When we stop this project and start Talawa-admin again, we encounter the issue of continuous refreshing.
In the second part of the video, we run the updated Talawa-admin on port 3000. After logging in, we notice that the key stored in local storage has been prefixed. When we run another project on port 3000, we observe the addition of some data, but there are no conflicts. Upon starting Talawa-admin again, we successfully log in without facing any refreshing issues.
Other information
While this issue is not likely to occur in production, it significantly hinders the development process when contributors are working on multiple projects.
Have you read the contributing guide?
Yes