81 Commits

Author SHA1 Message Date
south-mer
11d674c8fb feat: GCP checksum (#2052) 2025-08-06 08:24:54 +02:00
Taylor Chen
3856c6feee add timeout to vcsLister.List() (#1986) 2024-09-20 08:19:47 +02:00
Balazs Sandor
70ee634a80 Add http body to list handler on error (#1974)
Mimic responses to that of proxy.golang.org when a list fails to produce a result.
2024-09-09 03:23:40 +00:00
Matt
bde4952614 Set correct content type and send once (#1965)
Set correct Content-Type headers on each endpoint rather than on the router. The router would, at times, send two Content-Type headers and other times just send the wrong one.
2024-06-02 19:49:36 +00:00
Vanes Angelo
900cb4f7c1 Upgrade to AWS SDK v2 (#1938) (#1950)
Upgrades the AWS SDK to v2. AWS S3 bucket urls will now error if they are not prefixed with a schema (example: https://).
2024-04-28 21:38:42 -07:00
kkHAIKE
81415839ba Fix an issue where contexts are not copied correctly (#1941)
Fix an issue in the Stasher where contexts between the request and log entry are not copied correctly.

Co-authored-by: ouyangxu <ouyangxu@bilibili.com>
2024-04-13 13:35:25 -07:00
Nicholas Wiersma
d932d50232 chore: lint code with golangci-lint (#1828)
* feat: add golangci-lint linting

* chore: fix linter issues

* feat: add linting into the workflow

* docs: update lint docs

* fix: cr suggestions

* fix: remove old formatting and vetting scripts

* fix: add docker make target

* fix: action go caching

* fix: depreciated actions checkout version

* fix: cr suggestion

* fix: cr suggestions

---------

Co-authored-by: Manu Gupta <manugupt1@gmail.com>
2023-02-24 20:39:17 -08:00
Nicholas Wiersma
ab64133949 feat: replace ioutil with io and os (#1816) 2023-01-27 20:42:47 +05:30
Zhongpeng Lin
4c3443328e Adding new fields to RevInfo (#1812)
* Allow unknown fields in RevInfo

* Revert "Allow unknown fields in RevInfo"

This reverts commit 902d791554.

* Adding new fields to rev_info.go

* fixed tests
2023-01-16 12:11:10 -08:00
Ashish Ranjan
33777c5cc4 copy context before starting stash operations to prevent ctx cancellations (#1790)
* copy context before starting stash operations to prevent ctx cancellations

* add comment about context cancellation
2022-09-15 11:03:59 -04:00
Marwan Sulaiman
151c4922fb Enable Athens to work in offline mode (#1717)
Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2021-08-18 19:09:14 -04:00
Zhongpeng Lin
9b505e9ee0 Use actual content length when it is not available in headers (#1719)
* Use actual content length when it is not available in headers

* Setting Content-Length before writing body

* Using zero value as unknown size
2021-06-18 10:57:46 -04:00
Aaron Schlesinger
1acdf17a4a Reverting passthrough auth (#1700)
* Reverting PR 1650

https://github.com/gomods/athens/pull/1650 was a big change to the
authentication/authorization code, which we have decided to pull
out and potentially move into a separate process/project

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing commented, unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing more commented, unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>

* removing more unused code

Signed-off-by: Aaron Schlesinger <aaron@ecomaz.net>
2021-03-11 11:28:15 -08:00
Marwan Sulaiman
6ef4a793c3 Add Content-Length to .zip requests (#1681)
* Add Content-Length to .zip requests

* pr comments

Co-authored-by: Aaron Schlesinger <70865+arschles@users.noreply.github.com>
2020-11-24 10:00:47 -05: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
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
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
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
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
Yi Tang
ca10728887 ref: upstream lister and it's impl to module pkg (#1309) 2019-07-25 20:40:03 -04:00
Yi Tang
7de77889ad support goproxy for list/download command (#1304) 2019-07-15 14:07:24 -04:00
Marwan Sulaiman
7519a77bbe pkg/module: return KindNotFound on incorrect mod download (#1300) 2019-07-08 14:36:18 -07:00
Marwan Sulaiman
e4534a20db pkg/download: return 404 on list/latest (#1299) 2019-07-08 14:31:42 -07:00
Marwan Sulaiman
dea04b175f download: expand redirect tests (#1287) 2019-06-18 11:22:03 -07:00
Alexej Kubarev
d138a42599 Fixing error check logic for module downloads in case of redirects. (#1286)
This aligns `ModuleHandler` with `ZipHandler` and `InfoHandler` logic.
2019-06-18 08:53:16 -04: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
marpio
8e5b6981d3 Remove dummy mod dir (#1121) 2019-05-03 22:52:36 +02:00
marpio
9dd0eaaa3a Filter out pseudo versions from storage on list endpoint (#1114)
* list should not return pseudo versions

* rm empty line

* handle case when repo does not exist anymore
2019-03-11 15:58:10 -04:00
Thanatat Tamtan
c3d8a055d7 ZipHandler set content type (#1117) 2019-03-10 16:15:25 -04:00
Pascal Dierich
fd10bed609 pkg/download/addon: fix test error msg in TestPoolLogic. (#1034) 2019-01-07 22:04:09 -05:00
Marwan Sulaiman
f0e931311b pkg/stash: allow nonsemver requests to be resolved properly (#1015) 2019-01-07 20:51:22 -05:00
Marwan Sulaiman
0d94af2503 catalog: clean up unused interfaces (#1027)
* catalog: clean up unused interfaces

* fix op name
2019-01-05 15:04:46 -05:00
Pascal Dierich
9964e84902 fixes typos (#1031)
* fix typo in DEVELOPMENT.md

* fix doc typo in upstream_lister.go

* Remove Olympus references

* fix typo in DEVELOPMENT.md

* Update DEVELOPMENT.md
2019-01-05 13:21:24 -05:00
Manu Gupta
3b621caa85 Move catalog handler out of download protocol (#1020)
* Move catalog handler out of download protocol

* Bring back logger

* update comment
2019-01-02 21:55:07 -08:00
Marwan Sulaiman
5870aeee8d Remove Buffalo (#1010)
* Remove Buffalo

* gofmt

* pr fixes

* fix subrouter

* bring back secure middleware + pr fixes

* better place for subrouter

* vendor
2018-12-22 20:24:25 -05:00
Nafis Faysal
dd801d86b1 Refactoring code to improve HTTP status code (#1005)
* refactoring code to improve HTTP status code

* refactoring code to improve HTTP status code

* refactoring code to improve HTTP status code

* refactoring code to improve HTTP status code
2018-12-20 22:15:03 +01:00
Manu Gupta
ef3d0130f6 Pass ctx down the vcs lister stack and add tracing to it (#992) 2018-12-13 23:27:02 -05:00
Federico Paolinelli
0258e17d89 Catalogendpoint (#955)
* 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
2018-12-12 21:17:26 +01:00
Manu Gupta
0b2aece18d 1st attempt at speeding up list endpoint (#991) 2018-12-11 21:10:24 +01:00
Manu Gupta
c097fc8d79 Add test when go mod download fails (#962)
* Add test when go mod fails

* Do not export the mocked fetcher
2018-12-05 13:21:47 -08:00
Brent Pendergraft
bc35636749 extract log entry from context in pkg/download (#874)
* extract log entry from context in pkg/download

* update doc for LogEntryHandler
2018-11-07 08:48:02 +01:00
Marwan Sulaiman
24fb4b7399 Remove olympus mention in doc comment (#812) 2018-10-24 13:50:13 +02:00
Henry Jenkins
532e93e119 Remove Olympus code (#779)
* Remove nolonger used moniker package

Usage was removed in 97d8013

* Remove reference to Zeus

Use name Proxy for now.

* Remove Olympus code

See github issue #777

* Remove Olympus related vendor modules

* Mention Olympus removal in docs

* Add note about no registries existing

* Remove eventlog

* Update docs for Olympus removal
2018-10-22 11:52:02 -07:00
Michal Pristas
89d9dd2609 updated single letter props (#746) 2018-10-05 08:54:57 -07:00
marpio
d370b5a240 ignore line endings in gomod tests (#718) 2018-10-02 13:38:59 +02:00
Aravind
7ee25d59d6 Fix typo in comment (#709) 2018-10-01 09:09:29 +02:00
Zachary Romero
e5b307354c Patch points of test flag leakage (#667) 2018-09-29 19:26:19 +02:00