Commit Graph

337 Commits

Author SHA1 Message Date
Aaron Schlesinger
a89552ff5d Tiny start to the codeowners file (#468)
* Tiny start to the codeowners file

Fixes #466

* fix up CODEOWERS

* codeowners require write access
2018-09-01 10:33:29 -07:00
lpdyck
c4417371ef Fix powershell scripts (#615)
* add check_deps.ps1

* fix check_gofmt select-string regex pattern

* capitalize JoinPath

* fix typo

* fail check_deps.ps1 on error
2018-09-01 11:59:55 +02:00
lpdyck
a2a2d93a9e [walkthrough]: add powershell walkthrough (#598)
* add powershell commands

* split the semicolon onto two lines instead

* split another semicolon onto two lines instead

* remove does not work on windows warning

* fix powershell typo

* fix type in modules enables not supported notification

* use start-process instead of start
2018-09-01 11:53:30 +02:00
Marwan Sulaiman
5bb28a91f7 update go.mod file (#611) 2018-08-31 16:15:16 -04:00
Rohan Chakravarthy
7c745fb3d9 add a configuration file (#453)
* complete updated config package

* use envconfig+toml instead of viper. Add descriptions in example config file

* add unit tests

* debug gofmt on build server

* force dummy commit

* skip gofmt to validate other tests are passing

* unset env vars for example file parsing test

* cleanup tests

* test improvements

* re-enable gofmt

* naming

* PR comments

* fix failing test after olympus default endpoint change

* remove rdbms config

* set defaults in code

* add support for proxyfilteroff

* add basic auth params

* update gopkg.lock

* undo gopkg.lock changes made during merge

* remove defaults

* explicitly specify all env variables

* remove rdbms from example

* remove user and pass to disable basic auth by default

* switch to memory by default for the proxy

* fix tests after config file change
2018-08-31 14:23:41 -04:00
Jayakrishna Sahit
df14f2b691 Added ISSUE and PR Templates (#585)
* Added templates

* made minor changes

* Modified temps

* made requested changes

* Added requested changes 2

* Made requested changes 3

* Added final changes
2018-08-31 09:34:31 -07:00
Michael Cook
ea1503f071 minor spelling fix (#603) 2018-08-30 17:26:03 -06:00
dapchen
f96d1f838b [protocol]: update examples to use working links (#599)
* [protocol]: update examples to use working links

* Change to use $HOST and $PORT as placeholders.
2018-08-30 16:50:10 -06:00
Kent Rancourt
992ee933eb [walkthrough]: adjust instructions to clone athens on gopath (#593)
* [walkthrough]: adjust instructions to clone athens on gopath

* Update walkthrough.md
2018-08-30 16:27:22 -06:00
Kent Rancourt
3a76afb6a6 [walkthrough]: Fix errant reference to (no used) vendor directory (#591) 2018-08-30 16:05:45 -06:00
Kent Rancourt
0e411d77e3 [walkthrough]: fix incorrect env var (#592) 2018-08-30 15:58:05 -06:00
Marwan Sulaiman
e2cd124816 Update modules to be correct (#589) 2018-08-30 04:52:20 -04:00
Rohan Chakravarthy
697a7a5073 remove olympus storage implementation and proxy worker (#513)
* remove olympus storage implementation and proxy worker

* cleanup after merge conflicts

* remove newline
2018-08-30 03:47:04 -04:00
Nedim Dedic
7af04ff405 Update PHILOSOPHY.md (#582) 2018-08-28 14:16:36 -07:00
Arthur Mello
0b9624afbf Update documentation about running unit tests (#576) 2018-08-28 18:27:50 +02:00
Arthur Mello
e5ce3f7c6e Set a default value for ATHENS_MONGO_CONNECTION_STRING env var (#580)
* 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
2018-08-28 11:56:15 +02:00
Komu Wairagu
69a5340c91 update to go1.11 (#563)
* 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
2018-08-28 08:46:12 +02:00
marpio
b62ebddb1b fix mongo env var name after rename (#578) 2018-08-27 14:11:32 -07:00
Rob j Loranger
37f0687761 No conflicts (#569)
* add script and step to verify stage of makefile

* this commit should fail the build

* build should now pass

* fix typo in excludes for grep

* better output on failure

also removes tilde from initial regex, git does not use tilde in diffs
adds output of filenames with detected regex on failure
2018-08-27 10:48:24 -06:00
Tobias Klauser
5c3af51a1d README.md: various fixes (#575)
* fix some typos

* make the markdown links in the "Coding Guidlines" render correctly

* remove stray newlines between project status badges
2018-08-27 10:01:58 -06:00
Jeremy Rickard
a953f1121b Finishing up the helm chart (#547)
* chart skeleton

* doing more stuff on templates

* Adding disk storage root env var

In case you set the storage type to disk, then you can set the storage root

* Defaulting disk storage root location

* defaulting to go binary path as installed in dockerfile

* Adding Adding Service and Ingress to Chart

* In sync with newer docker image, added the ability to use a PVC!

* Refactored charts, added skeleton install

Co-authored-by: Aaron Schlesinger <arschles@gmail.com>

* Adding more documentation

* Adding newlines

* Updated to v0.1.0 !!!

* Updated repo to gomods/proxy
2018-08-27 09:55:38 -06:00
Jeremy Rickard
7962cac0c2 How to install a shared dev team instance with persistent storage (#543)
* WIP "installation" guide

This PR adds an installation guide with instructions on how to use
disk storage to achieve persistent storage.

Closes #533

* Formatting cleanup

* Swapped to Docker based instructions

* Moved install into "install" directory, added PowerShell commands

* Fixed wording about running container and environment variables

* Fixed a type-o

* Code review comments, cleaned up PowerShell commands

* Updated docker run commands

* WIP "installation" guide

This PR adds an installation guide with instructions on how to use
disk storage to achieve persistent storage.

Closes #533

* Formatting cleanup

* Swapped to Docker based instructions

* Moved install into "install" directory, added PowerShell commands

* Fixed wording about running container and environment variables

* Fixed a type-o

* Code review comments, cleaned up PowerShell commands

* Updated docker run commands

* Update to gomods/proxy:latest
2018-08-27 09:20:41 -06:00
Rob j Loranger
0f218d0347 disable inline copy to clipboard (#565) 2018-08-27 09:10:52 -06:00
Carolyn Van Slyck
d66b481d11 Publish to gomods Docker registry (#574) v0.1.0 2018-08-27 08:23:41 -05:00
Marwan Sulaiman
9860bd51e7 Proxy: return 200 on / regardless of prefix (#572) 2018-08-26 22:11:04 -04:00
Aaron Schlesinger
53f457e0b8 Rough description of community roles (#444)
* Rough description of community roles

and how to move to new roles

* add mention of CoC

* fixing typo

* adding link to past dev meetings

* moving "core maintainer" alias text

* calling out specifically that contributors have read access

* formatting

* Addressed previous concerns.

Broke all markdown lines on or under 80 chars because vim, also the
majority of the doc was formatted that way.

* link to slack re: missing meetings

* use emphasis instead of single quote for 'don't know enough'

* use code element in html

* expand on CoC duty

co-authored-by: Aaron Schlesinger <arschles@gmail.com>
co-authored-by: robjloranger <robjloranger@protonmail.com>
2018-08-26 19:07:22 -05:00
marpio
1de9ea4c2a Powershell - clean up ENV after tests (#568)
* clean up ENV after tests
2018-08-26 22:40:28 +02:00
Komu Wairagu
f2047cfa79 Add support for Go Modules (#371)
* add go.sum file
added .sum file via, go mod -sync

* update go modules deps

* mod init with Go version 1.11

* update github.com/gobuffalo/uuid
The update is necessary because Gopkg.lock has uuid at v2.0.1 however, that version no longer
exists in th gobuffalo/uuid repo

* add gobuffalo/plush

* ran tests

* ran go mod tidy
2018-08-25 09:16:22 -07:00
Aaron Schlesinger
87f65bac7a adding document that explains how reviews happen on PRs (#470)
* WIP: adding document that explains how reviews happen on PRs

Fixes https://github.com/gomods/athens/issues/467

* adding more steps

* Incorporate review feedback

co-authored-by: Carolyn Van Slyck <carolyn.vanslyck@microsoft.com>
co-authored-by: Aaron Schlesinger <arschles@gmail.com>

* Fix verify your work to specify what the CI runs

co-authored-by: Carolyn Van Slyck <carolyn.vanslyck@microsoft.com>
co-authored-by: Aaron Schlesinger <arschles@gmail.com>

* Keep important PRs open longer

co-authored-by: Carolyn Van Slyck <carolyn.vanslyck@microsoft.com>
co-authored-by: Aaron Schlesinger <arschles@gmail.com>
2018-08-24 15:34:49 -07:00
Michal Pristas
539700e598 KindNotFound for all storages (#560)
* all exc mongo

* module, version associated with each storage error

* remove confusion

* removed formatted error in favor of raw flavor

* once more
2018-08-24 20:00:00 +02:00
marpio
fa16c6950b Powershell scripts (#525)
* port scripts to ps

* remove ps core features

* init script

* make it work on ps 5.0

* sync with make file

* cleanup

* cleanup

* review feedback

* newline
2018-08-24 19:44:36 +02:00
Carolyn Van Slyck
7c137a736b Document proxy authentication in the FAQ (#541)
* Document proxy authentication in the FAQ

* Fix typo
2018-08-24 11:04:06 -05:00
Carolyn Van Slyck
26e8197b82 Publish docker images during CI builds (#544)
master builds publish using the git describe output  as the immutable tag and
canary for the mutable tag. Examples:

  gomods/proxy:abc1234
  gomods/proxy:canary

tagged builds publish using the tag as the immutable tag, which is
usually going to be a semver value and with latest for the mutable tag.
Examples:

  gomods/proxy:v1.0.0
  gomods/proxy:latest

branch builds publish using the git describe output as the immutable tag and the
branch name for the mutable tag. Examples:

  gomods/proxy:def4567
  gomods/proxy:beta-1
2018-08-24 10:36:42 -05:00
Marwan Sulaiman
4a618990a2 pkg/download/goget: ensure each List func gets its own GOPATH (#559)
* pkg/download/goget: ensure each List func gets its own GOPATH

* Add list tests

* fix diskref tests
2018-08-24 10:19:17 -04:00
Marwan Sulaiman
fc581c3784 pkg/storage: ensure mongo returns KindNotFound (#558) 2018-08-24 02:13:09 -04:00
marpio
76121fb5cb Fix running the athens proxy on windows (#554)
* use parent env

* rename

* use only required vars

* review feedback

* add windows env vars

* ups

* fix

* rm op
2018-08-24 01:55:55 -04:00
Manu Gupta
e5ddbedfa8 Remove unused pkg/errors from gopkg.toml (#556) 2018-08-23 19:05:42 +02:00
Michal Pristas
44ec04dd4d updated to rc2 (#557) 2018-08-23 08:09:10 +02:00
mydiemho
e4659ecea5 create in memory driver for cdn metadata (#498)
* create in memory driver for cdn metadata

fixes #334

* save memStorage so we're not recreating it everytime

* run gofmt
2018-08-22 23:06:09 +02:00
Andrey Dyachkov
062f24d32f Issue 427: error check for storage exists method (#458)
* 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
2018-08-22 15:49:36 -04:00
Manu Gupta
3a8c6429e9 Removal of cdn rdbms driver and pop support from olympus (#551)
* 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
2018-08-22 20:10:19 +02:00
Marwan Sulaiman
487e297490 Athens: add .DS_Store to gitignore (#550) 2018-08-22 12:46:29 -04:00
Marwan Sulaiman
8ef3a5254c Athens: add .idea to gitignore (#555) 2018-08-22 12:09:26 -04:00
Marwan Sulaiman
a1b5060ead Proxy: add cache-control middleware (#553)
* Proxy: add cache-control middleware

* fix improt cycle + use MDN no-cache example

* remove import lines

* actually use MDN example

* remove .idea from gitignore in unrelated pr
2018-08-22 09:52:16 -04:00
Manu Gupta
c0635b748c Remove pop from Proxy & RDBMS storage getter (#511)
* 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
2018-08-21 19:21:40 -04:00
Federico Paolinelli
c8b64fd258 Proxy 'admission controller' (#492)
* 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
2018-08-21 22:51:26 +02:00
Carolyn Van Slyck
2f28dc9e51 Tweak homepage theme (#542)
* Make athens banner smaller

This helps people see that there is more content below the athens logo, otherwise
the most prominent thing they see is the next arrow >
and they miss our homepage content.

* Make home link friendly for previews

Right now when viewing a preview of our docs site, when I click on the home logo
I end up on our live site. This makes the home logo go to the root of the
current site instead, which is more friendly for testing docs locally
or previewing a PR.
2018-08-21 13:59:16 -05:00
Michal Pristas
042cbcaddf SSL Support for Mongo (#527)
* tested mongo ssl

* Added a todo
2018-08-21 18:09:49 +02:00
Emrecan BATI
67a07d9da2 Remove separate docker volume remove command (#538) 2018-08-21 17:17:18 +02:00
Carolyn Van Slyck
af7f1a6eda Walkthrough how the proxy works (#505)
* Walkthrough how the proxy and modules work

This is just the second step in adding in more docs. After we add more
docs for how to install the proxy, etc this doc will get updated with a
Next Steps section and point people in the right direction after they
try it out.

* Replace cache with storage when referring to the proxy

It is still the right term for the on-disk go modules cache in GOPATH/pkg/mod though

co-authored-by: Jeremy Rickard <jeremy.rickard@microsoft.com>
co-authored-by: Carolyn Van Slyck <carolyn.vanslyck@microsoft.com>
2018-08-21 10:00:00 -05:00