< 152022-11-16⋎17 >

Topic for #farmOS is: farmOS (farmos.org) is a free and open source, web-based farm management system. User guide: farmos.org/guide/ - Forum: farmOS.discourse.groupSet by mstenta on 2021-06-15 at 12:52
02:00*farmBOT has quit (Ping timeout: 268 seconds)
02:01*farmBOT has joined
13:25mstenta[m]Anyone want to go to Brussels and represent farmOS? :-) blog.publiccode.net/news/2022/11/10/fosd
13:32mstenta[m]📣 calling all farmOS folks in Europe! 😉
15:47mstenta[m]The MariaDB test failures are becoming quite annoying
15:48mstenta[m]I wonder if we should disable parallel test runs on that too, like we did on SQLite3
17:08paul121[m]Yes I was thinking the same! It's been bad lately
18:06riotmiked[m]Would that impact MariaDB compatibility? Or is it just how tests are run?
18:07paul121[m]riotmiked[m]: Something with how tests are run. We frequently get this error: github.com/farmOS/farmOS/actions/runs/34
18:07paul121[m]> <li>Failed to connect to your database server. The server reports the following message: <em class="placeholder">SQLSTATE[HY000] [2002] Connection refused</em>.<ul><li>Is the database server running?</li><li>Does the database exist or does the database user have sufficient privileges to create the database?</li
18:08riotmiked[m]Roger that - I'm using the MariaDB plugin for Home Assistant for backend.
18:08paul121[m]but mstenta the latest commit on 2.x was an actual test failure.. github.com/farmOS/farmOS/actions/runs/34
18:09paul121[m]paul121[m]: oh but the tests did pass on pgsql. this seems like an oauth/consumer related failure. hmmm
18:10paul121[m]I'm going to re-run all of those jobs on the latest commit :-)
18:20symbioquine[m]<mstenta[m]> "I wonder if we should disable..." <- With SQLite we had a hypothesis about why they were failing when run in parallel - i.e. the DB doesn't really support parallel access
18:20symbioquine[m]It doesn't seem like that same hypothesis makes sense for Postgres. Do we have a different one?
18:35paul121[m]> <@symbioquine:matrix.org> With SQLite we had a hypothesis about why they were failing when run in parallel - i.e. the DB doesn't really support parallel access
18:35paul121[m]> It doesn't seem like that same hypothesis makes sense for Postgres. Do we have a different one?
18:35paul121[m]you mentioned Postgres, but think we are talking about mariadb here. Likely the same question though!
18:36symbioquine[m]ah, yep
18:36symbioquine[m]My bad
18:37paul121[m]I know I've had to tweak the number of connections for DBs in the past.. could that be relevant? maybe we can run a few tests in parallel, but we're just running too many?
18:37paul121[m]and postgres has a higher default than mariadb?
18:38symbioquine[m]Seems like a good hypothesis
18:38symbioquine[m]Seems like it would be nice to raise the MariaDB connections (if that's the case) to match rather than reducing the test parallelism
18:39paul121[m]Not sure that explains why this only happens some of the time. I assume phpunit would run the same number of tests in parallel, but maybe it's an issue of how long individual tests take, which could have some variability?
18:39paul121[m]Are tests always run in the same order? Is it alphabetically?
18:39symbioquine[m]Yeah, I bet it's a classic race condition scenario :)
18:41symbioquine[m]Even if every test were perfectly deterministic and enqueued in the same order we wouldn't necessarily expect the same execution timings given modern kernel/cpu architectures.
18:42symbioquine[m]Lots of other variables like what other processes are associated with which cores, their nice values, and thread affinities
18:43symbioquine[m]Not to mention we're probably talking about tests running in VMs on servers running which are running loads for lots of other things so it's easy for differences in which tests are IO, memory, or CPU bound to affect their completion times as a function of noisy neighbors on the host.
18:55symbioquine[m]<mstenta[m]> "Oh even better... YOU opened the..." <- What I'm struggling with related to this issue now is what the expected response would be for some of the relationships...
18:59symbioquine[m]For example, it's pretty simple if you go to `/api/asset/animal/resource/relationships/owner/related/schema` it's pretty obvious the type of the owner is "user--user" and so the page for the relationship schema should have `.definitions.data.items.$ref="my.farmOS.example/api/user/user/resource"`
19:00symbioquine[m]But on the other hand we have relationships that aren't constrained to a specific entity/bundle like the `parent` relationship. What would we expect the value of `.definitions.data.items.$ref` to be at `/api/asset/animal/resource/relationships/parent/related/schema`?
19:02symbioquine[m]I also wonder whether the enum of allowed types on the asset schema should list all the `asset--*` types instead of just being missing?
19:06symbioquine[m]e.g. Something like;... (full message at <libera.ems.host/_matrix/media/v3/downloa>)
19:07paul121[m]symbioquine[m]: I believe I opened an issue for this one :-)
19:08symbioquine[m]In the `jsonapi_schema` project issue queue?
19:08symbioquine[m]www.drupal.org/project/jsonapi_schema/is ?
19:09paul121[m]yeah I believe that is it
19:09symbioquine[m]Cool
19:10paul121[m]because our equipment reference field does do it!
19:10symbioquine[m]Yeah, it clearly works correctly under some scenarios
19:11paul121[m]I forget if a single `entity_reference` field can reference different entity types... if so, might be another complication
19:11paul121[m]and more reason to include it in the `enum`!
19:11mstenta[m]doh! i gave up waiting for it and merged because psql passed
19:11mstenta[m]> but mstenta the latest commit on 2.x was an actual test failure.. github.com/farmOS/farmOS/actions/runs/34
19:12mstenta[m]did you rerun?
19:16paul121[m]mstenta[m]: yeah, looks like it passed here: github.com/farmOS/farmOS/actions/runs/34
19:16mstenta[m]ok phew
19:16mstenta[m]so we're good?
19:17paul121[m]yes I think so!
19:27mstenta[m]paul121: ok if I merge this? github.com/farmOS/farmOS/pull/594
19:27mstenta[m]I adopted your first suggestion, but punted on the other one
19:27paul121[m]yep!
19:28mstenta[m]i have ONE more MR i'd love to toss in front of you for consideration if you have a moment :-)
19:28paul121[m]sure!
19:28mstenta[m]www.drupal.org/project/farm/issues/33169
19:29mstenta[m]it's pretty minor, and maybe unnecessary/arguable... if it doesn't seem like an easy "accepted" then we can punt/close it
19:32paul121[m]ah, there's a distinction between "extending" and "using" a class.. the issue description says to prevent downstream from extending classes. so I was surprised to see the log query documentation disappear... but sounds like we want to prevent others from *using* these as well
19:33mstenta[m]oh good distinction
19:33mstenta[m]yea i suppose i was thinking both
19:33mstenta[m]i'm on the fence about the log query one...
19:33mstenta[m]but i felt like it's easier to "hide" it to start and "reveal" it later than vice versa
19:34mstenta[m]and the `farm_update` one feels like something we may end up changing - as we find more issues with it
19:34mstenta[m]and the managed role stuff - i still feel like that could become a standalone drupal module!
19:35paul121[m]mstenta[m]: yeah I kinda wonder how much we even need this helper tbh. but that's a reason to mark it @internal, if we ever want to remove it..
19:35mstenta[m]yeaaa
19:36mstenta[m]exactly
19:36mstenta[m]having it public from the start means we are on the hook
19:36mstenta[m](another thing to remove from `farm_log` module! haha)
19:37paul121[m]> The log query service is a helper service for building a standard log database
19:37paul121[m]query. This is primarily used to query for the "latest" log of an asset.
19:37paul121[m]The asset location and group membership services use this.
19:37paul121[m]maybe we just need a service for getting an asset's latest log
19:38mstenta[m]yea
19:39mstenta[m](that's also related to the work i started on the circular location and group membership stuff, and the prereq of passing a timestamp into those services)
19:39mstenta[m](which i don't foresee getting done before the next release, but hopefully soon)
19:39mstenta[m]right now i'm just trying to merge all the easy stuff so we can get a new release out soon
19:40mstenta[m](of course, i'd also like to include this one if we can: github.com/farmOS/farmOS/issues/579)
19:41paul121[m]> It makes me think that once we start doing this, it's just another thing we need to remember to add to new classes moving forward as well, so we might end up being inconsistent with it. Maybe better to just never start?
19:41paul121[m]You commented this on the issue. Inconsistency isn't good, but I think including this on farm_update and managed role things is certainly more important & outweighs any inconsistency concern :-)_
19:42mstenta[m]yess
19:42mstenta[m]i was thinking more about OTHER kinds of classes in that comment (eg `Form`)
19:42mstenta[m]i think we can just apply to these couple and call it good
19:43mstenta[m]with `Form` and other common class types, it would become more of an ongoing thing to remember
19:43mstenta[m]and the only reason i even bring that up is because i saw that Drupal core applies it to some of it's form classes
19:44mstenta[m]i didn't dig into what the reasoning was, or when that would be a good thing... i'm not sure we need to worry about it
19:44paul121[m]Ah yeah interesting... yeah almost wish we could explicitly mark which ones are public haha. All `Base___` classes haha
19:44mstenta[m]yeaa
19:44mstenta[m]oh well, thanks for the RTBC - i'll merge that
19:45mstenta[m]are there any other PRs/MRs that folks are hoping to get into the next release (ideally ones that are all ready to go and don't require a lot of deep thinking haha)
19:45paul121[m]are you familiar with php `final` classes?
19:45mstenta[m]oh yea, that basically means it CAN'T be extended, right?
19:45mstenta[m]never really used it
19:45paul121[m]that would be the way to enforce things are not extended. it might make sense to do that for that managed role permissions tbh
19:45mstenta[m]ah yea interesting
19:46mstenta[m]tempted to do that on the group location class... don't make this any more complicated lol
19:46paul121[m]ah, the class can be final, or individual methods/constants:
19:46paul121[m]> The final keyword prevents child classes from overriding a method or constant by prefixing the definition with final. If the class itself is being defined final then it cannot be extended.
19:46paul121[m]yeah
19:47paul121[m]there are probably clever ways to get around it (maybe alter service definitions to use a different class, like what we did for simple oauth?) but we can do our best
20:36mstenta[m]> Anyone want to go to Brussels and represent farmOS? :-) blog.publiccode.net/news/2022/11/10/fosd
20:36mstenta[m]I might microblog this to Mastodon/Twitter - it would be cool if someone who is in Europe was able to attend!
21:03FarmerEd[m]Might be no harm to ask in the forum too, a few active users there don't appear on here very often.
21:24mstenta[m]farmos.discourse.group/t/represent-farmo

< 152022-11-16⋏17 >