Chat Logs

  1. * phaleth joined #primate
  2. phalethhi 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. bluephaleth: ya
  6. blueMar 21 10:10:43 primate-web edge[55]: [ERROR] headers has no key Accept
  7. blueyou mean this?
  8. phalethyeah, all of those
  9. blueI think it's all probably somebots
  10. blueit looks like AI trying to update its cache, because it's accessing the .md version of pages that no longer exist
  11. blueMar 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. bluethe missing Accept headers are faulty clients, I think
  14. bluehttps://github.com/primate-run/primate/blob/master/packages/core/src/private/frontend.ts#L175
  15. phalethcan those client side errors be turned off for production builds? for debugging those might be interesting
  16. phalethin other words can you set log level of those to DEBUG?
  17. bluehttps://github.com/primate-run/primate/blob/master/packages/core/src/private/request/RequestBag.ts#L97
  18. bluespecifically it's this line
  19. blueand then this
  20. bluehttps://github.com/primate-run/primate/blob/master/packages/core/src/private/error.ts#L94-L96
  21. blueso what I could do, in https://github.com/primate-run/primate/blob/master/packages/core/src/private/frontend.ts#L175
  22. blueis use .try instead of .get
  23. blue.get is *supposed* to throw if the key is not found, it's a hard condition
  24. blueand I think the semantics of using .get there are simply wrong, it's ok to not provide an Accept, I think
  25. bluea bit weird, but ok
  26. phalethif haproxy let the request through then it's an ok request
  27. phalethlets*
  28. bluetry. 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. blues/try/true/
  30. phalethfor Accept header specifically, not setting Accept means expecting the default Content-Type in response, nothing wrong with that
  31. blueanyway, 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. blueand change .get to .try
  33. phalethok, thanks, I guess those logs are too few, can wait for new release later
  34. bluephaleth: https://github.com/primate-run/primate/commit/03b8838be022c8b7bc7c8cc6825fccb26cf65723
  35. nevetcore/frontend: use try instead of get when checking the request Accep… · primate-run/primate@03b8838
  36. phalethalso in case of primate website there is actually no need for a release as it's build against master
  37. phalethit may not build against current master, but that's another thing
  38. blueyes but I do rather you won't redeploy just yet because the docs are now geared to .37
  39. bluethis 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. phalethno worries, I've made a backup of the primate website container
  41. blueit's all fine, the changes aren't great so far. it's just the baking .37 blog post, and the modules page
  42. phalethcurrently I'm testing the new shiny edgejs runtime and watching it leak memory all over the place
  43. blueI 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. phalethyes, by clanker
  46. blueso clanker told me, split your docs into docs/master and docs/next or so. but that's so crazy
  47. bluebecause I'd need to have two duplicated docs tree
  48. blueand then still make some changes in both
  49. phalethif needed we can always just git checkout whatever primate can build the primate website and fetch the markdown files for docs separately
  50. blueand then when I do a new release, I need to cycle it, cp next into master
  51. bluethe 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. bluenext-to-best*
  53. bluethen 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. blueand then I'd need to add a dropdown in the website between master and last version
  55. blueit's really not worth versioning docs between non-majors, I feel
  56. phalethjust keep single master branch and keep going for now, one day you will have a release and you will fix the build
  57. blueya