61 Commits

Author SHA1 Message Date
Omar Trigui
d2bf84a45d fix(storage.md): correct redis endpoint format (#2082)
## Fix Redis URL typo in documentation

Removed duplicate port number in Redis configuration example.
2025-12-03 04:46:43 +02:00
Gerdriaan Mulder
5d36140c5c docfix: use GONOSUMDB on Athens' home page (#2056) 2025-07-19 14:41:09 +02:00
day253
04e425642e add utf8 charset meta to the proxy home (#2017) 2025-01-07 23:54:42 +01:00
opalmer
3ba08f64f0 Support using redis urls to construct the redis client (#1994)
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`
2024-10-22 13:33:03 -07:00
Nicholas Wiersma
71119f8fcf feat: support GitHub App authentication (#1988)
Adds support for using GitHub Apps as a form of authentication
2024-10-21 18:14:34 +00:00
Radon Rosborough
74b3cf5082 Document log level format (#1982)
Specify log levels that can be configured with Athens explicitly in the documentation.
2024-09-30 12:23:00 +02:00
yueluhuan
1e39c23d72 Add aad auth option when using azure storage account (#1973)
Support managed identity authentication in Azure Blob Storage.
2024-07-14 18:21:31 -07:00
Derek Buitenhuis
0ef761cc8b gcp/saver: Only return errors.KindAlreadyExists if all three exist (#1957)
* gcp/saver: Only return errors.KindAlreadyExists if all three exist

In #1124, a GCP lock type was added as a singleflight backend. As part of this work, the GCP backend's Save() was made serial, likely because moduploader.Upload requires a call to Exists() before it, rendering the GCP lock less useful, by doubling the calls to GCS.

However, by doing this, the existence check was now only checking the existence of the mod file, and not the info or zip. This meant that if during a Save, the zip or info uploads failed, on subsequent rquests, that when using the GCP singleflight backend, Athens would assume everything had been stashed and saved properly, and then fail to serve up the info or zip that had failed upload, meaning the cache was in an unhealable broklen state, requiring a manual intervention.

To fix this, without breaking the singleflight behavior, introduce a metadata key that is set on the mod file during its initial upload, indicating that a Stash is still in progress on subsequent files, which gets removed once all three files are uploaded successfully, which can be checked if it it is determined that the mod file already exists. That way we can return a errors.KindAlreadyExists if a Stash is in progress, but also properly return it when a Stash is *not* currently in progress if and only if all three files exist on GCS, which prevents the cache from becoming permanently poisoned.

One note is that it is possible the GCS call to remove the metadata key fails, which would mean it is left on the mod object forever. To avoid this, consider it stale after 2 minutes.

---------

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Co-authored-by: Matt <matt.ouille@protonmail.com>
2024-06-02 19:32:54 +00:00
Matt
78daa574e9 Add logging configuration docs (#1952)
We should do our best to disambiguate CloudRuntime and logging parameters.
2024-04-21 11:29:42 -07:00
Matt
359c119441 Add an introduction page as the home page (#1945)
A default homepage is baked into the server that uses the request host address, or in HTTP 2 the authority. This includes ports. It also checks for schema. The values are used to indicate to users how to configure their go env

Of course, this won't work on all installations - especially enterprise ones. For that, we've introduced ATHENS_HOME_TEMPLATE_PATH as an environment variable along with HomeTemplatePath in the config. This value defaults to /var/lib/athens/home.html but can be configured to any location that Athens can reliably read from. This is a Go HTML template so it should use Go HTML template formatting and logic.
2024-04-20 00:19:34 -07:00
Chris Kuehl
3f3fb9b758 Fix Markdown link in Storage docs (#1922)
Fix incorrectly formatted Markdown link in storage docs.
2024-03-19 17:38:40 -07:00
Aaron Schlesinger
9359ab996b doc: Fixing pacmod command (#1583) 2023-05-07 19:13:06 +02:00
Ashish Ranjan
cc496afbf1 read redis lock options from config to support custom TTL & timeout (#1791)
* 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>
2022-09-28 22:53:06 -07:00
Alex
6da5568081 a new way to pre-fill disk storage (#1747)
* a new way to pre-fill disk storage
* changed a headline to a bold'ed text
2021-12-22 13:46:16 -08:00
Manu Gupta
898673c600 Deprecate bzr as it is unmaintained. (#1742)
Alpine moved bzr to unmaintained status. See
https://gitlab.alpinelinux.org/alpine/abuild/-/issues/10000
2021-12-04 22:46:27 -05:00
Chris Mills
ae69e1f57d Fix 404s within documentation (#1644)
Signed-off-by: Chris Mills <millscj01@gmail.com>
2020-06-29 19:38:05 +01:00
Timo Reitz
29a710920d Fix link in deprecation note. (#1642)
Co-authored-by: Timo Reitz <timo.reitz@4com.de>
2020-06-29 09:44:04 +01:00
Rustam Zagirov
8eebda309b fix typo in docs (#1629) 2020-06-16 08:21:08 -04:00
Aaron Schlesinger
c2c5daf61a Switching to using the main default branch (#1628)
* 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>
2020-06-15 16:44:37 -04:00
Bradley
df9728ecd5 docs: typo for ATHENS_DOWNLOAD_MODE custom (#1605) 2020-04-20 09:26:58 -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
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
Aaron Schlesinger
9624953236 Updating the sum database documentation (#1494)
* Updating the sum database documentation
2020-02-21 14:25:07 -08:00
Aaron Schlesinger
ed703ee63d Adding docs for setting the GONOSUMDB env var on the Athens side (#1504)
* Adding docs for setting the GONOSUMDB env var on the Athens side

Ref https://github.com/gomods/athens/issues/1363

* Updating with multiple repos, and adding a note

* Update docs/content/configuration/sumdb.md

Co-Authored-By: Ted Wexler <ted@stuckinacan.com>

* Qualifying "user"

Co-authored-by: Ted Wexler <ted@stuckinacan.com>
2020-02-19 19:52:24 -05: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
Michael D Henderson
1345d1f9a6 fix typo in Atlassian name (#1515)
Co-authored-by: Rob j Loranger <dev@loranger.xyz>
2020-01-19 15:36:13 -08:00
Aaron Schlesinger
15733395eb Fixing filter link (#1524) 2020-01-13 13:53:47 -08:00
Aaron Schlesinger
3edd242848 Revamping the download mode file (#1508)
Also doing a few things in the process:

- Deprecating the documentation that references the filter file
- Changing the order of the configuration documentation to put the deprecated documents at the bottom of the config section
- Adding a note to the disk storage documentation about pre-filling the disk cache

Fixes https://github.com/gomods/athens/issues/1501
2020-01-13 13:28:59 -08:00
Aleksandr Razumov
5b194688a0 storage/s3: add custom endpoint url support (#1467) 2019-12-05 13:04:03 -08:00
Aaron Schlesinger
82472fe945 Adding instructions for pre-filling the disk cache (#1414)
* Adding instructions for pre-filling the disk cache

* Fixing up titles

* Updating to the new pacmod

thanks to @jpreese for the advice on how to use the updated one!

* Making some wording changes

Thanks @jpreese!
2019-12-03 17:40:22 -08:00
Abhishek Gupta
e2b4461517 Added storage configuration section for Azure Blob Storage (#1411) 2019-10-02 09:47:31 -07:00
Aaron Schlesinger
cdf000cbbe Updating the download config docs to indicate how to point to the download file (#1371) 2019-09-09 23:22:22 +01:00
Aaron Schlesinger
a0c8dff8cd Adding a note in the configuration section about the config.dev.toml (#1343)
Fixes https://github.com/gomods/athens/issues/921
2019-08-28 12:52:55 -07:00
Manu Gupta
f4f3afb4de Add docs for fargate url (#1352) 2019-08-28 11:19:44 -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
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
John Reese
9a8daf7186 Fix try-out link (#1330) 2019-08-07 06:53:14 -07:00
Marwan Sulaiman
76fb786324 downloadProtocol: support multi-proxy environments with DownloadFile (#1230)
* downloadProtocol: support multi-proxy environments with DownloadFile

* remove debugging lines

* update config tests

* download/mode: add tests for DownloadFile and friends

* add documentation to Download File
2019-06-08 00:30:07 -04:00
Aaron Schlesinger
0bfb2ed604 Updating english docs to indicate the presence of hosted public proxies (#1238)
* Updating english docs to indicate the presence of hosted public proxies

* fixing spacing

* more spacing

* bump chart version again

since I pulled from master, the linter told me to do this again
2019-05-28 08:58:39 -07:00
Michel Blanc
963d7b6417 Fixes indentation in documentation (#1245)
Fixed indentention in docs/content/configuration/_index.md so the page
is correctly generated by Hugo.
2019-05-27 05:52:23 -07:00
Rustam Zagirov
ffc64825ce fix typo (#1223) 2019-05-13 12:48:57 -04:00
Marwan Sulaiman
0cac0edbf1 actions: support proxying sum db urls (#1208)
* actions: support proxying sum db urls

* remove proxy prefix

* add docs for checksum db

* more docs

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* typo

* move checksum db into its own section
2019-05-08 17:09:07 -07:00
dfinkel
0be1cd96f0 Add documentation about SSH_AUTH_SOCK from PR#1184 (#1185)
* Add documentation about SSH_AUTH_SOCK from PR#1184

PR#1184 added support for propagating SSH_AUTH_SOCK if it points to a
valid unix socket. As requested, add a section explaining how to use
it.

* auth documentation: replace $(pwd) with $PWD

Replace references to `$(pwd)` with `$PWD` in shell snippets and add
more quoting. This should make these snippets reasonably friendly to
currnet working directory path components containing spaces.

Note: I neither endorse nor recommend spaces in directories, but this is
an easy enough change.

This commit is leaving powershell snippets untouched as I am not
familiar with powershell's word-splitting behavior (if there is any).
2019-04-30 01:03:17 -07:00
Shivaram Radhkrishna
63a06dbdeb Include path in the proxy command example (#1163)
* fix missing . in command example

* Indicate path in the proxy command example
2019-03-28 21:27:10 -07:00
Shivaram Radhkrishna
c59aa69848 Doc update to configure upstream proxy to fetch modules from a Go mod… (#1146)
* Doc update to configure upstream proxy to fetch modules from a Go modules repository

* review suggestions
2019-03-19 15:03:44 -07:00
Federico Paolinelli
04c6bbed90 Filter (#1075)
* Working tests

* More tests, a bugfix (yay tests) and docs

* Changed filter description adding v prefix to versions

* Updated docs to be more precise

* More robust, changed docs

* Fixed copy paste bug
2019-03-18 22:07:27 -07:00
Mark Petrovic
feff9872cd [issue/1048] Describe how to configure Athens to resolve dependencies… (#1049)
* [issue/1048] Describe how to configure Athens to resolve dependencies over authenticated SSH

Issue: 1048
Files changed:  docs/content/configuration/authentication.md

* [1048] pull request feedback
2019-02-06 20:13:21 -05:00
Chad Kunde
7811524c22 Version filtering (#1050)
* extend filtering logic and configuration to include version lists

Module filtering is very useful, but many deployments will need to
satisfy even more granular constrainsts.  Enterprises may need
approved lists specific down to the minor (or patch) version element.

Version filtering logic is similar to the module filtering, in that
it's a prefix match of the version requested against each entry in the
version filter list.

Closes #1045

* include version filtering in documentation with example

* allow filtering when version is missing

Endpoints that do not specify a version, such as "@v/list", only need
to be filtered by module rules.
2019-02-05 09:04:09 +01:00
M4RK
a7aaf3f1e4 Modified S3 storage to check for AWS default credentials. (#1009)
* Modified S3 storage to check for AWS default credentials.

* Updated S3 storage documentation.

* Fixed typo.
2018-12-29 22:11:50 -08:00