Commit Graph

149 Commits

Author SHA1 Message Date
Ana Rosas
f09e9931b2 Restoring requests code 2016-08-02 09:39:00 -05:00
Aakriti Gupta
9ab4111f33 Remove feature flip from requests endpoint 2016-07-20 11:20:19 +02:00
Ana Rosas
75ef3a6367 Remove old code references from v2 endpoints 2016-07-20 11:17:50 +02:00
Ana Rosas
54e9d2fd06 Get type of model in order to call correct restart event 2016-07-11 15:20:34 -05:00
Ana Rosas
b234ad73be Use repo owner instead of current user 2016-07-11 14:29:05 -05:00
Ana Rosas
564e95be6b Use params instead of payload and return error message 2016-07-11 14:29:04 -05:00
Ana Rosas
db193cb541 Use new restart service on request endpoint 2016-07-05 10:25:54 -05:00
Sven Fuchs
a6658fa4d3 get rid of spec_helper_core 2016-06-19 14:35:54 +02:00
Sven Fuchs
51c6c8f58f move api/serializer to api/serialize/serializer 2016-06-18 17:58:36 +02:00
Sven Fuchs
81d8c64e98 rename api/v[0-2] to api/serialize/v[0-2] 2016-06-18 17:52:48 +02:00
Ana Rosas
bf20506e09 Merge branch 'master' into ar-enqueue-cancelling-jobs-builds 2016-06-15 16:15:05 +02:00
Tyranja
3b6ab6fb71 Copies spec from core 2016-06-14 15:10:40 +02:00
Ana Rosas
1c99216e23 Fix merge conflicts 2016-06-08 17:51:48 +02:00
Ana Rosas
8b9df97e3f Merge branch 'master' into ar-enqueue-restarting-jobs 2016-06-06 11:04:44 +02:00
Renée Hendricksen
21c714ae97 fix the test 2016-05-30 17:31:37 +02:00
Ana Rosas
6de524d84c Enqueue restarting jobs for the Hub 2016-05-30 17:07:17 +02:00
Ana Rosas
00bae7a945 Remove push_matrix method, no need of it 2016-05-27 16:41:07 +02:00
Ana Rosas
29f80ab31b Use CancelModel on Jobs endpoint 2016-05-27 16:15:41 +02:00
Ana Rosas
c3e0d6d6bb Use CancelModel in Builds endpoint 2016-05-27 15:57:19 +02:00
Ana Rosas
1863f5bd0c Enqueue restarting jobs for the Hub 2016-05-26 17:45:31 +02:00
Ana Rosas
3c253bb88c Move stub to before block on restart test 2016-05-23 15:07:33 -05:00
Ana Rosas
2b37d90ffb Add permission methods to enqueue_build 2016-05-23 15:07:33 -05:00
Ana Rosas
9bd145856b Add feature flag to enqueue restart build to Hub 2016-05-23 15:07:33 -05:00
Ana Rosas
9bbfb7ec97 Add an equeue service 2016-05-23 15:07:33 -05:00
Piotr Sarnacki
857af4fde0 Use Accept entries for getting API version 2015-07-07 12:45:30 +02:00
Piotr Sarnacki
66f5d71d1a Remove triggering builds in V2 2015-06-15 12:22:42 +02:00
Sven Fuchs
587a1a0f80 Auto-merged master into sf-throttle-request-receive on deployment. 2015-04-30 11:33:40 +02:00
Piotr Sarnacki
3cac519143 Ensure that both ways to get repos by ids are tested
In 222a970 I added a way to get repos by ids using format ids=1,2,3. It
turned out that getting by ids was already supported with
ids[]=1&ids[]=2 format, but it wasn't tested. I added tests for both
methods and left the comma separated ids list as we already support it
in other places.
2015-04-16 13:49:23 +02:00
Piotr Sarnacki
222a97028a Allow to get repositories by ids 2015-04-16 13:42:33 +02:00
Konstantin Haase
20e9448dc1 Merge pull request #146 from cscott/bug-145
Allow branch names to contain slashes.
2015-02-23 12:51:17 +01:00
carlad
8f6083117c add async method to send exception error to sentry
add ErrorHandling class, refactor spec

