Adds a log format setting as ATHENS_LOG_FORMAT that can be either plain or JSON when CloudRuntime is none (the default). Does not break or change any existing behavior.
* Set up and use logrus logger in main
Also return errors more consistently from other functions.
* Updated wording styles
* Prefer human-readable descriptions to method names
* Wrapped errors use gerund forms, e.g. "doing x: %w"
* Log traces start with a capital letter
* Fix style on standard log failure cases
---------
Co-authored-by: Manu Gupta <manugupt1@gmail.com>
Currently, when shutting down the server (via SIGINT or SIGTERM), the
shutdown closes any open connections after only 10 seconds (via a
context.WithTimeout). This does not provie a lot of time for longer
operations, such as listing versions, or downloading a larger module zip
file.
When running in Kubernetes, and scaling instances or changing config,
this causes a lot of dropped connections and gateway errors. 10 seconds
is arguably much too short, and should be configurable.
This commit increases that default to 60 seconds, and adds a config
variable to allow users to specify their desired timeout.
This CL addresses issue #1177 introducing two new configuration params
allowing to activate pprof.
- `ATHENS_ENABLE_PPROF`
- `ATHENS_PPROF_PORT`
pprof won't be exposed by default.
* poc
* finish JSON, remove uneeded methods, update docker file, finish script details
* build.Details didn't need to be exported
* typo
* somehow missed this
* should default to false
* Fix some things
remove commit SHA as build script will now create a hybrid for version
as in the push-docker-images.sh script, code shamelessly stolen.
change JSON function to Data and return a struct, the caller can do what
they like with that data, i.e. marshall JSON for a response body.
* add struct tags
* use build script in docker image
* newline in build.sh
* use previously generated version for binary build
* Working docker args
removed script build.sh, was not really needed.
date is generated automatically during docker build process.
VERSION will be set to 'Not Specified', or the version set during
our CI docker build/push step. A user can set their own version during
build using ldflags.
* remove old comment re: script
* Yikes
Almost forgot to remove my testing junk
* GitHub on my phone is hard
* switch proxy to config file
pull in single flight changes
* changes for single-flight
* intermediate stage. All tests passing. pkg still has env refs
* remove all env references
* delete config/env entirely
* fix failing tests
* create the config.toml file as part of dev setup
* create config file only if it doesn't exist
* update Dockerfiles to use config file
* move composing elements to the top
* verbose parameter naming
* newline
* add flag for config file path
* update docs with config file flag
* remove unnecessary nil check
* use filepath.join
* rename redis port to address
* fix path.join
* fix issues after merge
* add vendor dir
* basic structure
* added olympus endpoint for fetching log
* broken test
* added backing buffalo job
* slightly reshuffled, todo more shuffling
* reshuffle more
* breaking things up
* more breaking up
* hook to 101
* added redis to docker compose file
* working!
* a
* build fix
* first batch of changes towards new arch"
* first batch of comments resolved
* override for olympus endpoint
* styling
* osFs fix
* fixed in memory storage
* in-mem storage and test (#166)