Submit

Back to the channels

#primate

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

Search posts