talawa-admin icon indicating copy to clipboard operation
talawa-admin copied to clipboard

fix: Deprecation warning after running the development server

Open antriksh-9 opened this issue 5 months ago • 11 comments

What kind of change does this PR introduce? This PR fixes the deprecation warning of onAfterSetupMiddleware and onBeforeSetupMiddleware.

Issue Number:

Fixes #1496

Did you add tests for your changes? Not needed

Snapshots/Videos:

Screenshot 2024-03-12 183720

If relevant, did you update the documentation? No

Summary

Does this PR introduce a breaking change? No

Other information I was told to replace onAfterSetupMiddleware and onBeforeSetupMiddleware function with setupMiddlewares. But I didn't find these function in any of the file of talawa-admin repo. Most probably it should be present in scripts/config-overrides/custom-start.js.

Have you read the contributing guide?

Yes

antriksh-9 avatar Mar 12 '24 13:03 antriksh-9

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

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.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them. When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. :dart: Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

github-actions[bot] avatar Mar 12 '24 13:03 github-actions[bot]

@antriksh-9 Please fix the conflicting files. Where are the rest of the checks?

Cioppolo14 avatar Mar 13 '24 00:03 Cioppolo14

Hey @Cioppolo14 I have resolved the conflicts, but I have no idea where are the other checks.

antriksh-9 avatar Mar 13 '24 06:03 antriksh-9

@antriksh-9 They are there now. I will assign reviewers.

Cioppolo14 avatar Mar 16 '24 12:03 Cioppolo14

@ttaylor92 @tasneemkoushar Can you review this PR?

Cioppolo14 avatar Mar 16 '24 12:03 Cioppolo14

We are going to pause merging PRs into the develop branch to facilitate fixing the roles of Members, Admins and Super Admins.

They need to assigned on a per organization basis versus per API instance. This is the tracking issue.

  • https://github.com/PalisadoesFoundation/talawa-api/issues/1965

Reviews of PRs for all branches will continue

palisadoes avatar Mar 17 '24 00:03 palisadoes

This is an update on the PR merging freeze:

  1. In the next few hours we will be merging the develop-userTypeFix branch into the develop branch.
  2. The develop-userTypeFix branch was created to fix a long standing design flaw where Admins were Admins of all organizations, not specific ones.
  3. The userType field has been removed from the User collection and it has been replaced by an appUserProfileId field.
    1. This field is null if the user isn’t registered to use the apps. This will help people to add users manually during the event checkin process, or if an Admin wants to manually add someone in the Admin dashboard.
    2. When not null the AppUserProfileID will reference a AppUserProfile collection with App related information such as the organizations for which a user may be an Admin.
    3. The updated schema can be found here https://github.com/PalisadoesFoundation/talawa-api/blob/develop-userTypeFix/schema.graphql
    4. This is the parent issue that we have been using to track progress:
      1. https://github.com/PalisadoesFoundation/talawa-api/issues/1965
  4. This merge will cause some conflicts in your PR.

We decided to do this at the beginning of the weekend to give us all time to adjust PR code and create bug fixes that may arise.

Update your code at or after midnight GMT on the morning of March 23, 2024. (5:30am IST).

If your PRs have already been approved, request a re-review after fixing the conflicts and refactoring to the new AppUserProfileID methodology.

palisadoes avatar Mar 22 '24 16:03 palisadoes

The PR merging freeze is lifted.

  1. We are working on bug fixes that may arise. These should be few and are being tracked here:
    1. https://github.com/orgs/PalisadoesFoundation/projects/24
  2. Please update your PRs and local repos. Fix any new merge conflicts that may have occurred.

Background:

  1. The develop-userTypeFix branch was created to fix a long standing design flaw where Admins were Admins of all organizations, not specific ones.
  2. The userType field has been removed from the User collection and it has been replaced by an appUserProfileId field.
    1. This field is null if the user isn’t registered to use the apps. This will help people to add users manually during the event checkin process, or if an Admin wants to manually add someone in the Admin dashboard.
    2. When not null the AppUserProfileID will reference a AppUserProfile collection with App related information such as the organizations for which a user may be an Admin.
    3. The updated schema can be found here https://github.com/PalisadoesFoundation/talawa-api/blob/develop-userTypeFix/schema.graphql
    4. This is the parent issue that we have been using to track progress:
      1. https://github.com/PalisadoesFoundation/talawa-api/issues/1965
  3. If your PRs have already been approved, request a re-review after fixing the conflicts and refactoring to the new AppUserProfileID methodology.

palisadoes avatar Mar 23 '24 15:03 palisadoes

This pull request did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please verify it has no conflicts with the develop branch and rebase if needed. Mention it now if you need help or give permission to other people to finish your work.

github-actions[bot] avatar Apr 10 '24 00:04 github-actions[bot]

Hey @palisadoes I have made the changes.

antriksh-9 avatar Apr 10 '24 19:04 antriksh-9

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.40%. Comparing base (42a225e) to head (78d25d8). Report is 66 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1720      +/-   ##
===========================================
+ Coverage    97.55%   98.40%   +0.84%     
===========================================
  Files          177      201      +24     
  Lines         4385     5081     +696     
  Branches      1259     1480     +221     
===========================================
+ Hits          4278     5000     +722     
+ Misses         103       76      -27     
- Partials         4        5       +1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 10 '24 20:04 codecov[bot]