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

Use Lodash's mergeWith and warn when losing reactivity #591

Closed
wants to merge 2 commits into from

Conversation

kinow
Copy link
Member

@kinow kinow commented Feb 9, 2021

These changes close #589 (and removes an unnecessary console.log from tests)

Requirements check-list

  • I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • Contains logically grouped changes (else tidy your branch by rebase).
  • Does not contain off-topic changes (use other PRs for other changes).
  • Appropriate tests are included (unit and/or functional).
  • No change log entry required (why? e.g. invisible to users).
  • No documentation update required.

@kinow kinow added this to the 0.3 milestone Feb 9, 2021
@kinow kinow self-assigned this Feb 9, 2021
@codecov-io
Copy link

codecov-io commented Feb 10, 2021

Codecov Report

Merging #591 (0623007) into master (a5c7750) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
- Coverage   81.66%   81.61%   -0.05%     
==========================================
  Files          66       66              
  Lines        1320     1322       +2     
  Branches       81       81              
==========================================
+ Hits         1078     1079       +1     
- Misses        223      224       +1     
  Partials       19       19              
Flag Coverage Δ
e2e 48.56% <0.00%> (-0.15%) ⬇️
unittests 79.92% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/components/cylc/tree/cylc-tree.js 99.31% <100.00%> (-0.69%) ⬇️

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 a5c7750...0623007. Read the comment docs.

@kinow
Copy link
Member Author

kinow commented Feb 10, 2021

With this change, and without #586 , when we hold or release a workflow we get

image

@kinow
Copy link
Member Author

kinow commented Feb 10, 2021

I think this should be ready for review. Just waiting for CI to complete, and codecov to confirm the code is covered.

@hjoliver after this change, we should see a warning, until #586 is merged. After #586 is merged, we shouldn't — in theory — see any warning again. But if we see the warning in the console, we won't have to spend time investigating reactivity issues in deltas (no fun!) 👍

@kinow
Copy link
Member Author

kinow commented Feb 10, 2021

Funny. The macos build failed. Re-ran all jobs, then now ubuntu+firefox failed. 😕

image

Working for me locally. Third time's the charm. Let's kick it once again.

@kinow kinow marked this pull request as ready for review February 10, 2021 21:30
@oliver-sanders
Copy link
Member

Perhaps we have a flaky test, which test was failing?

@kinow
Copy link
Member Author

kinow commented Feb 11, 2021

Perhaps we have a flaky test, which test was failing?

The build workflow error was due to a no-console that I forgot. The macos build (or job, sorry I keep using both with GH actions) keeps failing when it tries to execute Cypress, before running the tests.

Today: https://github.com/cylc/cylc-ui/actions/runs/555846220

 info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.2.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/Users/runner/work/cylc-ui/cylc-ui/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
Error: The process '/Users/runner/.yarn/bin/yarn' failed with exit code 1

From 2 days ago, this branch too: https://github.com/cylc/cylc-ui/actions/runs/552663688

Done in 266.80s.
/usr/local/bin/npx cypress cache list
┌─────────┬──────────────┐
│ version │ last used    │
├─────────┼──────────────┤
│ 6.1.0   │ 2 months ago │
└─────────┴──────────────┘
/usr/local/bin/npx cypress verify

25l[21:33:50]  Verifying Cypress can run /Users/runner/.cache/Cypress/6.1.0/Cypress.app [started]
[21:34:20]  Verifying Cypress can run /Users/runner/.cache/Cypress/6.1.0/Cypress.app [failed]
25hCypress verification timed out.

This command failed with the following output:

/Users/runner/.cache/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=107

----------

Command timed out after 30000 milliseconds: /Users/runner/.cache/Cypress/6.1.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=107
Timed out

----------

Platform: darwin (19.6.0)
Cypress Version: 6.1.0
25h::debug::The process '/usr/local/bin/npx' failed with exit code 1
Error: The process '/usr/local/bin/npx' failed with exit code 1

@oliver-sanders
Copy link
Member

Ok, have an idea what might be causing that, #592

@oliver-sanders
Copy link
Member

Tried upgrading to Yarn2, however, got a load of errors, will need to go through the migration guide properly. Perhaps worth waiting for Yarn2 to stabilise first, dumping in an issue for now.

#593

@oliver-sanders
Copy link
Member

Test failure nothing to do with this branch.

@kinow kinow requested a review from hjoliver February 11, 2021 23:04
@kinow kinow mentioned this pull request Feb 16, 2021
12 tasks
@kinow kinow marked this pull request as draft February 16, 2021 22:48
@kinow
Copy link
Member Author

kinow commented Feb 16, 2021

I think I found an alternative to this PR, that would add reactivity to an object, instead of just warning. Testing will take a little bit (browser + IDE)

@kinow
Copy link
Member Author

kinow commented Feb 17, 2021

I'm pushing an improved solution to #530 as that branches also has issues with reactivity after deltas are merged. Once that one is merged, will leave this one open a little longer while I look at other PR's, to make sure this issue is really gone.

@kinow
Copy link
Member Author

kinow commented Feb 17, 2021

So far looks like the new solution worked on #530 . If that PR is closed, then this one can be closed as superseded (it has the same code, with a small modification in the merge customizer using Vue.set instead of just warning).

@kinow
Copy link
Member Author

kinow commented Feb 24, 2021

Confirmed it's closed by #530

@kinow kinow closed this Feb 24, 2021
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.

Deltas: warn when we are working without reactivity
3 participants