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

feat: upgrade to react-router-dom v5.2.0 #727

Merged
merged 9 commits into from
Apr 14, 2021

Conversation

meenal06
Copy link
Contributor

@meenal06 meenal06 commented Apr 6, 2021

Signed-off-by: Meenal Trivedi meenaltrivedi6102@gmail.com

Which problem is this PR solving?

Short description of the changes

  • This PR updates react-router-dom to v5.2.0 and fixes the issues due to the upgrade.

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@meenal06
Copy link
Contributor Author

meenal06 commented Apr 6, 2021

Hi @rubenvp8510 , I tested and built jaeger-ui on local and it was working flawless. However, since I have modified the main application code but one unit-test is failing due to the old snapshot. Can you please tell me how can I update the snapshot stored for the ?

@yurishkuro
Copy link
Member

@meenal06 small nit: say Resolves #725 instead of just #725, because the former will cause the ticket to auto-close once the PR is merged. I am going to update the description now.

@meenal06
Copy link
Contributor Author

meenal06 commented Apr 6, 2021

@meenal06 small nit: say Resolves #725 instead of just #725, because the former will cause the ticket to auto-close once the PR is merged. I am going to update the description now.

Thank you! I will be sure to keep this in mind for my future PRs 😄

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@rubenvp8510
Copy link
Collaborator

rubenvp8510 commented Apr 7, 2021

Hi @meenal06 to update the test snapshots you can run run yarn test --u under the directory packages/jaeger-ui. This command will update all the necessary snapshots. (note the -u flag).

Once you fixes the snapshot errors, there are a couple of more tests that are failing. I'll try to check tomorrow If I got a chance, but if you fixes it and update the PR ask me for a review again, I'll glad to do it.

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@meenal06
Copy link
Contributor Author

meenal06 commented Apr 7, 2021

Hi @rubenvp8510 , I updated the snapshot but alas there are other failing tests most probably due to the router issues which I am not able to fix as I am completely new to jest framework. Do let me know if you may find the cause of issue.

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@rubenvp8510
Copy link
Collaborator

Hi @rubenvp8510 , I updated the snapshot but alas there are other failing tests most probably due to the router issues which I am not able to fix as I am completely new to jest framework. Do let me know if you may find the cause of issue.

Hi @meenal06 what is happening is that you cannot mutate the matchPath method of the module 'react-router-dom', because it only has a getter, potential solution would be to mock the entire 'react-router' which is the module from ''react-router-dom' re-export the matchPath functions.

Look at this , could help you to understand better what is happening:

babel/babel#8363
https://stackoverflow.com/questions/53162001/typeerror-during-jests-spyon-cannot-set-property-getrequest-of-object-which

meenal06 and others added 2 commits April 10, 2021 19:46
Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@meenal06
Copy link
Contributor Author

Hi @rubenvp8510 , thank you very much for the suggestion. I have fixed all the tests and upgraded to react-router-dom v5.2, please review!

@codecov
Copy link

codecov bot commented Apr 10, 2021

Codecov Report

Merging #727 (5efecb2) into master (ae758fa) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head 5efecb2 differs from pull request most recent head b9a30dd. Consider uploading reports for the commit b9a30dd to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #727      +/-   ##
==========================================
- Coverage   94.39%   94.37%   -0.02%     
==========================================
  Files         230      230              
  Lines        5959     5960       +1     
  Branches     1448     1448              
==========================================
  Hits         5625     5625              
- Misses        300      301       +1     
  Partials       34       34              
Impacted Files Coverage Δ
packages/jaeger-ui/src/index.js 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ae758fa...b9a30dd. Read the comment docs.

@meenal06
Copy link
Contributor Author

I am not sure if the coverage issue highlighted by codecov was being covered before the test too, as I couldn't see any unit test file for the src/index.js 😕

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
@meenal06
Copy link
Contributor Author

Hi @rubenvp8510 @yurishkuro please review I have changed the selector as there were issues due to the react-router upgrade !

@rubenvp8510
Copy link
Collaborator

Hi @rubenvp8510 @yurishkuro please review I have changed the selector as there were issues due to the react-router upgrade !

Hi, sorry I'll do a review today afternoon :)

@rubenvp8510
Copy link
Collaborator

LGTM

@yurishkuro yurishkuro merged commit 6412cb3 into jaegertracing:master Apr 14, 2021
@yurishkuro
Copy link
Member

Excellent work, @meenal06

@jpkrohling
Copy link
Contributor

Nice job!

@meenal06 meenal06 deleted the react_router_dom_v5.0 branch April 14, 2021 12:14
@meenal06
Copy link
Contributor Author

Thank you team 🙂 !

vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jun 23, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
vvvprabhakar pushed a commit to vvvprabhakar/jaeger-ui that referenced this pull request Jul 4, 2021
* feat: upgrade to react-router-dom v5.2.0

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: lint

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* update snapshots to accomodate latest changes

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: object only has getter

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>

* fix: tests

Signed-off-by: Meenal Trivedi <meenaltrivedi6102@gmail.com>
Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
yurishkuro pushed a commit that referenced this pull request Sep 27, 2023
## Which problem is this PR solving?
- part of: #1825
- Upgrades react-router-dom to v5.2.0

## Description of the changes
- This PR upgrades the rrd to v5.2.0
- This upgrade was previously attempted with PR
#727 but at that time, an
issue (#803) was
reported because `react-router-redux` v5.x was not compatible with rrd
v5.2.0, so it was reverted with PR:
#837
- Now, since we have `redux-first-history` instead of
`react-router-redux`, we can upgrade to rrd v5.2.0 safely now.

## How was this change tested?
- The reported issue with v5.2.0
(#803) is not being
reproduced now.


![image](https://github.com/jaegertracing/jaeger-ui/assets/94157520/43c11ec6-02e6-4ede-855b-22822f77d4ae)


## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [x] I have added unit tests for the new functionality
- [x] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

Signed-off-by: Ansh Goyal <anshgoyal1704@gmail.com>
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.

Check what's needed to update react-router-dom from 4.3.1 to 5.2.0
4 participants