diff --git a/README.md b/README.md index 0ea0b9a..0aa4ecb 100644 --- a/README.md +++ b/README.md @@ -86,3 +86,4 @@ Configuration is done via environment variables. Standard AWS SDK Environment va 1. There's a slew of app optimizations still left, such as separating `/ping` and `/metrics` endpoints onto different listeners (separate for application endpoints), make logging configurable between text/color and JSON and some other things. This was my first time using Gin. 2. I didn't configure test coverage or pay attention to that much. Just wrote a few small unit tests and a sanity-check end2end test (just verifies that the app runs and I can /ping it) via docker-compose. +3. go and jsonnet/jb/tanka fight over the `vendor` directory. This is somewhat fixed with `-mod=readonly` or `-mod=mod` as an explicit flag to go commands, or `GOFLAGS=-mod=mod`, however, Jetbrains GOLAND still has problems if the `vendor` directory exists and doesn't have go files in it. See https://youtrack.jetbrains.com/issue/GO-10952/No-way-to-disable-vendoring-for-Sync-Dependencies-quick-fix. To get Goland to not freak out, `rm -rfd vendor`. This of course breaks all the Jsonnet, so when you are ready to do anything else, run `task jb:install`. Another possible way to fix this is if tanka supported other vendor directories. See https://github.com/grafana/tanka/issues/356 and https://github.com/grafana/tanka/issues/820. diff --git a/taskfile.jsonnet b/taskfile.jsonnet index 1a80dce..7b688f3 100644 --- a/taskfile.jsonnet +++ b/taskfile.jsonnet @@ -7,6 +7,10 @@ taskfile + (import "github.com/ghostsquad/practice-layers/taskfile/go.libsonnet") + (import "./config.libsonnet") + { + env+: { + // TODO contribute this upstream + GOFLAGS: "-mod=mod", + }, vars+: { EXPECTED_GO_VERSION: $.config_.go.expectedVersion, K3D_APP_IMAGE: std.join("/", [$.config_.kubernetes.k3d.registry, $.config_.project.repoShort]) + ":{{.GIT_COMMIT}}"