Showbot icon indicating copy to clipboard operation
Showbot copied to clipboard

Feature/update gapi client

Open s0ph0s-2 opened this issue 7 years ago β€’ 9 comments

Resolves #73, as long as someone tests it with JBot's API key first to make sure I didn't accidentally break something I can't test…

s0ph0s-2 avatar May 28 '17 22:05 s0ph0s-2

Going to wait to merge this until i can find a chance to test it

rikai avatar May 29 '17 02:05 rikai

I should also note that I was only able to upgrade to 0.10.x because 0.11.x depends on mime-types version 3-something, but mail depends on version 1.16. That might become an issue at some point in the future.

It seems as though a newer version of mail also supports version 3-something of mime-types, but I don't know what Showbot/JBot uses the mail package for, so I didn't update the gem.

s0ph0s-2 avatar May 29 '17 02:05 s0ph0s-2

Mail is used in the backup scripts, which is actually code that has never been touched, and currently not actively used, at least by me. It's defined in the Gemfile & you can look at the gemfile.lock to see what is requiring something. πŸ‘

TL;DR if it's not defined in the gemfile explicitly, it's pulled in as a dependency. If you're wanting to/up for doing an update of the gemfile dependencies (and perhaps removing some of the hard versions defined as a bonus), i would certainly not object, it's just a bit time-consuming to update and figure out if anything breaks. :)

rikai avatar May 29 '17 02:05 rikai

That's something I'll definitely consider doing, but I agree that it will be time consuming and somewhat tedious. It might also be worthwhile to go through the entire project to delete code and dependencies that are unused. Less code, fewer bugs!

This seems like something that deserves it's own issue.

s0ph0s-2 avatar May 29 '17 02:05 s0ph0s-2

Honestly, the back of stuff is the only code that is completely unused as far as I remember, and that's mostly just unused because I haven't gotten around to using it rather than because it is useless but I agree, definitely is a separate issue

rikai avatar May 29 '17 02:05 rikai

Hm, how would you feel about updating this to 0.11 regardless, making a note for later testing/a FIXME in the backup code/the commit message? Since it's code that's not actively used, i don't mind breaking it for the sake of updating code that is actively used and fixing it later when we actually have the time and need it. πŸ‘

rikai avatar Jul 25 '17 19:07 rikai

I'll hunt down the backup code and see how it uses mail. If updating doesn't actually break anything, I'll just go ahead and update all the way to 0.11. If it does, I'll disable the rake trigger and leave a FIXME comment.

s0ph0s-2 avatar Jul 27 '17 00:07 s0ph0s-2

I just started digging into how the backup feature is supposed to work. It actually looks pretty useful! (For reference, here is the documentation). Is having backups of Showbot's database useful to JB, or are you backing the Showbot droplet up in a different way?

Currently, the backup code you said that you don't use is configured to back up the MySQL database to Amazon S3, provided that it has all of the information required to access the database and upload to an S3 bucket.

I don't see any issues that would prevent me from simply removing the version restriction and updating the backup and mail gems to the current versions. That should unblock updating the Google APIs to the most recent version. However, if the backups aren't a feature that we want to keep around, we should probably just axe the code right now and eliminate a small portion of future maintenance headaches.

s0ph0s-2 avatar Aug 25 '17 22:08 s0ph0s-2

I rebased on devel since some new dependencies have been added (Discord). It's now up to google-api-client v13.

s0ph0s-2 avatar Aug 27 '17 19:08 s0ph0s-2