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

Clean device feature state in small chunks to prevent Gladys from being stuck #1610

Merged
merged 3 commits into from
Sep 29, 2022

Conversation

Pierre-Gilles
Copy link
Contributor

@Pierre-Gilles Pierre-Gilles commented Sep 29, 2022

Pull Request check-list

To ensure your Pull Request can be accepted as fast as possible, make sure to review and check all of these items:

  • If your changes affects code, did your write the tests?
  • Are tests passing? (npm test on both front/server)
  • Is the linter passing? (npm run eslint on both front/server)
  • Did you run prettier? (npm run prettier on both front/server)
  • If you are adding a new features/services, did you run integration comparator? (npm run compare-translations on front)
  • Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to the community for testing before merging.
  • If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
  • If you are adding a new features/services which needs explanation, did you modify the user documentation? See the GitHub repo and the website.
  • Did you add fake requests data for the demo mode (front/src/config/demo.js) so that the demo website is working without a backend? (if needed) See https://demo.gladysassistant.com.

NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.

Description of change

Cleaning device feature states is now a background job

Screenshot 2022-09-29 at 12 21 17

@relativeci
Copy link

relativeci bot commented Sep 29, 2022

Job #497: Bundle Size — 7.02MB (~+0.01%).

7b0ac1c vs 505df71

Changed metrics (2/10)
Metric Current Baseline
Initial JS 2.98MB(+0.02%) 2.98MB
Cache Invalidation 42.29% 0%
Changed assets by type (1/7)
            Current     Baseline
JS 4.99MB (+0.01%) 4.98MB

View Job #497 full report

@codecov
Copy link

codecov bot commented Sep 29, 2022

Codecov Report

Base: 96.77% // Head: 96.73% // Decreases project coverage by -0.03% ⚠️

Coverage data is based on head (65ba936) compared to base (505df71).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1610      +/-   ##
==========================================
- Coverage   96.77%   96.73%   -0.04%     
==========================================
  Files         654      647       -7     
  Lines        9662     9367     -295     
==========================================
- Hits         9350     9061     -289     
+ Misses        312      306       -6     
Impacted Files Coverage Δ
server/lib/device/device.create.js 98.59% <100.00%> (-0.08%) ⬇️
server/lib/device/device.purgeStatesByFeatureId.js 100.00% <100.00%> (ø)
server/lib/job/job.wrapper.js 100.00% <100.00%> (ø)
server/lib/device/index.js
server/utils/constants.js
server/utils/slugify.js
server/lib/http/index.js
server/utils/device.js
server/lib/index.js
server/models/device.js
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Pierre-Gilles Pierre-Gilles merged commit 7b0ac1c into master Sep 29, 2022
@Pierre-Gilles Pierre-Gilles deleted the fix-save-device-slow branch September 29, 2022 07:29
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.

1 participant