Log
-
Move to a multi-project maven setup by Caio 7 years ago
-
Revert "Stop using spring-boot-starter-parent as parent" 💬 by Caio 7 years ago
This reverts commit 0a72f9527905c4ca3af4e0577eaac6761e2894bf. I've done it and decided to go back. These are the things I had to do to make the multi-project setup happen: 1. Move the `co.caio.cerberus.boot` into a separate module (web) 2. Move the rest into a library module (core) 3. Create a parent pom with shared dependencies, move the non-shared dependencies around so that they belong to their respective module 4. Make the core library ship a test jar (as simple as activating the `test-jar` goal from maven-jar-plugin) so that both modules have access to the sample recipes and utilities 5. Change Util.java (test scope) to use .getResourceAsStream() so that we can static load it from #3's jar (*shrug* this is so poorly documented that I'm not really sure why .getResource() wasn't working. (NOTE that this means there's a little bit of the strong coupling I wanted to avoid by moving to multi-modules in the first place- At least it is just for tests...) After that was done I wanted to ship the `core` module separately so that the `web` module would only evolve when I released a new core version (same way as I'm interacting with `tablier`); This led me to start fighting with `mvn release:*` since I doesn't like SNAPSHOTS - so my solution would be to not have the `web` module as part of the multi-module project, which meant that the split was pretty much useless as I wouldn't be sharing things from the parent POM unless I started being sillier... Anyway, while doing all this and questioning my sanity I decided that the best way would be to just split the repository and be done with it. If I revisit this I'll probably: 1. Split the `boot` package into it's own repository; And 2. Create a separate project which just ships a parent pom in case I really want/need to share the pluginManagement section But that's a story for another day, I've spent time with this for no particular gain (besides understanding a bit more about maven, so there's that).
-
Log all unknown exceptions in the non-spring path by Caio 7 years ago
-
Stop using spring-boot-starter-parent as parent 💬 by Caio 7 years ago
I'll be moving this to a multi-module project and I don't want the parent to pull all of this into the core. I hadn't realized how many things the starter configures by default. Damn. Thanks <3
-
Add basic logback configuration by Caio 7 years ago
-
Make sure we log unexpected errors (HttpStatus 500) by Caio 7 years ago
-
(Ab?)use Actuator's http tracing to log /go/ requests 💬 by Caio 7 years ago
I don't actually need a full CLF access.log and I'm not particularly worried about abuse when building the graph model, so I go with the least information necessary: 1. Timestamp 2. Address (In prod: `-Djava.net.preferIPv4Stack=true` is set so mostly ipv4s) 3. URI 4. Query parameters The address is not super necessary, but in my experience being slightly smarter when building such graphs yields nicer results.
-
Handle Spring's ResponseStatusException differently by Caio 7 years ago
-
Remove dead lmdb configuration by Caio 7 years ago
-
Show 10 recipes per page 💬 by Caio 7 years ago
With filters enabled this seems more reasonable
-
Use less cryptic css selector assertion 💬 by Caio 7 years ago
This should've been pushed along with c574586c2 but it managed to avoid my intense gaze :x
-
Render recipe URLs with all search parameters 💬 by Caio 7 years ago
This patch switches from using crawlUrl() to using the /go/ route and appends all search parameters to said urls following the idea outlined in b31fb8d995
-
Make these assertions more explicit 💬 by Caio 7 years ago
CSS selectors are cool and all, but I prefer this more explicit style.
-
Implement the /go/{slug}/{id} redirect route 💬 by Caio 7 years ago
This patch implements the /go/ route so that I can do offline log analysis and build a graph model to rank the recipe like: 1. Recipes in /search point at /go/ with all the search parameters included (even though the handler doesn't care about them) 2. The logger writes an access.log-like file with the request 3. I replay these searches somewhere else against the same index data and create a directed edge from every rendered recipe to the clicked one. This allows me to easily have a sort of centrality measure (think PageRank) which I can use to improve how lucene ranks the recipes.
-
Go all-in with functional Webflux 💬 by Caio 7 years ago
At first I had plans of trying WebMVC since the real work is under /search and is CPU bound, but the amount of Invoke* calls in the stacktraces were bothering me quite a lot. This patch converts the boot application to use Webflux.fn, with the added (unintended) benefit of faster tests (I only load the full spring application once now) less runtime reflections and the code looks a lot easier to digest (to me). I'm not super happy with how the ExceptionHandler turned out, but it's definitely better than the previous implementation. I could be weaving .onErrorResume() calls for every handler method, but that's error prone and I would still need a global exception handler anyway, so there's that. At least I can test it if I care enough :-) No significant performance changes. It looks like we produce a little bit less garbage in my not very realistic tests, but most our objects are short lived anyway, G1 has zero issues blasting through them.
-
Simplify List.of().stream() to Stream.of() by Caio 7 years ago
-
Merge branch 'tablier-next' by Caio 7 years ago
-
Point at the released tablier 0.2.0 by Caio 7 years ago
-
Ensure sidebar links always lead to the first page by Caio 7 years ago
-
Wrap up functional tests for SidebarComponent by Caio 7 years ago
-
Verify that isActive is set correctly for sort() by Caio 7 years ago
-
Fix (and test) nutrition filter uri poisoning by Caio 7 years ago
-
Test sort options requirements by Caio 7 years ago
-
Extract sidebar logic into SidebarComponent 💬 by Caio 7 years ago
TODO: Tests
-
Encode OptionalInt.empty() as -1 instead of 0 💬 by Caio 7 years ago
Nutrition data - for example - can be zero, so when encoding it as zero we become unable to differentiate between knowing that the attribute is zero or not having the attribute at all. This patch fixes that.
-
Expose the calories sorting functionality by Caio 7 years ago
-
Add support for sorting by calories by Caio 7 years ago
-
First stab at abstracting the sidebar logic away by Caio 7 years ago
-
Mark active items in the sidebar by Caio 7 years ago
-
Bump to spring-boot 2.1.3 by Caio 7 years ago