Commit Graph

16 Commits

Author SHA1 Message Date
Nicholas Wiersma
d932d50232 chore: lint code with golangci-lint (#1828)
* feat: add golangci-lint linting

* chore: fix linter issues

* feat: add linting into the workflow

* docs: update lint docs

* fix: cr suggestions

* fix: remove old formatting and vetting scripts

* fix: add docker make target

* fix: action go caching

* fix: depreciated actions checkout version

* fix: cr suggestion

* fix: cr suggestions

---------

Co-authored-by: Manu Gupta <manugupt1@gmail.com>
2023-02-24 20:39:17 -08:00
Rob Prentiss
6baf7c9033 Handle SIGTERM on unix-like OS (#1805) 2023-01-24 18:04:56 -08:00
Rob Prentiss
a1553999bb Make shutdown timeout configurable (#1806)
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.
2023-01-23 22:02:45 -08:00
Benjamin
e832c83ecd [debug] allow to expose activate via config (#1284)
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.
2019-06-24 20:59:15 +02:00
marpio
c3d1d14d23 Use default conf values if file not found (#1022)
* default conf if no file provided

* move to the config pkg

* rm default config path

* rm log
2019-02-14 11:32:53 -08:00
Marwan Sulaiman
3908adc78c cmd/proxy: print port at server start (#1018) 2018-12-26 14:03:47 -08:00
Marwan Sulaiman
5870aeee8d Remove Buffalo (#1010)
* Remove Buffalo

* gofmt

* pr fixes

* fix subrouter

* bring back secure middleware + pr fixes

* better place for subrouter

* vendor
2018-12-22 20:24:25 -05:00
Pontus Leitzler
fe032bc5ca Add support for TLS (#979)
* Add support for TLS

* Fix review comments
2018-12-09 07:27:49 -05:00
Rob j Loranger
2f524d27c3 add build details to binary (#866)
* 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
2018-11-09 10:32:55 -08:00
marpio
bcc896f226 rename example to dev and rm test config (#691) 2018-09-20 16:38:08 -04:00
Marwan Sulaiman
d314c7847f Make example config the default for dev (#683) 2018-09-20 12:35:46 -04:00
Rohan Chakravarthy
0e470d0294 Plumb config - Latest (#627)
* 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
2018-09-11 15:04:20 -07:00
Michal Pristas
7795def18b SkipDead for workers (#256)
* skip dead

* refactor

* real redis tests of workers

* configurable maxfails
2018-07-13 12:18:24 -07:00
Michal Pristas
514ac49659 Support for exclude include (#212)
* almost there

* loading file

* fixed after real test

* fixed includes"

* configurable filter name

* custom error
2018-07-09 09:58:51 -07:00
Michal Pristas
6c4a0641df Background job for pulling modules from olympus (#132)
* 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)
2018-06-11 18:12:10 +02:00
Michal Pristas
9c14b1fd12 Proposal: move buffalo app to cmd (#91)
* buffalo app moved to cmd

* ooops:

* added copy of proxy as olympus

* removed buffalo test

* added blank endpoint for feed

* forgot db config file and storage setup

* resolved comments

* newlines

* resolved conficts
2018-03-28 10:30:56 -04:00