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

Unable to remove treatment #6014

Closed
st8ass opened this issue Sep 16, 2020 · 24 comments
Closed

Unable to remove treatment #6014

st8ass opened this issue Sep 16, 2020 · 24 comments

Comments

@st8ass
Copy link

st8ass commented Sep 16, 2020

After migration to the Atlas and updating NS to 14.0.3 version, I can't remove treatment. I try to delete, but nothing happens

NS 14.0.3
Freestyle Libre 1/Miao-Miao
Chrome (version 85)

Screenshot 2020-09-16 191912

@Batista1991
Copy link

Batista1991 commented Sep 16, 2020

yep, have same problem on atlas + new NS version (14.0.0)

@Anatoliy91
Copy link

Anatoliy91 commented Sep 16, 2020

I have same problem on dexcom g5 from 7.08.2020, please fix it

@bjornoleh
Copy link
Contributor

bjornoleh commented Sep 17, 2020

I have also noticed that careportal entries are not updated properly in NS 14. If you go to Heroku and do a "Restart all dynos", the careportal entries are updated correctly. Some observations of mine:

-Entries at the current time are OK
-Entries of past events need restart of dynos
-Deleting careportal entries need restart of dynos

@sulkaharo
Copy link
Member

Ok cause know, working on a fix for the .4 release.

@dicko72
Copy link

dicko72 commented Sep 18, 2020

The treatment deletions do trigger the update in treatments table within collections on Atlas. However they remain on the UI.

@bjornoleh
Copy link
Contributor

@dicko72 Same with mLab. In a pinch, it's possible to do the "Restart all dynos" trick while we are waiting for the fix.

@sulkaharo
Copy link
Member

I have a preliminary fix but it needs some more effort. I'll post a branch for testing soon

@sulkaharo
Copy link
Member

#6056 should fix this - if you want to help test, you'll need to deploy branch cache_invalidation to your Heroku setup

@bjornoleh
Copy link
Contributor

@sulkaharo Ok, I tried now, but unfortunately it did not seem to make a difference. I am still in mLab, should that make a difference?

I could have made some error, but here is the branch I deployed (I made a copy of Master 13.0.1 and made a PR to your testing branch):
bjornoleh/cgm-remote-monitor@cache_invalidation...nightscout:cache_invalidation

This is what I tested:

Add "Carb correction" with Careportal at 12:30 h
Confirmed entry in mLab
Remove entry
Confirmed removal in mLab
Entry still visible in NS, also after ctrl-f5

Needed Restart all dynos to clear entry from NS

@st8ass
Copy link
Author

st8ass commented Sep 20, 2020

#6056 should fix this - if you want to help test, you'll need to deploy branch cache_invalidation to your Heroku setup

Unfortunately, it didn't solve the problem, also ifttt and automagic buttons stopped working on this branch - I can't enter temp target and carbs

@sulkaharo
Copy link
Member

sulkaharo commented Sep 20, 2020

@bjornoleh how are you removing the data? I double checked and edits that use the rest api work as expected (such as using the Treatments report). Direct data editing in Mongo is not supported, so if you're making changes to the data directly in the database, that won't work. Also is your 13.0.1 version a typo? This is for release 14, so merging to anything but latest 14 dev isn't going to work.

@sulkaharo
Copy link
Member

@st8ass can you double check you're in the right branch and describe how you tested? If your ifft action doesn't work, double check you're sending the required created_at treatment date field that contains an ISO-8601 date

@bjornoleh
Copy link
Contributor

bjornoleh commented Sep 20, 2020

@sulkaharo
I removed the treatment using the edit function in NS, drag and drop to the delete field to the left. I just checked in mLab to verify that the treatment was entered and removed, which it was.

@st8ass
Copy link
Author

st8ass commented Sep 20, 2020

@st8ass can you double check you're in the right branch and describe how you tested? If your ifft action doesn't work, double check you're sending the required created_at treatment date field that contains an ISO-8601 date

yes, I selected the cache_invalidation branch
image

I removing the treatments using the edit function in NS, just like the screenshot at the top of the discussion

@st8ass
Copy link
Author

st8ass commented Sep 20, 2020

ifttt buttons work correctly on the master branch

Example of applet settings
smb

@sulkaharo
Copy link
Member

Right, I found an issue with the treatment edit mode in the UI, fixing.

@st8ass The body is missing a required filed -> try adding "created_at": {{OccurredAt}} to the JSON.

@sulkaharo
Copy link
Member

Ok branch has support for the edit mode now. I removed the data validation from the API so IFTTT calls etc that send data with missing dates will work again.

@bjornoleh
Copy link
Contributor

@sulkaharo Cool, it works for me, I tested entering, moving and deleting a Carb correction entry.

@st8ass
Copy link
Author

st8ass commented Sep 21, 2020

@sulkaharo IFTTT buttons and removing treatment works correctly
Thanks for your hard work. I am very grateful to you for developing and supporting Nightscout

@dicko72
Copy link

dicko72 commented Sep 21, 2020

@st8ass can you double check you're in the right branch and describe how you tested? If your ifft action doesn't work, double check you're sending the required created_at treatment date field that contains an ISO-8601 date

yes, I selected the cache_invalidation branch
image

I removing the treatments using the edit function in NS, just like the screenshot at the top of the discussion

How do I get this branch to show up in Heroku?

@st8ass
Copy link
Author

st8ass commented Sep 21, 2020

@st8ass can you double check you're in the right branch and describe how you tested? If your ifft action doesn't work, double check you're sending the required created_at treatment date field that contains an ISO-8601 date

yes, I selected the cache_invalidation branch
image
I removing the treatments using the edit function in NS, just like the screenshot at the top of the discussion

How do I get this branch to show up in Heroku?

  1. Make a Fork of Nightscout/cgm-remote-monitor to your own repository.
  2. Login to Heroku. Open deploy tab and connect Heroku to your Github account.
  3. Select the Nightscout repository, scroll down to Manual deploy and select the cache_invalidation branch.
  4. Click the Deploy Branch button and wait for the deployment to complete

Done )

Sorry if I didn't explain it well, I'm not a developer

@bjornoleh
Copy link
Contributor

bjornoleh commented Sep 21, 2020 via email

@dicko72
Copy link

dicko72 commented Sep 23, 2020

Issue looks like it's resolved in dev

@sulkaharo
Copy link
Member

Yes dev now has the related fixes

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

No branches or pull requests

6 participants