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

Added Support for User Family Members #1787

Closed

Conversation

AdityaRaimec22
Copy link
Contributor

What kind of change does this PR introduce?
Add Support for User Family Members

Issue Number:

Fixes #1584

Did you add tests for your changes?
Yes

Snapshots/Videos:

If relevant, did you update the documentation?
Not relevant

Summary

Does this PR introduce a breaking change?
No

Other information
Some tests are failing and I am currently addressing them, and I have raised a pull request because the assigned issue has been pending for a significant period.

Have you read the contributing guide?
Yes

Copy link

github-actions bot commented Feb 4, 2024

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

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. 🎯 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

@AdityaRaimec22
Copy link
Contributor Author

@palisadoes The linting checks again passed here without any issue. Please take a look Thanks.

Copy link

codecov bot commented Feb 4, 2024

Codecov Report

Attention: 117 lines in your changes are missing coverage. Please review.

Comparison is base (c0468a4) 98.17% compared to head (16834cd) 97.91%.
Report is 255 commits behind head on develop.

❗ Current head 16834cd differs from pull request most recent head 8801852. Consider uploading reports for the commit 8801852 to get more accurate results

Files Patch % Lines
src/resolvers/Mutation/removeUserFromUserFamily.ts 82.17% 22 Missing and 1 partial ⚠️
src/resolvers/Mutation/addUserToUserFamily.ts 78.04% 18 Missing ⚠️
src/libraries/errors/ImageSizeLimitExceeded.ts 27.27% 16 Missing ⚠️
src/resolvers/Mutation/updateUserProfile.ts 73.33% 1 Missing and 15 partials ⚠️
src/resolvers/Mutation/createEvent.ts 85.84% 13 Missing and 2 partials ⚠️
src/libraries/logger.ts 31.25% 11 Missing ⚠️
src/resolvers/Mutation/createPost.ts 91.66% 6 Missing ⚠️
src/resolvers/Mutation/createOrganization.ts 96.00% 4 Missing ⚠️
src/resolvers/Mutation/createMember.ts 93.75% 2 Missing ⚠️
src/resolvers/Mutation/removeAdvertisement.ts 92.85% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1787      +/-   ##
===========================================
- Coverage    98.17%   97.91%   -0.27%     
===========================================
  Files          184      234      +50     
  Lines        10767    14127    +3360     
  Branches       835     1175     +340     
===========================================
+ Hits         10571    13832    +3261     
- Misses         186      262      +76     
- Partials        10       33      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palisadoes
Copy link
Contributor

OK. I'm going to merge this. We can monitor it over the next few hours

palisadoes
palisadoes previously approved these changes Feb 4, 2024
@palisadoes
Copy link
Contributor

  1. Please merge with the latest upstream.
  2. I can't import your data via setup.ts.
  3. We made a change that reverted the use of ts-node which is what your version is using

@AdityaRaimec22
Copy link
Contributor Author

AdityaRaimec22 commented Feb 4, 2024

  1. Please merge with the latest upstream.
  2. I can't import your data via setup.ts.
  3. We made a change that reverted the use of ts-node which is what your version is using

Done. Everything fine now.

@palisadoes
Copy link
Contributor

Please sync one more time. We merged just after your last sync

@palisadoes
Copy link
Contributor

Join the discussion here if you have any linting issues after doing that.

@palisadoes
Copy link
Contributor

  1. You are not merging correctly somehow.
  2. With the latest develop branch, package.json has no references to ts-node

@palisadoes
Copy link
Contributor

It looks OK now.

@AdityaRaimec22
Copy link
Contributor Author

AdityaRaimec22 commented Feb 4, 2024

@palisadoes I think PR can be merged now. Thanks

@lakshz
Copy link
Contributor

lakshz commented Feb 4, 2024

@palisadoes Something isn't right here.

@AdityaRaimec22 We stricted the lint rules, some days back.
I understand that your code is inspired by the current code, but we do lint checks only on files that you change.

  1. Many files in the code are still following older lint rules.
  2. So, Even if you have made a small change in a file, it should follow new lint rules.

@palisadoes If the checks are passing on PR something is wrong with PR workflow, imo.

I can still see any in files in this PR, which should fail the lint checks, ideally.
image

@AdityaRaimec22
Copy link
Contributor Author

@palisadoes Something isn't right here.

@AdityaRaimec22 We stricted the lint rules, some days back. I understand that your code is inspired by the current code, but we do lint checks only on files that you change.

  1. Many files in the code are still following older lint rules.
  2. So, Even if you have made a small change in a file, it should follow new lint rules.

@palisadoes If the checks are passing on PR something is wrong with PR workflow, imo.

I can still see any in files in this PR, which should fail the lint checks, ideally. image

@LakshyaSatpal How you are able to generate this.

Copy link
Member

@SiddheshKukade SiddheshKukade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Good to see that you've done all the error checks as well. Good job.

@AdityaRaimec22
Copy link
Contributor Author

@AdityaRaimec22

  1. Have you merged the latest upstream/develop into your FamilyBranch?
  2. I think that may be the cause of the unexpected behavior.

merged with upstream/develop

@palisadoes
Copy link
Contributor