correct the raven config class

correct the raven test

add a fake method for getting an exception

require error_handling

add new TestError class to test exceptions

add correct error class to test

add rescue block to raven send

make method a class method and add a test Travis.config.dns

add error the repos to test error

remove carla method in repos

add a fake error in repos

delete carla method
2015-02-13 16:16:45 +01:00
Sven Fuchs
a395ba865d throttle build request receive api 2015-02-11 17:46:55 +01:00
carlad
517a3b04f7 Revert "Revert "Merge branch 'master' of github.com:travis-ci/travis-api""
This reverts commit 171b9c57c7.
2015-01-27 16:22:30 +01:00
Konstantin Haase
171b9c57c7 Revert "Merge branch 'master' of github.com:travis-ci/travis-api"
This reverts commit 1b8f77ab36, reversing
changes made to 79a4a9ad13.
2015-01-27 14:39:36 +01:00
carlad
6991c6bb2b update spec 2015-01-27 13:34:12 +01:00
carlad
f39d931857 update response status ans specs 2015-01-27 13:31:12 +01:00
Tyranja
a9c31fa5e9 Extract cancel and restart builds and jobs into sidekiq worker
See below for all the commit messages squashed into this one...
add a test

delete empty space

add job_cancellation worker

change id

change job_id param

add job restart worker

add require to sidekiq.rb

change params

add test for job restart and cancellation

add test for job restart

update build.rb improve build spec

update job restart with correct response, add test to chack for correct response when restarting job
2015-01-26 17:29:13 +01:00
Tyranja
057e9f0379 add Sidekiq for cancelling build
:
add require sidekiq to the sidekiq.rb

update Gemfile.lock

bump travis-sidekiqs

correct require statement

fix another request

connect to the database

add current user

add current user correctly

add current user correctly

add puts to see were in the condition we are

missing invertted comma

add comments to the worker

I HAVE NO IDEA

Revert "I HAVE NO IDEA"

This reverts commit 8bd1259bf4ea1b479f9391847a4700b7b15efe57.

change the id and source to symbols in the params because siedekiq expects that

add more printout

setup database connection, metrics and notification

correct the test
2015-01-23 14:43:54 +01:00
carlad
9b4d121956 refactor buildcancellation worker 2015-01-22 14:41:38 +01:00
Piotr Sarnacki
628b356964 I can't into timezones 2015-01-12 13:00:07 +01:00
Piotr Sarnacki
302927bad6 removed_at in tests should be in utc 2015-01-12 12:56:04 +01:00
Piotr Sarnacki
6846d2f783 Return log with chunks if chunked response is requested for removed log 2015-01-09 14:39:57 +01:00
Piotr Sarnacki
43e20332cf Return removed_at and removed_by if the log was removed 2015-01-09 14:28:30 +01:00
C. Scott Ananian
7ba84757dc Allow branch names to contain slashes
Fixes: #145
2014-11-13 01:06:26 -05:00
C. Scott Ananian
e45aa12d97 Add spec for /repos/*/branches/* endpoint 2014-11-13 00:05:24 -05:00
C. Scott Ananian
0cdafcc9c0 Add spec for /repos/*/branches endpoint 2014-11-12 22:16:14 -05:00
Sven Fuchs
193c749cd1 fix settings env var api specs 2014-10-07 19:14:40 +02:00
Sven Fuchs
58ce449ca4 fix specs for rspec 2014-10-07 16:48:21 +02:00
Piotr Sarnacki
890b7f1d93 Fix Accept header support for logs request
When log is aggregated and archived we don't have a way to return it in
JSON format, only text format. Till recently we were returning a text
response or a redirect to S3 even if Accept header was set only to JSON.
This commit fixes it.
2014-09-11 17:44:36 +02:00
Piotr Sarnacki
07cd97a90f Add "after" param to log
after query param allows to get only parts that come after a specified
number, for example "after: 10" will download only parts that come after
10th part.
2014-09-11 14:36:19 +02:00