Original logo by @personz, processed by same.
It's been a long time coming, v0.3 is finally finished development and ready for you to use. 😆
This is my first time using Utopian for an update, though I've done many other updates before, so I hope the format is correct. Please be kind guys, there's no one single PR as I am the project owner, I pushed changes directly.
There are a lot of technical details in this post, but from a user's perspective the important thing to know is that this update greatly improves stability, speed and longevity of your bot instance. However please read the important information below before upgrading.
You can find this project at the github repository
Update method - IMPORTANT
Since the database was changed to MongoDB as per #64, you must do a clean reinstall for the bot to work correct. BEFORE YOU DO THIS you should export both your algorithm and you config, and then import to the app again using the interfaces in Edit Algo and Edit Config web app sections.
Bug Fixes
Speed up web app initial loading
The app was sometimes slow to load due to an unnecessary loading of Steem account information from the blockchain when the server script started up. The bug reproduced often when on a Heroku deployment if the dyno (VM) used was in an idle state and had to wake up. This sometimes led to the web page being served incompletely, as in this screenshot:
It was fixed by giving the internal helper library init function a flag to set whether to init Steem-JS as well as the DB access and data state.
The update was tracked in ticket #21, and the bug originally reported in ticket #93
Fix Test Algo feature
The Test Algo(rithm) always showed posts failing to be voted on, even when they should have passed. The bug was due to putting the test voting exception in the wrong area of code. Instead of just not voting, it was also not marked the post as should have been voted on.
This was fixed and tracked in ticket #116
Remove deprecated SendMail email update feature
Earlier in the bot's development it seemed important to use SendMail to send email updates to the person running the bot. However this resulted in a dependence on the SendMail 3rd party service and made local deployments unable to use this feature. It also became clear that it was not a valuable feature. I removed this feature and the associated code from the code base, work tracked in ticket #95
Remove deprecated Last Log feature
The SendMail feature fed into the Last Log feature. The last log, i.e. the last email sent, would be available for viewing on the web app. Since the SendMail feature was deprecated and removed, Last Log was also removed.
Work tracked in #122
New Features
Change database from Redis to MongoDB
This is the main body of work for this version update. Before v0.3.0 the bot used Redis DB as it's internal information storage system. While it is really good for storing key value pairs, it is not suited for object storage. As object storage was needed JSON serialization / deserialization was used, but this proved to be complex to manage and prone to bugs.
As MongoDB uses binary JSON as its native storage method, and as a mature noSQL DB, it was chosen as the replacement.
The feature was added and tracked on ticket #64
Related bugs caused by this featured upgrade that were fixed:
#94 editing the tags whitelist for the post voting algorithm was not working and had to be fixed.
#124 importing an algorithm used an incorrect number of parameters when calling the algorithm save to db wrapper function, this was fixed.
#123 Mongo DB includes a _id
field in fetched objects for it's own internal storage reference. When displaying the fetched algorithm or config objects to the user via the web app these needed to be stripped out, as they were in this fix.
#86 when the bot used the Redis DB, the size limit of the database would be hit and the code to manage this and delete old stats records was buggy. This was fixed during the migration to Mongo DB as database as the stats data management code worked better.
Update docs
Due to featured removed and added, as well as tidying up language, spelling and sense, the docs were in need of update.
In ticket #99 the screenshots were updated for v0.3.0
In ticket #42 changed a particular point of confusion, that Heroku does not guarantee that it's scheduler will run but that it is provided on a "best effort" basis.
In ticket #51 a change was required to clarify the possibility for Heroku to charge users as they need billing information in order to allow usage of the scheduler, and while this is optional, it is the default app set up.
In ticket #75 clarified the instruction to generate your own separate key for bot web app access, do not use one of your Steem keys, this is a unique key.
Improve internal error handling
I had invented a pretty bad system of tracking the error state of the bot, which was not using best practice methods. This was required to be updated to using immediate error state and allow the code to crash and reboot if necessary.
This change tracked in ticket #121
Thanks! 💖
Original logo by @personz, processed by same.
Posted on Utopian.io - Rewarding Open Source Contributors