This is stemming from an issue in the mobile apps where the scheduling of a monthly Daily won't update correctly if the start date is changed. It was decided that it'd be better to fix it through the API than locally.
You can see the detailed report from the original issue here: https://github.com/HabitRPG/habitica-android/issues/1272
I'm interested in taking a look at this tomorrow. 👍 I think I understand what is needed, but I'll have to learn about the API and the test suite(s) before I'll be ready to try and tackle this implementation.
@terminalstderr Thank you! I'm marking it as in progress for you. Comment here if you have any questions!
Should I be working on v3 or v4 of the API? (I will probably find the answer soon as I'm looking through documentation)
@terminalstderr if it's not a breaking change (ie something that modified an existing behavior) but only an addition, api v3 is fine
I would appreciate some help debugging an issue that I've encountered in my local development environment if anyone has a moment to spare (and has experienced similar issues in a Windows 10 Docker local development setup).
I posted a question on the Aspiring Blacksmiths guild... I'll copy the message here as well since I'm not sure if I can permalink the comment.
Hello friends,
I have been working on some Habitica issues. I'm trying to get really ramped-up into the Habitica API; API development is really enjoyable to me 😁👍. (My account is @terminalstderr on github and I'm currently working on "Monthly" Daily scheduling added to API #12041)
I've run into an issue with my local development environment. Everything was working well at first, but now I'm stumbling into a really strange behavior with a git repository that needs to be accessed by my Client Docker container.
The issue is that my Client Docker container kicks back this quiet error right before the app is finished building:
<s> [webpack.Progress] 95% emitting CopyPlugin
<s> [webpack.Progress] 95% emitting inspectpack-duplicates-plugin
Duplicate Sources / Packages - No duplicates found. 🚀
<s> [webpack.Progress] 98% after emitting
<s> [webpack.Progress] 98% after emitting CopyPlugin
ERROR Failed to compile with 1 errors2:48:50 AM
This dependency was not found:
* habitica-markdown/withMentions in ./src/libs/renderWithMentions.js
To install it, you can run: npm install --save habitica-markdown/withMentions
<s> [webpack.Progress] 100%
So I tried to run npm install --save habitica-markdown/withMentions from inside the container. When I did, I see that the container cannot access a habitica git repository.
The authenticity of host 'github.com (192.30.255.112)' can't be established.ac72
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
[..................] / rollbackFailedOptional: verb npm-session 24fdd25a0357ac72
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://[email protected]/habitica-markdown/withMentions.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-22T03_02_42_848Z-debug.log
The complete log of this npm run:
I assume that all the repositories that might be referenced by the build process must be public... right? So, just as a sanity check...
$ git ls-remote -h -t ssh://[email protected]/habitica-markdown/withMentions.git
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I'm unsure what is keeping me from downloading that repository... Can you offer any help?
Thanks!
P.S.
I'm interested if anyone has a good guide for setting up Webstorm IDE to debug the API server in the docker container on Windows 10? I've had mixed success so far.
I've replied already in the guild. If you need more help, can you post there? If we have two conversations about it, you're likely to get redundant troubleshooting steps.
Hi @terminalstderr, are you still working on this one? Let me know, or I'll mark it as help wanted again if you're not interested anymore. :)
Sorry, I've been very busy and I do have vacations planned for the next
several weekends. Marking "help wanted" makes sense!
I think all that is needed for this fix: pass through the "start date" to the 3rd argument of setNextDue in the api.UpdateTask implementation (permalink to relevant source code below)
https://github.com/HabitRPG/habitica/blob/595793070948da8ae195ca0b046613f101a47dc2/website/server/controllers/api-v3/tasks.js#644
@terminalstderr No worries! Thanks; I've marked this as help wanted again. :)
I'd be interested in working on this issue!
@laurel-thomson Fantastic, thanks! Post here if you have questions or run into trouble!
@laurel-thomson, I did some research and I may know the line of code that needs updating. Let me know if you want to review my findings 👍
@terminalstderr I see your comment above - I'll give that a try and see if it works! Thanks!