Commit Graph

400 Commits

Author SHA1 Message Date
Konstantin Haase
7b3c1b6215 update core, support and rack-ssl 2013-01-30 12:57:28 +01:00
Sven Fuchs
ac08027149 bump travis-core 2013-01-30 11:24:51 +01:00
Sven Fuchs
de692185c6 bump travis-core 2013-01-30 10:06:20 +01:00
Sven Fuchs
b8dfb1cd00 auth PUT to /artifacts/:id 2013-01-30 08:50:27 +01:00
Piotr Sarnacki
260c46181d Add hack to allow handling redirect to logs on the client properly.
This hack is temporary and should be removed when we find better
solution.

TL;DR: we can't handle redirects to S3 using CORS, so in case we want to
get logs from S3 without additional requests to API, we need to return
status that will not be automatically redirected (in this case 204 seems
like the best answer).

Longer rationale:

Old logs are hosted on S3 now and in case log is not available in the
database, we would like to redirect to the archived log. Although S3
support CORS, our use case breaks on some browsers:

  * when request is triggered to /jobs/:id/log and log is archived, api
    returns 302 redirect, Location header points to the log on S3
  * browser transparently redirects to given url, but it sets Origin to
    null, for security reasons
  * "Origin: null" is ok, because we allow every origin by setting
    AllowedOrigin to "*"
  * S3 returns "Access-Control-Allow-Origin: null" header, which breaks
    some browsers (I confirmed it for webkit based browsers)

In order to fix this, S3 would need to return * in
Access-Control-Allow-Origin header or we would need to tell the browser
to not follow redirect. Both solutions are not achiveable.

Another option would be to return log information in job payload - we
could send log_url field which should be either log url on amazon or
null, but in such case we would need to query artifacts table in each
job request. This is something that should be avoided as archived logs
are not frequently requested - slowing down every request to get info
for it would be a waste.
2013-01-29 03:51:22 +01:00
Piotr Sarnacki
489a33cbf6 Try 307 redirect on /logs.txt 2013-01-28 19:05:07 +01:00
Konstantin Haase
62b876d2e1 keep query string when redirecting in rewrite middleware 2013-01-28 15:47:28 +01:00
Konstantin Haase
18b9739691 Merge branch 'master' of github.com:travis-ci/travis-api 2013-01-28 15:44:04 +01:00
Piotr Sarnacki
a565522f41 Redirect to full amazon url
Amazon can't work properly with SSL and CNAME for subdomains. For now we
can use full amazon url.
2013-01-28 03:43:28 +01:00
Piotr Sarnacki
31371686c9 Redirect to archive logs 2013-01-28 03:04:36 +01:00
Piotr Sarnacki
edc9749bce Bump travis-core 2013-01-28 00:54:32 +01:00
Piotr Sarnacki
616b8df27c Use travis-core from master 2013-01-27 21:42:00 +01:00
Sven Fuchs
7b4712c32c fix after rebase 2013-01-26 20:54:58 +01:00
Sven Fuchs
b81644acba comment out put to /artifacts/:id for now 2013-01-26 20:44:04 +01:00
Sven Fuchs
4ea95494de allow put to /artifacts/:id 2013-01-26 20:44:04 +01:00
Sven Fuchs
598a586ed4 don't start metrics logger etc unless in production 2013-01-26 20:43:54 +01:00
Sven Fuchs
d441336573 expose logs on /job/:id/log.txt 2013-01-26 20:43:54 +01:00
Piotr Sarnacki
f2d768080f Return last builds on each branch for /builds?branches=true
This is a hack to fix travis-ci/travis-web#123 easier. A proper solution
would be to refactor how /branches work.
2013-01-26 01:12:47 +01:00
Piotr Sarnacki
46eefaf26d Fix syntax error 2013-01-26 00:02:15 +01:00
Piotr Sarnacki
c6e3c29a57 Load the data for integration tests upfront
We can do it, because we use :transaction strategy with DatabaseCleaner,
which starts transaction before each test and rollbacks after it. That
way data before each test is consistent.

The big advantage of such approach is that tests are fast now - we need
to only load Scenario data once.

One of the drawbacks, on the other hand, is that we need to always load
this data, even if no integration tests need running.

We can try to be smart about it and check if any integration tests are
loaded.
2013-01-26 00:00:42 +01:00
Konstantin Haase
939b35cbff fix syntrax 2013-01-25 22:30:47 +01:00
Konstantin Haase
85e8f27047 hotfix for strange bug 2013-01-25 22:13:33 +01:00
Konstantin Haase
bde974e182 Revert "disable newrelic"
This reverts commit 48cc0d366a.
2013-01-25 22:11:53 +01:00
Konstantin Haase
48cc0d366a disable newrelic 2013-01-25 11:40:41 +01:00
Konstantin Haase
01c585e189 I have no idea 2013-01-25 11:29:05 +01:00
Konstantin Haase
7195d48e7b downgrade sinatra 2013-01-24 22:15:55 +01:00
Piotr Sarnacki
36c40da55d Fix workers tests 2013-01-24 14:37:05 +01:00
Piotr Sarnacki
9ced671da5 Bump travis-core 2013-01-24 02:03:09 +01:00
Piotr Sarnacki
8c6d3bb9df Bump travis-core 2013-01-24 01:39:37 +01:00
Piotr Sarnacki
441f2a3091 Bump travis-core 2013-01-24 01:34:50 +01:00
Sven Fuchs
37dd125a8c start notifications 2013-01-23 22:17:40 +01:00
Sven Fuchs
6e598a4e4a Merge branch 'master' of github.com:travis-ci/travis-api 2013-01-23 22:06:27 +01:00
Sven Fuchs
2718bc7e98 bump travis-support 2013-01-23 22:04:37 +01:00
Piotr Sarnacki
8c5529a50a Revert "go back to unicorn for now"
Server is not the bottleneck and new relic does not work on unicorn.

This reverts commit 4a88b2d8c6.

Conflicts:

	Gemfile.lock
2013-01-23 21:05:36 +01:00
Sven Fuchs
cc8b4b0ef4 bump travis-core 2013-01-23 02:45:15 +01:00
Sven Fuchs
ee11e571b7 pass the api payload type for workers because we now do not return AR scopes any more 2013-01-23 02:44:30 +01:00
Sven Fuchs
11230cbb44 bump travis-core 2013-01-22 21:51:41 +01:00
Sven Fuchs
4a88b2d8c6 go back to unicorn for now 2013-01-22 21:27:38 +01:00
Konstantin Haase
593920ce81 add Pragma header for caches that do not understand Cache-Control, see #38 2013-01-21 21:18:16 +01:00
Konstantin Haase
1dd3324350 add /users/:id 2013-01-21 12:16:51 +01:00
Sven Fuchs
e693fc365c Merge branch 'master' of github.com:travis-ci/travis-api 2013-01-20 20:10:23 +01:00
Sven Fuchs
f925297ff4 bump travis-core 2013-01-20 20:09:52 +01:00
Piotr Sarnacki
a2018bc0f1 Explicitly load constants on Travis::Api
For some reason not loading it broke new relic notifications
2013-01-19 23:14:04 +01:00
Piotr Sarnacki
046b396b9e Ignore log dir 2013-01-19 22:36:58 +01:00
Piotr Sarnacki
f2e596ec89 Preload also models 2013-01-19 22:36:58 +01:00
Piotr Sarnacki
7bd90a4ef3 Use puma as a webserver, try to preload constants 2013-01-19 21:20:51 +01:00
Piotr Sarnacki
c1da6228a7 Use thin as a webserver (hopefully it fixes new relic 2013-01-19 19:41:23 +01:00
Piotr Sarnacki
e97dd437f6 Update newrelic 2013-01-19 18:26:55 +01:00
Sven Fuchs
e491461cfb remove branch 2013-01-19 13:46:40 +01:00
Sven Fuchs
92a3d17ebf use travis-core/sf-restart-event 2013-01-17 19:06:34 +01:00