Currently Athens only supports connecting to Redis using a hostname:port combination in addition to a password. While this works in most cases it also means that if you have other options you wish to supply Athens has to be updated to support them. As a basic example Redis clusters that require TLS currently are not supported by Athens but with this change you can simply supply a [redis url](https://github.com/redis/redis-specifications/blob/master/uri/redis.txt) to connect over TLS. It also makes it easy to override the password, set a username and more all from a single configuration option:
`rediss://username:password@redis.example.com:6379/1?protocol=3`
Upgrades to the Go 1.22 toolchain. Upgrades golangci-lint to 1.61.0 and disables some new linters.
---------
Co-authored-by: Nicholas Wiersma <nick@wiersma.co.za>
Removes hardcoded values form our supplied SystemD Unit file and the installation script. Users, prior to installation, will need to ensure that their user, group, and permissions settings of where Athens stores data are correct.
Co-authored-by: Manu Gupta <manugupt1@gmail.com>
Co-authored-by: Matt <matt.ouille@protonmail.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.
* Finish Removing `golint`
Removed remaining references to `golint` in dev doc, Makefile,
bash scripts, and powershell build scripts.
Removed `get_dev_tools.sh` and `get_dev_tools.ps1` as they only install
the removed `golint` package.
* 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.
* Switching to using the main default branch
* changing links to main branch, not master branch
* Changing a few links to relative
* Bumping chart version
Co-authored-by: Marwan Sulaiman <marwan.sameer@gmail.com>
* Update .drone.yml for Go 1.14
* Update appveyor.yml for Go 1.14
* Update Dockerfile.test for Go 1.14
* Update Dockerfile for Go 1.14
* Update scripts/build-image/Dockerfile
* Replace the current e2e script with a test suite running e2e tests.
* Add a build tag to skip e2e while running unit tests.
We want e2e tests to be skipped while running normal unit tests.
* First implementation; older systemd is not yet supported; SysV is not supported at all
* small correction
* more documentation; manual testing confirms that Athens is working as a SystemD service
* documentation updates
* removed differences from author/master branch
* adding documentation for installing on GAE for issue 1379
* turning draft status off for GAE install docs
* adding documentation for installing on google cloud run
* install documentation/scripts for gae
* updating docs on gae cloud run for clarity
* Changing install docs to include $ before shell commands
* Changed mongo.go to use new driver
* Modified mongo cataloger
* More new driver related changes
* Change lister.go
* Change saver.go
* Change imports
* Remove unnecessary Count query
* Use IndexView for indexing
* Rename ModuleStore fields
* Use map of key:sorting-order for creating the index
* Minor changes
* Use client options to configure mongo client
* Use method chaining
* gofmt changes
* Change imports
* Fix some build errors
* Use new GridFS API
* Fix more build errors
* Add Go Mongo driver to dependency modules
* Use multierror
* Leave download stream open
* Remove mgo error handling
* Copy zip instead of loading all in memory
* Use context.WithTimeout() wherever possible
* Raise KindNotFound when mod@ver isn't found
* NopCloser not needed
* Fix IndexView error
* Fix build errors
* Remove another mgo error usage
* Fix build error
* Changes according to review
* Formatting changes as per gofmt
* Modify gofmt argument to show the expected formatting (diff)
* Handle ErrNoDocument error and error arising from query execution
* Fix kind of returned error
* Minor changes
* Bug fixes
* gofmt related changes
* Minor change
* Use Insecure from MongoConfig, remove Insecure from global Config
* Remove stray print statement
* Added new cataloger interface
* Implementing catalog protocol
* Propagated to protocol and over
* First round of fixes
* S3 almost ready, need to be tested
* Going on with testing s3
* Better testing with s3
* Simplified catalog tests
* Preparing gcp tests to access a gcp instance
* Fixing initialization errors
* Removed some prints
* Gcp ready, to be tested
* Gcp working
* Aligned bucket mock to catalog method
* Switched res payload to json
* Added catalog method to all storage instances
* Added catalog method to unsupported storages
* Fixed with pool test
* Restored tests
* Fixed gcp constructor
* Implemented catalog for fs
* Removed trace
* E2e tests, fixed fs
* Fixed module name return value
* Added cataloger method to azure storage
* Added docs
* Changed pagesize parameter name
* Fixed gofmt error
* Added json tags to result. Fixed lint warning
* Removed extra line
* Changed not implemented error to http.KindNotImplemented
* Checking for inequality on results
* Lower-cased json keys
* Added cleaning of path separator
* Fixed review comments
* Add catalog endpoint for mongo
* Add omitempty to ID
* Fix catalog tests
* update for next token
* fix e2e
* Make query readable
* Fix language and e2e script
* remove new line
* Added new cataloger interface
* Implementing catalog protocol
* Propagated to protocol and over
* First round of fixes
* S3 almost ready, need to be tested
* Going on with testing s3
* Better testing with s3
* Simplified catalog tests
* Preparing gcp tests to access a gcp instance
* Fixing initialization errors
* Removed some prints
* Gcp ready, to be tested
* Gcp working
* Aligned bucket mock to catalog method
* Switched res payload to json
* Added catalog method to all storage instances
* Added catalog method to unsupported storages
* Fixed with pool test
* Restored tests
* Fixed gcp constructor
* Implemented catalog for fs
* Removed trace
* E2e tests, fixed fs
* Fixed module name return value
* Added cataloger method to azure storage
* Added docs
* Changed pagesize parameter name
* Fixed gofmt error
* Added json tags to result. Fixed lint warning
* Removed extra line
* Changed not implemented error to http.KindNotImplemented
* Checking for inequality on results
* Lower-cased json keys
* Added cleaning of path separator
* Fixed review comments
* Fixed docs
* Rename docker image to gomods/athens
* Bump chart version to match new release version
* Switch from stable tag to latest tag
Our docs used latest, and it's awkard when you don't have a latest tag anyway
* 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
* Upgrade buffalo
* Switch to go modules everywhere
* Fixes from buffalo fix
* Add missing modules from module list
* Update vendored modules in /vendor
* Stop using vendor directory for tests
* Check go.mod and go.sum files on verify
* Upgrade Buffalo from v0.13.0 to v0.13.1
* Fix test for new Buffalo
Allow for new Buffalo code
* Add test for endpoint with trailing slash