* Set a default value for ATHENS_MONGO_CONNECTION_STRING env var
- ATHENS_MONGO_CONNECTION_STRING will default to mongodb://127.0.0.1:27017 if not set
* Fix Get function call
* Update user of env.MongoConnectionString
* update travis to Go 1.11
* update check_deps ci script
ci for checking dependencies should now check Go module files and use go mod verify
* remove uneeded comment
* set GO111MODULE
* debug GO111MODULE propagation
* rm dep installation
* debug GO111MODULE propagation
* rm debug statements
* use Go point releases in ci
* remove references to Go1.11 RCs
* run ci with GO111MODULE auto and also on
* use matrix
* The commit brings error check for storage exists
The commit opened against ticket #427, and adds error response to
checker exists method and all corresponding places. The major changes related to renaming and processing of additional errors, because the signature of Checker.Exists was changed to return error in response.
* improved error processing
* go fmt'ed files
* added check to minio storage for no key error
* moved our constant + changed check for err
* go fmt'ed
* deleted rdbms packege, which brought merge with upsteam
* process error from minio checker
* Inital removal of cdn rdbms driver and pop support from olympus
* Update travis and other unit test scripts
* Remove postgres from Makefile
* Update comments and remove function that is not required
* Update .env file
* clean commented code
* Update docs to remove references to rdbms
* Remove pop and run dep ensure to make sure that the tests pass without pop
* Keeping GO_ENV=test for parametter logging
* Remove pop from models for now
* Remove rdbms storage from pkg/storage
* Completely remove pop
* Some improvements to tests
- Not sourcing from cmd/proxy/.env, because that doesn't export any variables
- Removing mysql support (I feel like 1 database is enough)
- Pruning networks on teardown
I'm happy to split these changes up into separate PRs - it's the end of the day for me so I wanted to get everything in 😄
* update to point to test instance
* Update databasy.yml for travis??
* Remove database.yml
* Do not use db migrations and creation
* Remove pop dependency from cdn
* add schema for olympus assuming cdn driver is part of olympus
* Move CI/CD and test scripts to point pop to olympus
* Update database.yml and keep it only for olympus
* Add migrations to travis
* Add debug logs to see what travis is doing
* Update travis to use olympus database.yml
* Moarrrr logs to see where travis is pointint the db towards
* Change env to test
* Use test as the default environment if not specified otherwise
* Check if test new rdbms storage succeeds
* Try to see which connection string rdbms test suite is using on travis
* Update db tags for cdn driver
* create db by using travis go_env
* Remove sql from database config as it is removed from docker-compose
* Remove extra logs that I missed
* Add newline
* remove models.go and test file from proxy
* removing extraneous network prune from Makefile
* The proxy middleware calls an hook if set to check if the module needs
to be filtered
* Fixed error handling
* Added a middleware func that passes the log entry down to other
middlewares
* Split the filter middleware in two
* Moved validation middleware in its own file
* Renamed filter to middleware, all the middleware stuff in a single file
* Moved default hook to empty string
* Split tests of filter middleware from validation middleware
* Installed the validation middleware only if the hook is set
* Moved filter test to middleware test
* Fixed gofmt issue caused by manual merge
* Fixed wrong logrus import
* Removed logger from filter middleware
* Moved middleware functions to own package
* Removed unused argument, fixed errors
* Fixed gofmt errors
* Made middleware func private
* Changed debuglevel from string to enum
* Added comments to now public functions
* Changed module alias to a shorter one
* Removed white space
* Split middleware in separate files, injected the hook as param
* Removed commented code
* Proxy: do not redirect on filter.Include
* Filter: add Off opt
* Filter: set Off to true when there's no config
* Proxy: use a global switch for filter
* get rid of fake storage.Connector
* get rid of the storage.Connector for mango & rdbms
* Remove all the connector interfaces
* Updating all the test to get rid of the connect
* Updating connection to storage for proxy
* Updating connection to storage for olympus
* get rid of fake storage.Connector
* get rid of the storage.Connector for mango & rdbms
* Remove all the connector interfaces
* Updating all the test to get rid of the connect
* Updating connection to storage for proxy
* Updating connection to storage for olympus
* Fix reviews
* Fix reviews
* fixing op Name
* fix replace the check of an error insted of the object exists
* Fix error message in the test
* Default to in-memory storage for the proxy
This makes it easier for someone to try out or just run the proxy by
executing the binary without further environment setup.
* Remove obsolete comment
* Added filter for private repos. Non private repos get redirected to
olympus
* Changed filter to allow private modules
* Changed config file name function
* Added filter tests
* The middleware returns 200 for privates, redirects public, 404 for
disabled repos
* Removed printf
* Removed forgotten printf
* Removed logger from the middleware func, not used anymore
* Removed unused (uncommented) function
* Replaced 404 with 403 in case of banned modules
* Fixed test path / cleaned olympus endpoint suffix
* Added error operation to GetVersion
* Moved filter test in custom file, reverted injection of the filter into
the app
* Removed white line
* Clarified comment for ignoring getversion error
* Added todo comment to fill the cache and serve the request with the
cache
* Added error handling to filter
* Removed commented early version of the test
* The commit brings more clarity on how to run unut tests.
The commit chages behaivour of `make test-unit` by adding sourcing of
env vars. Documentation is updated to provide more clarity on how to run
unit tests.
* changed list of commands to run before unit tests
* moved env vars to .env
* removed dduplicated env var
* returned conventional file name in script
* link to DEVELOPMENT.md
* fixed typo
* moved env var export to script
* removed export of tmp folder
* Correct env variable referenced in comment for
OlympusRedisQueuePortWithDefault
* Add redis in-mem mock config for proxy
* Add redis in-mem mock config for Registry
* Use in-memory mock for Redis queue if in-mem environment variable set
* Use in-memory mock for redis queue in Olympus if environment variable
set
* Revert "Use in-memory mock for Redis queue if in-mem environment variable set"
This reverts commit 45b52e48f9.
* Revert "Add redis in-mem mock config for proxy"
This reverts commit 3373947fb5.
* Use OLYMPUS_BACKGROUND_WORKER_TYPE to control worker type used in
Olympus
* Use memory background worker type if an unexpected value is provided in
env var.
* Goget fetcher should error out if gobinpath is not valid
* Propogating the error from goget initialisation to main, to stop application
* wrapping errors with op, using exec.command(gobin).Run to verify gobin, clean up
* Inlining afero fs to goget call, and new go getfetcher
* Revert "Inlining afero fs to goget call, and new go getfetcher"
This reverts commit ae31fe6a2b.
* Fixing example test
1. Gopath func doesnt seem to be used much; it is used in init func of proxy/actions/app.go which doesnt do much
2. I think relying on $GOPATH post go1.11 will lead to flaky situations
* add middlewares to fill the cache and to populate contexts with module and versions
* Carolyn tries to fix Aaron's code
* #DOINSTUFF
* updated env var
* fix all the things
* magic patch for olympus
* Add latest handler
* Remove deprecated return param
* go fmt all the things
* download: add list from go cli
* download: include goget tests + hacky hack
* download: move dummyMod to pkg/module
* Olympus: pass dp and lggr to /list
* download: add Version to interface
* download: document Protocol
* Athens: introduce pkg/errors
* errors: fix Ops loop
* pkg/errors: introduce M and V types to get rid of unstable parsing
* fix build
* errors: fix text + add tests
* pr updates
* remove spf13/cobra and inconshreveable/mousetrap
* remove user package
* remove user package
* remove unused types, vars etc
found by using github.com/dominikh/go-tools/tree/master/cmd/unused.running unused $(go list github.com/gomods/athens/... | grep -v /vendor/)
* rm uneeded file
* add download function which downloads a ver from cdn
* use cdn download func
* save after rename
* review feedback
* just to trigger a build
* pass timeout and move to pkg/module
* use multierror
* rm empty line
* remove duplicate '/' handler declaration
* Remove homeHandler() and slow()
homeHandler is unused now and slow was a helper to add tracing with a
millisecond delay to the handler