IRC logs for #farmOS, 2021-03-19 (GMT)

2021-03-18
2021-03-20
TimeNickMessage
[23:44:46]<symbioquine[m]>Am I right in thinking there isn't a way to access images attached to assets/logs through the farmOS 1.x API?
[03:07:21]* munjoma[m] has joined #farmos
[08:09:17]* farmBOT has joined #farmos
[08:32:24]<mstenta[m]>symbioquine: Hmm it's been a while since I've done anything with that... but I *think* it's possible?
[08:32:34]<mstenta[m]>There's a few steps involved though IIRC
[08:34:19]<mstenta[m]>The log/asset record itself will reference a `file` resource
[08:34:32]<mstenta[m]>Which you then have to request separately via `/file/[id].json`
[08:34:55]<mstenta[m]>That JSON will contain the file URL
[08:37:45]<mstenta[m]>However, I'm wondering what affect public/private filesystem might have... I forget if we tested that
[08:38:07]<mstenta[m]>If you're using a public filesystem, then the file URL will be accessible directly without any authentication required
[08:39:12]<mstenta[m]>Private filesystem uploads are accessed through a special endpoint (`/system/files/...`) which goes through Drupal's access control logic - and I forget how that works with the `restws` and/or `oauth2_server` modules...
[08:39:41]<mstenta[m]>I'm pretty sure this is all integrated and works together in Drupal 9 / farmOS 2.x, but worth testing!
[08:41:16]<mstenta[m]>(the D7 `restws` module has a lot of missing bits like that, so I wouldn't be surprised if there's some limitation there)
[10:57:23]<symbioquine[m]>ah, I see it now... ! I guess my eyes glazed right over that field of the output last night :(
[10:57:43]<symbioquine[m]>Thanks!
[11:03:13]<paul121[m]>related, this might be helpful: https://github.com/farmOS/farmOS.py/pull/40
[11:04:14]<paul121[m]>still need to test files for 2.x!
[11:08:30]<symbioquine[m]>TBH I haven't been using farmOS.py recently - plain requests/aiohttp feels pretty concise
[11:22:14]<paul121[m]>yea, just a bunch of helper functions. they get even simpler for 2.x
[11:22:52]<paul121[m]>I've been watching this project: https://github.com/encode/httpx
[11:23:13]<paul121[m]>would like to consider it for async support in farmOS.py
[11:23:42]<paul121[m]>it seems pretty stable, but they're hoping to have a stable release this year
[11:23:52]<paul121[m]> * it seems pretty stable as is, but they're hoping to have a stable release this year
[11:25:57]<symbioquine[m]>Interesting. Might be worth comparing with aiohttp when making that decision...
[11:34:09]<paul121[m]>yup!
[13:00:17]<frakman1[m]>ACTION uploaded an image: (103KiB) < https://matrix.org/_matrix/media/r0/download/matrix.org/lUwDuKYhrCuusBPR... >
[13:00:21]<frakman1[m]>I keep getting emails about updating my farmos modules. I checked and the following modules need to be updated:
[13:00:58]<frakman1[m]>However, it won't let you upload modules through this interface and says to get the upgrade directly from farmos instead,
[13:01:01]<frakman1[m]> * However, it won't let you upload modules through this interface and says to get the upgrade directly from farmos instead.
[13:01:36]<frakman1[m]>I use the single docker image `farmos/farmos` and there is currentl no update.
[13:02:08]<mstenta[m]>frakman1: go to `/admin/reports/updates/settings` and change your update notification settings to "Only security updates" and maybe "Weekly"
[13:02:47]<mstenta[m]>In general, small feature updates don't warrant a full release of farmOS
[13:03:05]<mstenta[m]>Security updates do - if they post a direct risk to farmOS users
[13:03:06]<frakman1[m]>Understandable.
[13:03:12]<mstenta[m]> * Security updates do - if they pose a direct risk to farmOS users
[13:03:45]<frakman1[m]>Is there a way to upgrade the modules manually if I wanted to? just out of curiousity.
[13:03:58]<mstenta[m]>fwiw, I recently made a pseudo-official policy about this for farmOS 2.x moving forward :-)
[13:03:59]<mstenta[m]>https://docs.farmos.org/hosting/update/#security-releases
[13:04:33]<mstenta[m]>> Is there a way to upgrade the modules manually if I wanted to? just out of curiousity.
[13:04:33]<mstenta[m]>Yes! It's generally just a matter of downloading the new version's tarball and replacing the directory in `profiles/farm/modules/contrib/*` BUT...
[13:05:18]<mstenta[m]>... the reason we don't allow access to the update UI (which would do essentially the same thing) is because farmOS includes some patches for modules... and those patches will not be applied if you simply download the new tarball
[13:05:41]<mstenta[m]>So you have to understand which modules are patched, and how to re-apply patches manually, if you want to update them yourself
[13:06:04]<mstenta[m]>Hence why we just give that blanket statement :-)
[13:06:11]<frakman1[m]>Ah. I wouldn't know which ones are patched would I? That's an internal implementation right?
[13:06:30]<mstenta[m]>This file is what's used to build farmOS, including all the modules and their patches: https://github.com/farmOS/farmOS/blob/7.x-1.x/drupal-org.make
[13:06:48]<mstenta[m]>So... for example, if you search for `date` and `token` in there...
[13:07:09]<mstenta[m]>ACTION < https://matrix.org/_matrix/media/r0/download/matrix.org/PlUUjSdqiGZiZpSM... >
[13:07:33]<mstenta[m]>ACTION < https://matrix.org/_matrix/media/r0/download/matrix.org/ZZXFzmHCrGDnfAWB... >
[13:10:39]<frakman1[m]>Oh cool. I forgot it was open source. That's fascinating. Thank you for sharing the insight.
[13:10:54]<mstenta[m]>I just updated both of those modules in the `7.x-1.x` branch on my fork... waiting to see if the patch applies OK, then I'll push it to drupal.org... that will give you the option to update to the "dev" release if you want
[13:11:28]<mstenta[m]>> I forgot it was open source.
[13:11:28]<mstenta[m]>😄
[13:11:44]<frakman1[m]>So, is it possilbe to include the `smtp` module in this way (`drupal-org.make`) so that future releases will have that available for use?
[13:12:53]<frakman1[m]> * So, is it possible to include the `smtp` module in this way (`drupal-org.make`) so that future releases will have that available for use?
[13:12:57]<mstenta[m]>That would be possible, technically... but I would rather leave that as a decision for site admins to add themselves - alongside any custom modules etc
[13:13:12]<mstenta[m]>(though I'm not opposed to discussing it with the wider community) ;-)
[13:13:20]<frakman1[m]>Ok cool.
[13:13:30]<mstenta[m]>i tend to want to keep dependencies minimal, especially if we aren't using it directly
[13:13:54]<mstenta[m]>(sorry for my memory... but was it you that I talked with about setting that module up in the past?)
[13:14:32]<mstenta[m]>if so, you inspired me to write this doc page for farmOS 2.x: https://docs.farmos.org/hosting/email/
[13:14:33]<mstenta[m]>:-)
[13:16:30]<frakman1[m]> * Thank you for that link. It was exactly what I needed.
[13:16:31]<frakman1[m]>(`https://www.symphonythemes.com/drupal-blog/configure-drupal-smtp-gmail`)
[13:17:36]<mstenta[m]>FYI I just pushed those updates to drupal.org, so a new dev release should be available shortly if you want to update: https://www.drupal.org/project/farm/releases/7.x-1.x-dev
[13:17:45]<mstenta[m]>(Just watch the "Last updated" date on that page for it to update to today)
[13:18:05]<frakman1[m]>Yes, that was me. I was wondering about the documentation. I'm glad you eventually wrote it and thank you for sharing the link to it.
[13:18:09]<mstenta[m]>But you could also just leave it as-is and change the notifications to "security updates only" - might not be worth the time to update just for those two modules
[13:18:26]<mstenta[m]>I need to sign off... take care and good luck!
[13:20:47]<frakman1[m]>Thanks. I looked at the documentation page. My only feedback is to add the link that helped me configure and set it up after installting the SMTP module. The link is: https://www.symphonythemes.com/drupal-blog/configure-drupal-smtp-gmail
[13:21:53]<frakman1[m]>I changed notifications to "security updates only". Thanks
[14:10:08]<mstenta[m]>Good idea frakman1 I'll try to remember to add that
[14:10:33]<mstenta[m]>(or feel free to open a pull request if you are familiar with doing that yourself!)
[19:27:10]<frakman1[m]>I know how to make pull requests for code in github but I didn't think the documentation page was code or was on github. Can you point me to the project to fork please?
[19:33:49]<paul121[m]> The 1.x documentation is here: https://github.com/farmos/farmos.org
[19:34:38]<paul121[m]>and the 2.x docs mstenta shared are being started here: https://github.com/farmOS/farmOS/tree/2.x/docs
[19:38:37]<paul121[m]>I think that's what you're looking for but let us know if not :-)