Tags: jlewi/foyle
Tags
Create a link to open up the pages in vscode (#358) Create a link in the right hand side bar to open up the current page in VSCode. If Runme is installed this will open it up as a notebook. Here's how this work * VSCode registers to handle URI "vscode://" so you can use a URI like "vscode://file/some/file.md" to open that file in VScode. So we customize the partial [page-meta-links.html](/~https://github.com/google/docsy/blob/main/layouts/partials/page-meta-links.html). This shows up in the right hand navigation bar and shows links to "edit the page". We add a link to this to open in VSCode using a vscode URI. A limitation of "vscode://file" URIs is that they only work with absolute paths. So we need to know the BasePath where the repo is cloned in order to have the correct path. This will be different for every user. We can store this in localstorage. So we add some JS to get the value from localstorage and adjust the links. We also add a settings page to allow users to set BasePath
SQLITE Contention: Add retries and enable WAL mode (#355) * Using SQLITE's busy timeout didn't fix the issue with busy errors preventing sessions from being updated and learning from occuring. * Enabling WAL mode seems to have made a huge difference * WAL uses a separate file to log edits and allows concurrent reads and writes * Add logic at the application layer to retry the updates. * Use an atomic counter to track the number of concurrent updates to try to confirm we don't have multiple concurrent writes. * To better track issues with Analyzer lag start tracking the timestamp of the lag processed log message. * Add a Gauge metric to report Analyzer LAG
Improve observability; add sqlite retries to deal with sqlite_busy er… …rors (#352) * Use the pragma `sqlite_busy` to add automatic retries on sqlite busy error * I was seeing high rates of sqlitebusy errors when deployed on K8s on Azure and this was causing learning to happen much less frequently then it should * Clean up the prometheus metrics to support dashboards for monitoring impact. The key metrics we want are * Number of accepted suggestions * Number of executed cells * Number of learned examples * Cleanup up prometheus metrics so we can better monitor why learning isn't happening; this was used to track down sqlite busy errors * Support monitoring with Datadog * With Datadog structured logging we need to use the field "level" for severity or else it won't automatically parse that field * Udpate the configuration to allow the user to control what fields are used in the encoder
Fix sqlite busy errors (#347) Fix sqlite busy errors with session based learning There were a couple different errors * We were still enqueing block ids and not sessions in some places * When we call Enqueue we should filter out sessions that aren't suitable for learning; this should minimize DB contention * Improve logging By default sqlite doesn't have any retries for SQLITE_BUSY errors. We could configure a timeout for retries using a PRAGMA; we should probably do that but I want to hold off to see if this PR fixes the contention. * Filed #348 to follow up on this Use ko to create docker images as part of the development process * This is convenient when we want to build a docker image from our latest changes without doing a relase. * Change the Dockerfile to not include any arguments so that it is compatible with the image ko builds
PreviousNext