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.
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.
* read redis lock options from config to support custom TTL & timeout
* fix test
* fix typo
* downgrade to bsm/redislock@v0.7.2 to prevent usage of beta go-redis version
* revert test changes
* return error for invalid lock config
* update config parsing test
* udpate docs to include redis lock config
* fix test
* set default max retries to 10
* reduce default redis lock timeout to 15s
* update default TTL to 15mins
Co-authored-by: Manu Gupta <manugupt1@gmail.com>
* Reverting PR 1650
https://github.com/gomods/athens/pull/1650 was a big change to the
authentication/authorization code, which we have decided to pull
out and potentially move into a separate process/project
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing commented, unused code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing more commented, unused code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* removing more unused code
Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
* add config options for redis password
* redis password test and failure test
* changed redis name and made a minimal redis.conf
add drone volume
volume fix
remove volumes from drone.
repoint redis path
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
Co-authored-by: Marwan Sulaiman <marwan.sameer@gmail.com>
* Fixing the build failures from a missing GCS Key
Accidentally introduced in https://github.com/gomods/athens/pull/1428
* Adding a TODO to the drone build
* adding a step to test the Athens server startup
* Adding the JSONKey back to the default config
* use temporary image
* Switching back to the old env var for the GCS JSON Key
cc/ @marwan-at-work
* removing the ServiceAccount. we want to stick with JSONKey
* reverting to original key fetching code
* fixing build err
* bumping chart ver
* Add GCS to helm chart
* base64 encode serviceAccount in the chart
* Standardize GCP Service Account references
* pipe storage.gcp.serviceAccount to quote
* cmd/proxy/actions: pass NoSumPatterns to GoGetFetcher
* add gosum unit tests
* upgrade appveyor to 1.13
* fix test typo
* check appveyor version
* AppVeyor has no 1.13
* use logger
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.
* actions: support proxying sum db urls
* remove proxy prefix
* add docs for checksum db
* more docs
* typo
* typo
* typo
* typo
* typo
* typo
* typo
* typo
* move checksum db into its own section
* add azblob sf stasher
* use http status const
* rm line
* cleanup, comments
* add test
* fix test
* skip test it no account key provided
* fix stash
* introduce stash timeout
* Rename config.dev.toml to config-example.toml
* Updating helm docs to point to the new helm chart repository (#1102)
* Updating helm docs to point to the new helm chart repository
Fixes https://github.com/gomods/athens/issues/1099
Follow-up to https://github.com/gomods/athens/pull/1097/files
* fixes
* Helm chart: Fix ingress setup (#1086)
* Helm chart: Fix ingress setup
The ingress part of the Helm chart contained references to
not-existing templates and values. Additionally, the deployment used
some no longer available health-check URLs which prevented it from
being marked as ready.
* Make readiness and liveness paths depend on the image.tag
* Add read from .athens.toml (from pwd, then home)
* Remove config lookup from HOME
* Revert "Rename config.dev.toml to config-example.toml"
This reverts commit 9c02956406.
* Fix comment
* Allow mgo.ParseURL to set [/database]
As per Michael's solution we need to be able to set the database from
either the parsed connection string, or fallback to athens if not set.
Signed-off-by: Chris M <me@christophermills.co.uk>
* Remove TimeoutDuration which was removed #928
Signed-off-by: Chris M <me@christophermills.co.uk>
* Correct conf_test to accommodate for changes
I'd missed out the addition of DefaultDBName from the test, this has now
been corrected
Signed-off-by: Chris M <me@christophermills.co.uk>
* Make sure gofmt runs automatically on this machine
Y'know simple stuff.
Signed-off-by: Chris M <me@christophermills.co.uk>
* Added new cataloger interface
* Implementing catalog protocol
* Propagated to protocol and over
* First round of fixes
* S3 almost ready, need to be tested
* Going on with testing s3
* Better testing with s3
* Simplified catalog tests
* Preparing gcp tests to access a gcp instance
* Fixing initialization errors
* Removed some prints
* Gcp ready, to be tested
* Gcp working
* Aligned bucket mock to catalog method
* Switched res payload to json
* Added catalog method to all storage instances
* Added catalog method to unsupported storages
* Fixed with pool test
* Restored tests
* Fixed gcp constructor
* Implemented catalog for fs
* Removed trace
* E2e tests, fixed fs
* Fixed module name return value
* Added cataloger method to azure storage
* Added docs
* Changed pagesize parameter name
* Fixed gofmt error
* Added json tags to result. Fixed lint warning
* Removed extra line
* Changed not implemented error to http.KindNotImplemented
* Checking for inequality on results
* Lower-cased json keys
* Added cleaning of path separator
* Fixed review comments
* Add catalog endpoint for mongo
* Add omitempty to ID
* Fix catalog tests
* update for next token
* fix e2e
* Make query readable
* Fix language and e2e script
* remove new line