* 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>
When using Minio storage, memory usage constantly increases. After
profiling, it appears that memory usage is building in the minio client,
and not being released.
Finding a similar issue listed in the minio/warp project, I found that
they fixed the issue by closing the *minio.Object instances. In the
athens usage, the minio.Object instances are never closed after reading
the data from them.
This adds deferred 'Close' calls in the 'storageImpl.Info' and
'storageImpl.GoMod' functions so that the objects may be released and
garbage collected. The 'storageImpl.Zip' function does not use defer,
since it has the object embedded into the return value, so the 'Close'
is only called on error.
* fix: flake on redis-sentinel by depending on redis container / step.
Signed-off-by: Manu Gupta <manugupt1@gmail.com>
* Add retries in an attempt to reduce the number of flakes
Also; update go-redis.
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
* Set GO111MODULE to auto in golint script– #1743
As mentioned in #1743 the Go modules environment flag is set to `off`
in the script which appears to cause a warning message for each module
of the codebase that it is "not in GOROOT".
Set to `auto` as this allows the same build to be run the original way
should someone choose to delete the `go.mod` file from the project root.
* Remove redundant code – golint script
Go 1.17 ignores `GO111MODULE` and there are no directories in the
project root called `mock`.
* Replace `golint` with `go vet`
`golint` is deprecated (and frozen) replace with the current `go vet`.
This reported one issue on `main` branch:
```pkg/stash/with_etcd.go:33:28:
loop variable ep captured by func literal```
Fixed loop variable capture with extraction to parameterised anonymous
function passed loop variable and passed in to `errgroup.Go` call.
* 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>
* Display a warning log message if the validation response fails with a valid reason
* provide a reason and description for failed validation
* added unknown to description
* Allow a successful response to carry a message
* tidy up
* formatting
* Simplified the message response
* updated based on latest comments
* no need to export struct
* suggested method rename
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
* Unescape key before attempting to split module and version
* PathUnescape key in minio/lister
* use unescaped path for module
* Compare againse escaped key
* Exctract common key parsing from cataloger and lister
* Add working image for minio
Between RELEASE.2019-09-26T19-42-35Z and RELEASE.2019-10-02T21-19-38Z
there's an issue with continuation tokens that's caused #1414 and #1413
to fail.
Signed-off-by: Chris M <me@christophermills.co.uk>
* Undo docker changes, update minio to v6
* Narrow issue down to catalog compliance test
Signed-off-by: Chris M <me@christophermills.co.uk>
* Allow EnvList.Validate to have multiple = for GODEBUG var
* Added tests for EnvList GODEBUG.
* Made EnvList.Validate less strict, just checks for existence of one equal sign
* 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