Commit Graph

141 Commits

Author SHA1 Message Date
marpio
3bda516c19 Azureblob tests + checker fix (#1251)
* add azureblob tests

* get account name from env

* benchmarks

* skip test if account missing
2019-06-07 15:21:09 -07:00
marpio
91d7c47ba5 gcs: check if all files exist (#1274) 2019-06-06 15:47:50 -04:00
Marwan Sulaiman
3779208d49 storage/s3: fix checker prefix (#1239) 2019-05-24 09:47:24 -04:00
marpio
a75776b4ee Simplify gcs catalog (#1224)
* simplify gcs catalog impl

* invert condition
2019-05-14 13:39:09 -04:00
marpio
b2bcdce18c fix List call - token should be on 3. position (#1212) 2019-05-08 17:56:29 -07:00
Arpit Gogia
974077e73b Mongo go driver beta integration (#1042)
* 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
2019-04-17 19:59:01 +02:00
Marwan Sulaiman
4a4641b66b storage/gcp: create a bucket on every test run (#1176)
* storage/gcp: create a bucket on every test run

* ensure removal

* set the strg

* remove pkg level vars

* clean up func call
2019-04-04 11:48:41 -07:00
Marwan Sulaiman
8d46c8d026 storage/gcp: fix lister prefix (#1172)
* storage/gcp: fix lister prefix

* add slash to s3

* but really this time

* account for windows
2019-04-01 10:14:55 -04:00
Aaron Schlesinger
edd0216e09 Fixing typo in compliance test harness (#1170) 2019-03-30 14:37:12 +01:00
marpio
20aeee6c76 fs: Use no. of objects for Exists check (#1143)
* fs: check for len == 3 in Exists

* fix tests

* check for PathError

* check for isnotexists err
2019-03-28 11:09:08 -04:00
marpio
33adb2bb01 check if ver exists by counting the parts (#1145) 2019-03-28 01:47:52 -04:00
Kirill Motkov
3ff753d3c5 Improvement of len() comparisons style (#1153)
Builtin len() function can't return value smaller than zero.
2019-03-26 21:12:02 +01:00
marpio
58747ed290 aws s3: use no of objects for Exists check (#1142) 2019-03-19 20:56:12 +01:00
Marwan Sulaiman
081ec9126e pkg/stash: Add GCS implementation (#1124)
* pkg/stash: Add GCS implementation

* fix docs
2019-03-13 11:07:07 -07:00
Marwan Sulaiman
03f06db0f4 storage/gcp: Optimize Exists check from Getter (#1118)
* storage/gcp: remove Exists check from Getter

* pr fixes
2019-03-11 12:18:27 -04:00
Marwan Sulaiman
3b0a9b5a68 ci/cd: add .drone.yml file (#1091)
* ci/cd: add .drone.yml file

* add docker step

* put tag in right place

* separate docker builds for push vs tag

* move e2e to .drone.yml

* comment

* try gcp backend

* temp remove clean

* temp remove clean

* buckets confirmed

* fix docker latest

* sign yaml file + remove rc
2019-03-10 14:14:14 -04:00
Marwan Sulaiman
36dae02c03 storage/minio: chunk zip file (#1107)
* storage/minio: chunk zip file

* multi err on clean up

* fix doc
2019-03-06 16:13:24 -05:00
Marwan Sulaiman
26d565d7bc catalog: fix vet errors (#1090)
* catalog: fix vet errors

* fix typo
2019-02-26 10:57:18 -08:00
Marwan Sulaiman
dbe44e627a storage/gcp: use base64 for json key (#1089) 2019-02-25 15:16:13 -08:00
Marwan Sulaiman
a27ef13b71 storage/gcp: allow json key to be used for GCS access (#1088) 2019-02-25 13:59:00 -08:00
Boris Popovschi
4dfa99320f Add catalog to minio (#1040)
* Implement cataloger interface for Minio

* Catalog fix

* Implemented Catalog method in the Minio storage package

* code fmt fix

* fmt fix

* remove unused channel
2019-02-15 20:02:59 -08:00
Chris Mills
2cf10c3ead Allow mgo.ParseURL to set [/database] (#997)
* Allow mgo.ParseURL to set [/database]

As per Michael's solution we need to be able to set the database from
either the parsed connection string, or fallback to athens if not set.

Signed-off-by: Chris M <me@christophermills.co.uk>

* Remove TimeoutDuration which was removed #928

Signed-off-by: Chris M <me@christophermills.co.uk>

* Correct conf_test to accommodate for changes

I'd missed out the addition of DefaultDBName from the test, this has now
been corrected

Signed-off-by: Chris M <me@christophermills.co.uk>

* Make sure gofmt runs automatically on this machine

Y'know simple stuff.

Signed-off-by: Chris M <me@christophermills.co.uk>
2019-02-14 10:21:34 -08:00
marpio
128a7d6b3c gcp compliance tests (#1030)
* gcp compliance tests

* fix error wrapping, rm redundant funcs

* add mod, ver info to the error

* adjust bucket name

* adjust the catalog test
2019-01-16 16:21:34 +01:00
Joshua Rubin
84eff04ed2 Use ambient aws credential provider for s3 (#1041)
* use ambiant aws credentials

Signed-off-by: Joshua Rubin <joshua@rubixconsulting.com>

* better naming, docs and examples for default aws config

Signed-off-by: Joshua Rubin <joshua@rubixconsulting.com>
2019-01-16 08:47:21 +01: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
Marwan Sulaiman
2bd4c9d12f mongo: use explicit URL for testing (#1025) 2019-01-04 20:23:49 +01:00
Manu Gupta
23b285d49d Catalog endpoint support for mongo (#985)
* 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
2019-01-02 22:13:56 -08: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
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
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
1d7155eeb7 Only fetch versions while list is called (#986) 2018-12-09 19:13:01 +01:00
Tomasz Tomalak
edc2f7842c Add check if GCP bucket exists and remove GCP Bucket create (#952)
* Add check if GCP bucket exists, Remove bucket creation

* Update GCP section in Storage Configuration docs

* Add more explicit info if bucket not exists
2018-12-01 17:53:15 +01:00
Aravind
48f7ca7780 Implement storage.Backend for azureblob (#917) 2018-11-29 17:06:19 +01:00
Yorman
b92a642f1a Add error checks in a few test files and fix misspelled words (#919)
* Remove inefficient assignment of variable cxt in pkg/storage/fs

* Remove inefficient assignment of variable cxt in pkg/storage/minio

* Remove inefficient assignment of variable cxt in pkg/storage/mongo

* Fix commonly misspelled English words successfully and accessible

* Remove inefficient assignment of variable cxt in pkg/download

* Remove inefficient assignment of variable cxt in pkg/module

* Add missing error checks in a few unit-test files

* Revert removal of inefficient assignment of variable cxt

The variable, although is not being used, it maintains the readability
in the functions where it’s being assigned. The removal of `cxt` in
these files may introduce errors when a new function taking these
values is called. Two other contributors agree that it’s easy to miss
this detail when passing the variable to other functions and the traces
are not being recorded.

* Modify unit-test error reporting for the config package

* Modify config test to exit when ioutil.TempFile or os.Chmod fail
2018-11-21 20:16:05 +01:00
azure-pipelines[bot]
1984dbdaaf Set up CI with Azure Pipelines (#862)
* Set up CI with Azure Pipelines

* trial & error

* use robocopy

* fix slash

* handle robocopy exit code

* rm goroot

* build proxy

* build & test proxy

* Skip Test_checkFilePerms on Win until issue resolved

* start minio and mongo

* do not create a new network on win 2016

* use win docker img for mongo

* download and start minio since there is no win docker img

* fix minio download & exec

* add minio access key and secret

* use new mongodb img

* fix docker-compose mongo

* trying to fix mongo tests

* ipconfig

* lets try that

* use docker inspect to get the container ip

* echo mongo container ip

* debuging docker inspect ipaddress

* set mongo env var to internal addr

* debug

* quotation is difficult

* without docker

* pass db dir

* split steps

* add some echos to know what takes so long

* cleanup

* add downloadURL var for minio and mongo

* rm windows docker compose file
2018-11-18 09:04:42 -05:00
marpio
329c86b843 use minio docker img on travis (#930) 2018-11-18 09:19:59 +01:00
marpio
4785e9c2b3 Remove storage timeouts (#928)
* remove storage timeouts

* fix tests
2018-11-16 16:00:08 -05:00
Brent Pendergraft
3b6aeb986e mongo: remove drop dups option and return error if module exists (#913) 2018-11-16 15:35:46 -05:00
Aaron Schlesinger
c6644f82f9 Checking the number of bytes written to Mongo GridFS (#889)
* Checking the number of bytes written to Mongo GridFS

* adding missing import

* formatting imports
2018-11-12 14:09:16 -05:00
Tomasz Tomalak
61ddb907c1 Add support for DigitalOcean Spaces storage (#847)
* Add Region value to Minio configuration, Allow to use minio for DigitalOcean Spaces

* Remove unnecessary Region value setter
2018-11-05 15:24:44 -05:00
marpio
54f92c55d6 Config cleanup (#860)
* add default env vars

* del setRuntimeDefaults

* replace cdn conf with azure config and remove baseURL
2018-11-05 09:04:38 +01:00
Michal Pristas
b90ca9700f cancell context with timeouts (#825) 2018-10-26 20:10:45 +02:00
Tomasz Tomalak
01104d3fe2 Add bucket check and create to storage/s3 tests (#801)
* Add bucket check and create for storage/s3 tests

* Add context with default time duration
2018-10-24 12:21:57 -07: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
Tomasz Tomalak
f665b0c2eb Fix skipped mongo and minio tests (#791) 2018-10-18 14:36:28 -07:00
Tomasz Tomalak
480d8c8e8c Implement storage.Backend for S3 storage (#750)
* Implement storage.Backend for S3 storage

* Adapt S3 storage test after refactor, Fix skiped minio tests

* Add defer to Close calls in s3.getter methods

* CR fixes

* Fix doc align

* Tweak err checks

* Fix parse test for S3 configs and cleanup error messages in storage.s3
2018-10-15 21:46:08 -04:00
Laurence Withers
4cda44cdd8 storage/fs: don't mark files as executables (#782)
When creating files, don't set the permission bits as 0777
(os.ModePerm), since that will cause them to be marked as executable.
Instead set them to 0666.

Add a comment explaining the umask will be subtracted, which is why 0666
(and not e.g. 0644 or 0600) is appropriate.
2018-10-15 14:06:04 +02:00
Manu Gupta
13083b9d32 Support custom ca's and make insecure as part optional default being false (#767)
* Support custom ca's and make insecure as part optional default being false

* Fix gofmt issue

* Fix newline
2018-10-15 11:14:48 +02:00
Manu Gupta
fc9486b1cb Allow users to use certificates from the system cert pool (#756) 2018-10-08 16:34:28 -05:00