@AdityaRaimec22

We got it to work. Please merge with upstream/develop again

@AdityaRaimec22
Copy link
Contributor Author

@AdityaRaimec22

We got it to work. Please merge with upstream/develop again

It is up to date.

@AdityaRaimec22
Copy link
Contributor Author

@AdityaRaimec22
We got it to work. Please merge with upstream/develop again

It is up to date. There is nothing to merge.

@palisadoes
Copy link
Contributor

Please make a minor commit to trigger the workflow

@AdityaRaimec22
Copy link
Contributor Author

AdityaRaimec22 commented Feb 5, 2024

@palisadoes There are additional 372 files got added to the Files Changed this is because when I took my recent pull and merged the FamilyBranch with upstream/develop the linting tests failed and when I ran npm run format:fix and committed changes so the tests passed and the command resulted in removal of some unnecessary commas and others as reflected in the PR.

@palisadoes
Copy link
Contributor

palisadoes commented Feb 5, 2024

@NamitBhutani

  1. Your git linting seems to be failing again, or is it passing and formatting the repo as expected?
  2. Why wasn't the formatting occurring before? We just upgraded the prettier package which may have different functionality

@AdityaRaimec22
Copy link
Contributor Author

@NamitBhutani

  1. Your git linting seems to be failing again, or is it passing and formatting the repo as expected?
  2. Why wasn't the formatting occurring before? We just upgraded the prettier package which may have different functionality

@palisadoes I think the possible reason beyond git linting failing is that it is unable to find a git commit hash which has been deleted. And I don't think this failure can cause any error.

@NamitBhutani
Copy link
Contributor

NamitBhutani commented Feb 5, 2024

@NamitBhutani

  1. Your git linting seems to be failing again, or is it passing and formatting the repo as expected?
  2. Why wasn't the formatting occurring before? We just upgraded the prettier package which may have different functionality

Its failing because of the fact that there are 2 parent commits, we fixed one issue yesterday - being when someone else's commit is merged in develop, it caused errors with git diff, now another one has popped up.
I think that we should use https://github.com/marketplace/actions/changed-files like its being used in talawa-admin to get the list of the changed files and run eslint for that.
Because I feel that the current methods has a lot of exceptions that we can no longer afford to test , because it's blocking other's PRs too.

@palisadoes
Copy link
Contributor

palisadoes commented Feb 5, 2024

@NamitBhutani

  1. Your git linting seems to be failing again, or is it passing and formatting the repo as expected?
  2. Why wasn't the formatting occurring before? We just upgraded the prettier package which may have different functionality

Its failing because of the fact that there are 2 parent commits, we fixed one issue yesterday - being when someone else's commit is merged in develop, it caused errors with git diff, now another one has popped up. I think that we should use https://github.com/marketplace/actions/changed-files like its being used in talawa-admin to get the list of the changed files and run eslint for that. Because I feel that the current methods has a lot of exceptions that we can no longer afford to test , because it's blocking other's PRs too.

@NamitBhutani

  1. Please fix this with a new PR for the same issue. This is really not desirable. Can that be done in the next few hours?
  2. We're going to have to merge this PR. Will the git commit git hook cause any undesirable behavior if I do the merge?

@palisadoes
Copy link
Contributor

@NamitBhutani Should we merge this?

@NamitBhutani
Copy link
Contributor

@NamitBhutani Should we merge this?

I don't think so, there still might be linting errors, if they can confirm that all linting errors are removed from the pre commit hook we can go ahead.

@palisadoes
Copy link
Contributor

@AdityaRaimec22 Please verify that there are no further errors from your git commit.

@AdityaRaimec22
Copy link
Contributor Author

AdityaRaimec22 commented Feb 5, 2024

@AdityaRaimec22 Please verify that there are no further errors from your git commit.

image

Here are the results. Things looks fine to me.

@AdityaRaimec22
Copy link
Contributor Author

@palisadoes The linting test are again failing and this time for nearly every single file in the codebase. How can I remove these errors.

@NamitBhutani
Copy link
Contributor

@palisadoes it works (finally), it caught all the linting errors!

@NamitBhutani
Copy link
Contributor

@palisadoes The linting test are again failing and this time for nearly every single file in the codebase. How can I remove these errors.

This is because you merged develop into your branch, so a lot of files changed.

@AdityaRaimec22
Copy link
Contributor Author

@palisadoes The linting test are again failing and this time for nearly every single file in the codebase. How can I remove these errors.

This is because you merged develop into your branch, so a lot of files changed.

The reason I know but how can I solve this because the linting errors are failed for those files also which I hasn't changed.

@palisadoes
Copy link
Contributor

I'm not sure why yours is the only PR that has this issue.

Please close and submit another one.

I know it must be frustrating but it seems your process isn't quite right.

Please start with a fresh upstream develop and add your changes

@palisadoes
Copy link
Contributor

  1. I'm going to have to close this.
  2. Too many linting issues
  3. Too many files updated. It'll be impossible to review.
  4. Please open another PR using the latest upstream/develop as the starting point
  5. This is the only PR with this characteristic. Something is not right.

@palisadoes palisadoes closed this Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants