359 Commits

Author SHA1 Message Date
Marwan Sulaiman
2d3250ffba Init events 2020-07-31 14:43:37 -04:00
Marwan Sulaiman
dfb7887080 Allow Athens to Propagate Authentication to Mod Download (#1650)
* Allow Athens to Propagate Authentication to Mod Download

* update readme

* add pattern matching to auth propagation

* Propagate authentication to pre declared static host

* quote redis test

* fix flaky redis error message

* fix config tests

* fix config tests

* Update config.dev.toml

Co-authored-by: Ted Wexler <ted@stuckinacan.com>

* gofmt

Co-authored-by: Ted Wexler <ted@stuckinacan.com>
2020-07-30 17:06:53 -04:00
Marwan Sulaiman
81906b918f pkg/requestid: add Request ID to Athens requests and logs (#1655)
Co-authored-by: Ted Wexler <ted@stuckinacan.com>
2020-07-27 12:37:36 -04:00
Marwan Sulaiman
4ad3dd1135 pkg/config: make test failures output diff instead of %+v (#1652)
Co-authored-by: Ted Wexler <ted@stuckinacan.com>
2020-07-27 12:28:26 -04:00
Marwan Sulaiman
46f176482f pkg/stash: fix redis failing test (#1656) 2020-07-27 12:17:08 -04:00
Marwan Sulaiman
d6f06d0302 index: gracefully handle duplicate module indexes (#1645)
* index: gracefully handle duplicate module indexes

* fix memory impl
2020-07-03 10:42:51 -04:00
Keith Burdis
78101d3694 Support downloadURLs with paths (#1640)
* Support downloadURLs with paths

* Always join URL paths with forward slashes
2020-06-28 16:07:05 -04:00
Marwan Sulaiman
ef15c3458b Allow users to specify the module fetcher's temporary directory (#1636) 2020-06-25 17:15:15 -04:00
Marwan Sulaiman
52934cfa46 implement /index endpoint (#1630)
* implement /index endpoint

* rename to Module to Path
2020-06-24 14:29:30 -04:00
Marwan Sulaiman
f01c645305 pkg/middleware: add tracing to ValidationHook (#1627) 2020-06-15 16:34:24 -04:00
Marwan Sulaiman
90af973c3d pkg/storage/external: remove debug lines (#1606) 2020-04-20 09:38:47 -04:00
Marwan Sulaiman
3c4db4ce86 pkg/storage: add External implementation (#1587)
* pkg/storage: add External implementation

* fix conflicts

* use newly instantiated client
2020-03-27 13:35:52 -04:00
Marwan Sulaiman
0bb95c7351 pkg/storage: make Checker optional in storage.Backend (#1580)
* pkg/storage: make Checker optional in storage.Backend

* pass storage
2020-03-18 19:07:00 -04:00
Ted Wexler
939e695526 Adds redis sentinel support (#1554)
* Adds redis sentinel support

Fixes #1553

* Fix redis-sentinel test hostnames

* Fix redis master name again

* Fix redis sentinel port in tests

* Upgrade the redis client

* Rmoeve accidental config change

* Fix default config

* Addresses review comments

* Add documentation on single flight mechanisms

* Fix spelling issues

* Fix formatting

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2020-03-17 13:04:37 -07:00
Matthew Plachter
71c57ef7ee add config options for redis password (#1545)
* 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>
2020-02-25 16:18:04 -08:00
vapod
4530a58359 Add forcepathstyle config for s3 (#1533)
* Add forcepathstyle config for s3

* Bump chart version

* Fix typos in s3 config struct
2020-02-10 16:03:25 -08:00
Marwan Sulaiman
ba40b8f76d config: use semi-colon instead of comma to separate ATHENS_GO_BINARY_… (#1531)
* config: use semi-colon instead of comma to separate ATHENS_GO_BINARY_ENV_VARS

* document behavior
2020-01-24 10:20:37 -05:00
Marwan Sulaiman
34f55365a2 always use request logging middleware (#1522)
* always use request logging middleware

* reads better

* rm http-url as it is redundant

* gopls being redundant

* add color name
2020-01-20 18:25:48 -05:00
Mark Dodgson
f76ca00665 Display warning log message if validation fails (#1517)
* 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>
2020-01-20 13:26:17 -05:00
Marwan Sulaiman
0b649557bb stasher: log when a stash event occurs (#1518)
* stasher: log when a stash event occurs

* rm space
2020-01-09 15:15:37 -08:00
Aleksandr Razumov
5b194688a0 storage/s3: add custom endpoint url support (#1467) 2019-12-05 13:04:03 -08:00
Aaron Schlesinger
707b7b5413 Fixing the build failures from a missing GCS Key (#1480)
* 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
2019-12-05 10:49:56 -08:00
Aditya Sharma
e0ec46b221 Add GCS to helm chart (#1428)
* Add GCS to helm chart

* base64 encode serviceAccount in the chart

* Standardize GCP Service Account references

* pipe storage.gcp.serviceAccount to quote
2019-12-03 18:28:07 -08:00
Jens Hausherr
f578472490 Unescape key before attempting to split module and version (#1457)
* 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
2019-11-25 16:27:25 -08:00
David Farrell
db84b52159 Invoke envOverrides before checkFilePerms (#1441)
* Invoke envOverrides before checkFilePerms

* Reverts changes to cmd/proxy/Dockerfile
2019-11-07 14:27:29 -05:00
Aleksandr Razumov
790c74588a pkg/module: set only present environment variables (#1399)
* pkg/module: set only present environment variables

* pkg/module: apply new env variable logic to all keys
2019-10-16 13:13:07 -07:00
Chris Mills
82ecff968f Correct issue with continuation token failures on deploy (#1415)
* 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>
2019-10-08 16:54:20 -04:00
Rob Prentiss
ed66d85f3f Use glob matching for package paths (#1409)
- Match the behavior of GOPRIVATE/GONOPROXY/GONOSUMDB
2019-10-02 08:45:58 -04:00
kmhagan
90b3c1dc97 Allow EnvList.Validate to have multiple = for GODEBUG var (#1397)
* 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
2019-09-30 14:59:02 -04:00
psy-core
97a2df4414 fix proxy not work when lower case is unset. (#1332)
* fix proxy not enable when proxy lower is unset.

* Update prepare_env.go

format blankspace
2019-09-26 17:44:40 -05:00
Wang Qilin
8969e690ea update import path and go mod of opencensus (#1392) 2019-09-24 09:39:23 -04:00
Marwan Sulaiman
298c6cd74d cmd/proxy/actions: pass NoSumPatterns to GoGetFetcher (#1391)
* 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
2019-09-23 12:47:40 -04:00
oliverch
874d27158d feat: add /robots.txt (#1355)
* feat: add /robots.txt

* disallow all crawler by default.
2019-09-16 16:21:08 -05:00
Kenshi Kamata
800024fc6f Fix ignoring error (#1356)
* fix ignoring error

* fix operator

* fix minio error handling

* fix get url to return error if failed parsing

* add error handling

* position of statement to get redirect url was wrong.
2019-09-16 16:15:51 -05:00
Ted Wexler
99477da3cc Don't return an http error when a DownloadMode is invalid (#1365)
* Don't return an http error when a DownloadMode is invalid

Also adds some basic testing for `mode.NewFile`

Refs #1336

* Address PR comments
2019-09-03 12:03:22 -04:00
marpio
e2e5fe169a Enable Azure storage and stasher tests in drone (#1281)
* enable azure ci tests

* add import
2019-08-30 12:38:06 -07:00
Kenshi Kamata
667b9fdf65 Fix typo (#1358)
* fix duplicated 'the'

* fix typo found by misspell
2019-08-27 10:55:09 -07:00
Manu Gupta
16739a1213 Add relative URI for AWS fargate. (#1337)
* f

* r

* f

* gofmt

* ep

* Container url

* Asd

* nit

* Update docs

* keep old stuff

* old is gold

* indent

* asd
2019-08-21 14:21:01 +01:00
Bob Maertz
049d58caa8 Write tests for the new Mongo query function (#1314)
* WIP: Added tests to query implemetation.

* Fixed tests for mongo getter query function.
2019-08-15 14:04:19 -07:00
Bob Maertz
994810324e Fix Mongo initialization to use environment variables for db/coll names (#1331)
* Updated mongo init to use db name env variable.

* Updated mongo init to use coll name env var.

* Fixed merge conflict.

* Updated formatting in mongo_test.
2019-08-14 21:41:21 -07:00
jhawk28
ba9dc5470e add support for a host in ensurePortFormat (#1342)
* add support for an host in ensurePortFormat
using a host enables the ability to bind to a specific interface

* add support for an host in ensurePortFormat
using a host enables the ability to bind to a specific interface
2019-08-14 14:46:32 -04:00
Bob Maertz
3a3d474e1b Add check for mongo configuration errors. (#1329) 2019-08-12 23:54:23 -07:00
Soumya GB
603e2f3dc7 Adds cataloger for Azure blob storage (#1313)
* Adds cataloger for Azure Blob storage

* Revert "Adds cataloger for Azure Blob storage"

This reverts commit 9476c9e256.

* Implements Cataloger interface for Azure blob storage. Fixes #995.

* Upgraded azblob version to v0.7.0

* Upgrades azblob version to v0.7.0

* Fix formatting

* Fix formatting issues

* Use keyed field for comp literal

* reorder import pkgs
2019-08-12 23:49:29 -07:00
Manu Gupta
be908fe713 Fixes endpoint creds (#1325)
* f

* r
2019-08-06 10:45:14 -04:00
Yi Tang
b6bcf0e191 storage/fs,minio: fix list module with same prefix (#1312) 2019-08-01 13:16:52 -04:00
Yi Tang
ca10728887 ref: upstream lister and it's impl to module pkg (#1309) 2019-07-25 20:40:03 -04:00
Manu Gupta
5bff5fe74d endpoint creds (#1291)
* endpoint creds

* gofmt

* Add credential chain

* error handling

* Fix things

* add docs

* f

* asd

* fix
2019-07-22 22:47:36 +02:00
James Naftel
33d01b1a7a Fixed Minio NewStorage to return the MakeBucket error instead of the (#1302)
Bucket exists error.  See #1295
2019-07-16 15:23:04 -07:00
Yi Tang
7de77889ad support goproxy for list/download command (#1304) 2019-07-15 14:07:24 -04:00
Bob Maertz
8e8e886f84 Updates to mongo getter to reduce duplicate code (#1297)
* Updates to mongo getter.

- Consolidated duplicate code in getter.Info and getter.GoMod functions.
- Due to consolidation, removed ptr to 'result' in getter.Info.

* Updates to getter.go.

Added tracing back into Info and GoMod functions.
Made query a private function.
2019-07-08 14:54:53 -07:00