Submit

Back to the channels

#primate

  1. * phaleth joined #primate
  2. phaleth hi blue, can you hop on the VPS and get into primate website container `sudo machinectl shell 000000-primate-web` and check the logs `journalctl -n 500 -f -u primate-web`? there are a bunch of weird errors that are I guess non-fatal, but still look weird
  3. * perigrin_ joined #primate
  4. * onosendi_ joined #primate
  5. blue phaleth: ya
  6. blue Mar 21 10:10:43 primate-web edge[55]: [ERROR] headers has no key Accept
  7. blue you mean this?
  8. phaleth yeah, all of those
  9. blue I think it's all probably somebots
  10. blue it looks like AI trying to update its cache, because it's accessing the .md version of pages that no longer exist
  11. blue Mar 21 09:56:05 primate-web edge[55]: [ERROR] no view docs/guides/databases/use-surrealdb.md
  12. blue .md are the markdown version ofpages, and they're referenced in https://primate.run/llms.txt
  13. blue the missing Accept headers are faulty clients, I think
  14. blue https://github.com/primate-run/primate/blob/master/packages/core/src/private/frontend.ts#L175
  15. phaleth can those client side errors be turned off for production builds? for debugging those might be interesting
  16. phaleth in other words can you set log level of those to DEBUG?
  17. blue https://github.com/primate-run/primate/blob/master/packages/core/src/private/request/RequestBag.ts#L97
  18. blue specifically it's this line
  19. blue and then this
  20. blue https://github.com/primate-run/primate/blob/master/packages/core/src/private/error.ts#L94-L96
  21. blue so what I could do, in https://github.com/primate-run/primate/blob/master/packages/core/src/private/frontend.ts#L175
  22. blue is use .try instead of .get
  23. blue .get is *supposed* to throw if the key is not found, it's a hard condition
  24. blue and I think the semantics of using .get there are simply wrong, it's ok to not provide an Accept, I think
  25. blue a bit weird, but ok
  26. phaleth if haproxy let the request through then it's an ok request
  27. phaleth lets*
  28. blue try. as said, it's just weird clients that do not specify an "Accept" header at all, and primate assumes there all clients do. the invariant is too strong
  29. blue s/try/true/
  30. phaleth for Accept header specifically, not setting Accept means expecting the default Content-Type in response, nothing wrong with that
  31. blue anyway, I'll change the code, but I won't release a new version for it. if that bothers you edit packages/core/lib/private/frontend.js#89
  32. blue and change .get to .try
  33. phaleth ok, thanks, I guess those logs are too few, can wait for new release later
  34. blue phaleth: https://github.com/primate-run/primate/commit/03b8838be022c8b7bc7c8cc6825fccb26cf65723
  35. nevet core/frontend: use try instead of get when checking the request Accep… · primate-run/primate@03b8838
  36. phaleth also in case of primate website there is actually no need for a release as it's build against master
  37. phaleth it may not build against current master, but that's another thing
  38. blue yes but I do rather you won't redeploy just yet because the docs are now geared to .37
  39. blue this is an unsolved problem for me yet. I thought of changing the redeployment branch to .36, but that's insane. I would have manage two docs versions and port forward any fixes
  40. phaleth no worries, I've made a backup of the primate website container
  41. blue it's all fine, the changes aren't great so far. it's just the baking .37 blog post, and the modules page
  42. phaleth currently I'm testing the new shiny edgejs runtime and watching it leak memory all over the place
  43. blue I really don't know how to version docs in a way that's not a total pain in the butt
  44. blue (edgejs was written by a clanker)
  45. phaleth yes, by clanker
  46. blue so clanker told me, split your docs into docs/master and docs/next or so. but that's so crazy
  47. blue because I'd need to have two duplicated docs tree
  48. blue and then still make some changes in both
  49. phaleth if needed we can always just git checkout whatever primate can build the primate website and fetch the markdown files for docs separately
  50. blue and then when I do a new release, I need to cycle it, cp next into master
  51. blue the next-to-be idea is, have the website actually do a git peek or whatever it's called in the git branch for the last version
  52. blue next-to-best*
  53. blue then I don't need to duplicate anything, but I still need to update docs fixes in both master and the last branch.. which is I guess acceptable
  54. blue and then I'd need to add a dropdown in the website between master and last version
  55. blue it's really not worth versioning docs between non-majors, I feel
  56. phaleth just keep single master branch and keep going for now, one day you will have a release and you will fix the build
  57. blue ya

Search posts