Commit graph

451 commits

Author SHA1 Message Date
Jake Moshenko
353da13b16 Set up the service monitoring for the log migration script. Add a database migration to add the logs_archived column. 2014-09-12 11:57:47 -04:00
Jake Moshenko
b55e79e5d3 Merge remote-tracking branch 'origin/master' into waltermitty 2014-09-12 11:45:07 -04:00
Jake Moshenko
c5ca46a14b Merge remote-tracking branch 'origin/master' into comewithmeifyouwanttowork
Conflicts:
	data/model/legacy.py
	static/js/app.js
2014-09-12 11:03:30 -04:00
Jake Moshenko
5388633f9a Merge remote-tracking branch 'origin/master' into pullfail 2014-09-12 10:36:38 -04:00
Joseph Schorr
8d3ce44682 Address comments on code review 2014-09-11 15:45:41 -04:00
Jake Moshenko
8b3a3178b0 Finish the build logs archiver, add handlers for cloud and local that handle gzip encoded archived content. 2014-09-11 15:33:10 -04:00
Jake Moshenko
2455c17f96 Merge remote-tracking branch 'origin/master' into waltermitty
Conflicts:
	app.py
	data/userfiles.py
2014-09-11 11:18:28 -04:00
Jake Moshenko
548f855f71 Use the pure python io module to avoid some interaction between gunicorn, wsgi, and bufferedreader that prevents gunicorn from properly sending the files. 2014-09-09 22:28:25 -04:00
Jake Moshenko
c9e1648781 Small fixes to bugs in the streaming handler for use with magic and radosgw. 2014-09-09 18:30:14 -04:00
Jake Moshenko
756e8ec848 Send the content type through to the cloud engines. 2014-09-09 16:52:53 -04:00
Jake Moshenko
29d40db5ea Add a new RadosGW storage engine. Allow engines to distinguish not only between those that can support direct uploads and downloads, but those that support doing it through the browser. Rename resumeable->resumable. 2014-09-09 15:54:03 -04:00
Joseph Schorr
7c45aca405 Code review changes 2014-09-08 17:20:01 -04:00
Jake Moshenko
451e034ca1 Archived logs commit 1. Squash me. 2014-09-08 16:43:17 -04:00
Jake Moshenko
54fbb2a4c0 Rename collections to morecollections to avoid a conflict with the built in module. 2014-09-08 16:42:43 -04:00
Joseph Schorr
3c20402b32 Add a common base email template, translate the emails over to using jinja and add emails when e-mail addresses and passwords are changed. 2014-09-05 19:57:33 -04:00
Jake Moshenko
64480fd4ed Merge remote-tracking branch 'origin/master' into yellowalert
Conflicts:
	data/migrations/versions/82297d834ad_add_us_west_location.py
	test/data/test.db
2014-09-05 11:30:30 -04:00
Jake Moshenko
c7e873366d Inject the tables metadata into the upgrade and downgrade functions. Fix a bunch of the downgrades to actually work. 2014-09-04 20:58:29 -04:00
Joseph Schorr
6fa5a365b3 Add loginservice for Google 2014-09-04 18:45:23 -04:00
Joseph Schorr
fa1abd5eda Don't require the invite email to match the invited user 2014-09-04 18:42:23 -04:00
Joseph Schorr
b9a4d2835f Add migration for the new DB field 2014-09-04 18:18:19 -04:00
Joseph Schorr
e028d4ae0a Merge master into branch 2014-09-04 18:08:18 -04:00
Jake Moshenko
8910c6ff01 Add a migration to remove the webhooks table. 2014-09-03 13:44:05 -04:00
Jake Moshenko
21f7acf7ca Fix the default value for the migration to use a string 2014-09-03 13:34:36 -04:00
Jake Moshenko
0bd9ba523e Add a migration for the brute force prevention fields to the user table. 2014-09-03 13:07:53 -04:00
Jake Moshenko
2dcdd7ba5b Add exponential backoff of login attempts. 2014-09-02 15:27:05 -04:00
Jake Moshenko
68ecebc704 Merge branch 'master' of ssh://bitbucket.org/yackob03/quay 2014-08-29 13:16:41 -04:00
Jake Moshenko
ce7e3a8733 Do not link against layers that are still marked as uploading, there is no guarantee that they will ever be completed and their ancestry may be incomplete. 2014-08-29 13:16:32 -04:00
Joseph Schorr
3b72b26836 Merge branch 'master' into comewithmeifyouwanttowork 2014-08-28 20:50:13 -04:00
Joseph Schorr
f15b3f345e Review updates 2014-08-28 19:07:22 -04:00
Joseph Schorr
85ab7a8c8d Fix migration downgrade for the regenerating robot kind 2014-08-28 18:40:33 -04:00
Joseph Schorr
9142ff69a3 Add migration for new notification kinds 2014-08-28 18:39:35 -04:00
Joseph Schorr
d76d4704a0 Add pagination to the notifications API and make the UI only show a maximum of 5 notifications (beyond that, it shows "5+"). 2014-08-26 15:19:39 -04:00
Joseph Schorr
a129aac94b Add ability to regenerate robot account credentials 2014-08-25 17:19:23 -04:00
Joseph Schorr
d2880807b2 - Further fixes for license stuff
- Small fixes to ensure Quay works for Postgres
2014-08-21 19:21:20 -04:00
Joseph Schorr
d5027d2383 Add a migration script for the new table and log entry kinds 2014-08-18 20:45:48 -04:00
Joseph Schorr
daa43c3bb9 Add better messaging around pulling of base images when they fail due to invalid or missing credentials 2014-08-18 20:34:39 -04:00
Joseph Schorr
02d3b70013 Make sure to search teams as well when determining the robots which have access to a private repo 2014-08-18 19:19:01 -04:00
Joseph Schorr
43b6695f9c Get team invite confirmation working and fully tested 2014-08-18 17:24:00 -04:00
Joseph Schorr
56d7a3524d Work in progress: Require invite acceptance to join an org 2014-08-15 17:47:43 -04:00
Joseph Schorr
f6f857eec2 Add US West region 2014-08-15 15:02:26 -04:00
Joseph Schorr
27c2680380 Plan update and fix about page 2014-08-13 14:25:48 -04:00
Joseph Schorr
bd4bbe0bdb Add missing image location for enterprise 2014-08-12 22:29:17 -04:00
Joseph Schorr
389c88a7c4 Update federated login to store metadata and have the UI pull the information from the metadata 2014-08-11 18:25:01 -04:00
yackob03
420d02cd71 Fix the migration script to add and remove the logentrykinds for notifications. 2014-08-05 14:21:29 -07:00
yackob03
b07eff41f6 Switch the table names to use lower case. 2014-08-05 13:44:18 -07:00
yackob03
cd5af72ba8 Temporarily prevent the deletion of the webhooks table to allow a migration path which keeps prod working. 2014-08-04 13:44:22 -07:00
Joseph Schorr
2c3fe2e60f Switch web hook migration script to fully use the alembic context and connection 2014-08-01 13:37:27 -04:00
Joseph Schorr
a44345338d Add bidirectional migration code of webhooks to/from repo-push webhook notifications. 2014-07-31 16:02:14 -04:00
Jake Moshenko
ee2abf590a Merge branch 'redalert' of ssh://bitbucket.org/yackob03/quay into redalert 2014-07-31 14:01:17 -04:00
Jake Moshenko
3f6466fccd Add a migration to move the existing webhooks over and another migration to remove the legacy webhooks table. 2014-07-31 14:01:03 -04:00
Joseph Schorr
346d3491ff Merge branch 'redalert' of https://bitbucket.org/yackob03/quay into redalert 2014-07-31 13:31:16 -04:00
Joseph Schorr
49801bc2c4 - Add web hook queue code back in. We'll remove it and turn it off after this CL goes to prod
- Make notification lookup always be by repo and its UUID, rather than the internal DB ID
- Add the init script for the notification worker
2014-07-31 13:30:54 -04:00
Jake Moshenko
53a1f62614 Create a migration to prepare the database for the new notification types. 2014-07-31 13:27:05 -04:00
Joseph Schorr
7de1dd7dc0 Merge branch 'master' into redalert 2014-07-28 18:35:39 -04:00
Joseph Schorr
32b2ecdfa6 Add ability to dismiss notifications 2014-07-28 18:23:46 -04:00
Joseph Schorr
34fc279092 Add e-mail authorization to the repository notification flow. Also validates the creation of the other notification methods. 2014-07-28 14:58:12 -04:00
Jake Moshenko
9ad7fc7a54 Prevent extra queries to load image storage data. 2014-07-22 16:46:36 -04:00
Joseph Schorr
752efb9e0f Fix the spawn_notification to work in all cases and clean up some of the remaining code 2014-07-18 16:34:52 -04:00
Joseph Schorr
591cd020b8 Merge branch 'master' into redalert 2014-07-18 15:58:56 -04:00
Jake Moshenko
8a2c88488a Filter tokens with an associated build trigger from the list API. Delete associated tokens when deleting a trigger. 2014-07-18 14:56:26 -04:00
Joseph Schorr
8d7493cb86 Convert over to notifications system. Note this is incomplete 2014-07-17 22:51:58 -04:00
Joseph Schorr
de8e898ad0 Add UI for managing repo notifications 2014-07-17 13:32:39 -04:00
Joseph Schorr
a84fe0681a Start on data model changes and API changes for the new repository notification system 2014-07-16 16:30:47 -04:00
Jake Moshenko
5645b6da32 Add support for read slave databases. 2014-07-02 19:10:24 -04:00
Jake Moshenko
d851feef6e One of the calls which returns an image was not using the base format which includes locations yet. 2014-06-30 14:51:01 -04:00
Jake Moshenko
684c26bc1a Populate image storage objects with locations everywhere. 2014-06-27 20:04:26 -04:00
Jake Moshenko
e68d6a7302 Merge branch 'master' of ssh://bitbucket.org/yackob03/quay 2014-06-27 19:18:35 -04:00
Jake Moshenko
4e5e8a08de Add a maintenance notification kind and make it of the level warning. 2014-06-27 19:18:27 -04:00
Joseph Schorr
76165b5d2b Add API and UI support for displaying image locations 2014-06-24 18:48:42 -04:00
Jake Moshenko
6047f3759f Remove the placement fallback since the DB has been fully backfilled. 2014-06-24 17:01:23 -04:00
Jake Moshenko
6e3a545c7f Add a migration to upgrade to the version of the database supporting placements. 2014-06-18 17:46:20 -04:00
Jake Moshenko
0a62f7f725 Add the ability to look up images which do not have a placement yet. 2014-06-18 12:40:23 -04:00
Jake Moshenko
bf0e01fba5 Fix bugs with pushing, pulling, and deleting. 2014-06-17 16:37:48 -04:00
Jake Moshenko
bf98575feb Add the basics of geographic data distribution and get the tests to work. 2014-06-17 16:03:43 -04:00
Jake Moshenko
6d07cf94d2 Add a migration to remove the image fields that were migrated to image storage, and add some uniqueness constraints to some indexes. 2014-06-12 19:51:57 -04:00
Jake Moshenko
78c5aec5b9 Switch the checksums to use the registry computed value, remove all assumptions of namespaced paths for legacy storage, fix an upload race condition in the registry code. 2014-06-11 15:37:45 -04:00
Jake Moshenko
d1f4fbdacc Split out the redis hostname for user events and build logs as a string config. Modularize the user events and fix all callers. 2014-05-30 14:25:29 -04:00
Jake Moshenko
0ba4201020 Add a module which will create notifications for all users when the license is at its expiration period, and terminate the process when the license expires. 2014-05-29 11:24:10 -04:00
Jake Moshenko
22cc7a85d4 Add exp_month and exp_year to the fake card to fix the tests. 2014-05-28 14:06:37 -04:00
Jake Moshenko
33b43b75c0 Eliminate a lot of the if cases in create_user by separating them out. Add a limit to the number of users which can be created based on the license. Add support for creating and loading licenses. 2014-05-28 13:51:52 -04:00
Jake Moshenko
0b6552d6cc Fix the metrics so they are usable for scaling the workers down and up. Switch all datetimes which touch the database from now to utcnow. Fix the worker Dockerfile. 2014-05-23 14:16:26 -04:00
Jake Moshenko
f4c488f9b6 Fix the queue query for old jobs which won't run. 2014-05-22 13:50:06 -04:00
Jake Moshenko
f6726bd0a4 Merge branch 'ldapper'
Conflicts:
	Dockerfile
	app.py
	data/database.py
	endpoints/index.py
	test/data/test.db
2014-05-22 12:13:41 -04:00
Jake Moshenko
d14798de1d Add a queue capacity reporter plugin to the queue. Move the queue definitions to app. Add a cloudwatch reporter to the dockerfile build queue. 2014-05-21 19:50:37 -04:00
Jake Moshenko
e1a5a3e543 Temporarily remove the db pool until we can figure out why they are running out of connections. 2014-05-19 17:14:23 -04:00
Jake Moshenko
8b5c781f84 Change the health check to ping the db and the redis build logs. 2014-05-13 18:53:42 -04:00
Jake Moshenko
11c6c5fa52 Merge remote-tracking branch 'origin/master' into ldapper
Conflicts:
	app.py
2014-05-13 16:55:02 -04:00
Jake Moshenko
628d09afe0 Remove the passwd attr ldap config. 2014-05-13 15:52:20 -04:00
Jake Moshenko
2da8b4737e Fix the registry to work with unicode usernames in LDAP. 2014-05-13 15:22:31 -04:00
Jake Moshenko
f049f738da Run the db migrations on container start unless we're running against Sqlite. 2014-05-13 15:20:17 -04:00
Jake Moshenko
553ef36e9b Fix a remaining direct usage of transaction factory in the data model. 2014-05-13 15:17:16 -04:00
Jake Moshenko
5fdccfe3e6 Add an alembic migration for the full initial database with the data. Switch LDAP to using bind and creating a federated login entry. Add LDAP support to the registry and index endpoints. Add a username transliteration and suggestion mechanism. Switch the database and model to require a manual initialization call. 2014-05-13 12:17:26 -04:00
Jake Moshenko
bcb993a914 Set up the build logs to use our fake build logs on test and local. 2014-05-09 18:45:11 -04:00
Jake Moshenko
027ada1f5c First stab at LDAP integration. 2014-05-09 17:39:43 -04:00
Jake Moshenko
feb7ad8dd1 Use the pooled mysql database. 2014-05-07 12:37:45 -04:00
Jake Moshenko
8a3af93b8c Improve the builder response to being terminated or dying. 2014-05-06 18:46:19 -04:00
Jake Moshenko
ef9fe871fc Move the upload flag to the database, and use the database stored image size rather than going to s3. 2014-05-02 16:59:46 -04:00
jakedt
44e514f49f Fix the test stripe to suppor trial properties. 2014-04-25 14:29:08 -04:00
jakedt
893e5136a0 Make the local userfiles 404 if the file is not there. Remove some extraneous logging from the trigger. 2014-04-16 22:43:57 -04:00
jakedt
be728ceccb Fix the implementation of local userfiles and switch master_branch to default_branch to match the github api. 2014-04-16 22:35:47 -04:00
jakedt
0827e0fbac Merge remote-tracking branch 'origin/master' into ncc1701
Conflicts:
	endpoints/web.py
	static/directives/signup-form.html
	static/js/app.js
	static/js/controllers.js
	static/partials/landing.html
	static/partials/view-repo.html
	test/data/test.db
2014-04-14 19:37:22 -04:00
jakedt
4b8217d4ad Add config to allow for setting the queue names at runtime. Fix a bug in the data model. 2014-04-11 19:23:57 -04:00
jakedt
61a6db236f Finish the implementation of local userfiles. Strip charsets from mimetypes in the build worker. Add canonical name ordering to the build queue. Port all queues to the canonical naming version. 2014-04-11 18:34:47 -04:00
jakedt
14fba3ae7c Rename SERVER_NAME to SERVER_HOSTNAME to fix the subdomain routing problems. 2014-04-11 11:17:45 -04:00
jakedt
8fac0474b5 Get staging to run under docker on an EC2 host. 2014-04-10 18:30:09 -04:00
jakedt
73f23f155c Merge branch 'ncc1701' of ssh://bitbucket.org/yackob03/quay into ncc1701 2014-04-10 15:20:26 -04:00
jakedt
d39f3cc5d4 Fix the tests and implement a fake stripe. 2014-04-10 15:20:16 -04:00
Joseph Schorr
bdf2b02c1a Merge branch 'ncc1701' of https://bitbucket.org/yackob03/quay into ncc1701 2014-04-10 00:27:51 -04:00
Joseph Schorr
0e320c964f - Add support for super users
- Add a super user API
- Add a super user interface
2014-04-10 00:26:55 -04:00
jakedt
4f3fa34206 Remove test field from the database definition. 2014-04-09 19:13:46 -04:00
jakedt
fc7756a3c2 Add alembic plumbing for database schema migrations. 2014-04-09 19:11:33 -04:00
Joseph Schorr
0e54b0501c Return the reason a username validation failed and add tests to verify we are sending the reason to client 2014-04-07 20:37:02 -04:00
jakedt
265fa5070a Fix support for multiple stack configurations and move most secrets into the quay-config project. 2014-04-07 16:59:22 -04:00
jakedt
e87ffa20cf First attempt at making config loadable through string config overrides in an env variable. 2014-04-03 17:31:46 -04:00
Joseph Schorr
9a79d1562a Change to store the pull robot on the repository build and only add the credentials to the queue item. This prevents the credentials from being exposed to the end user. Also fixes the restart build option 2014-04-01 21:49:06 -04:00
jakedt
ca1970a2f4 Use the real registry endpoint in the login command. 2014-04-01 19:00:11 -04:00
jakedt
3525e383df Merge remote-tracking branch 'origin/master' into pullinprivate
Conflicts:
	test/data/test.db
2014-04-01 18:28:48 -04:00
jakedt
126363dce9 Use our patched version of docker-py with build credentials patched in. Fix the hostname in the build credentials block to be variable. 2014-04-01 11:38:17 -04:00
Joseph Schorr
35f69b9f5b Add support for .tar.gz build packs in the build package viewer 2014-04-01 00:23:53 -04:00
jakedt
d67a1cddc2 Merge remote-tracking branch 'origin/master' into pullinprivate
Conflicts:
	workers/dockerfilebuild.py
2014-03-31 18:10:34 -04:00
jakedt
00ac3fb639 Merge branch 'master' of ssh://bitbucket.org/yackob03/quay 2014-03-28 17:54:07 -04:00
jakedt
fd941ed3a4 Strip tzinfo data from datetimes to make them compatible with peewee on sqlite. 2014-03-28 17:52:47 -04:00
Joseph Schorr
795de4235d Change "cannot connect to redid" to be a raised exception 2014-03-28 14:20:06 -04:00
Joseph Schorr
2006917e03 Add support for pull credentials on builds and build triggers 2014-03-27 18:33:13 -04:00
jakedt
41cfadac23 Protect the search and repository list endpoints appropriately. Add more differentiating data to some need types. Remove the notification about password change from the user admin page. Select the dependent models for the visible repo list. 2014-03-25 17:26:45 -04:00
jakedt
afb3a67b7b Switch the data to a textfield for authorization codes. 2014-03-25 16:06:34 -04:00
jakedt
5f98bf8dab Merge remote-tracking branch 'origin/master' into swaggerlikeus
Conflicts:
	endpoints/api.py
2014-03-25 15:50:03 -04:00
jakedt
669ec9c382 Change the token expiration time to 10 years. 2014-03-25 15:38:16 -04:00
jakedt
0097daebc2 Formatting changes. 2014-03-25 14:32:02 -04:00
Joseph Schorr
16d3ddd8cc Nicely handle the case where we cannot connect to Redis 2014-03-25 13:29:06 -04:00
jakedt
b81e48cb41 Merge branch 'swaggerlikeus' of ssh://bitbucket.org/yackob03/quay into swaggerlikeus
Conflicts:
	test/data/test.db
2014-03-25 12:43:09 -04:00
jakedt
cbc40588cb Finally figure out what the data field is supposed to be for and use it to implement and fix 3LO. 2014-03-25 12:42:40 -04:00
Joseph Schorr
c82d1ffe98 Add ability for users to see their authorized applications and revoke the access 2014-03-24 20:57:02 -04:00
Joseph Schorr
e92cf37583 Add cancel button to the oauth authorization page, add the org icon to said page, and fix some other minor bugs 2014-03-24 18:30:22 -04:00
Joseph Schorr
f7c27f250b Add full application management API, UI and test cases 2014-03-20 15:46:13 -04:00
jakedt
3b7b12085d User scope objects everywhere. Switch scope objects to namedtuples. Pass the user when validating whether the user has authorized such scopes in the past. Make sure we calculate the scope string using all user scopes form all previously granted tokens. 2014-03-19 18:09:09 -04:00
jakedt
c93c62600d Merge remote-tracking branch 'origin/master' into swaggerlikeus
Conflicts:
	data/database.py
	endpoints/api.py
	endpoints/common.py
	templates/base.html
	test/data/test.db
	test/specs.py
2014-03-19 15:39:44 -04:00
Joseph Schorr
b0dcb5d7e3 Merge branch 'swaggerlikeus' of https://bitbucket.org/yackob03/quay into swaggerlikeus 2014-03-18 16:46:28 -04:00
Joseph Schorr
9ae4506a0d Add OAuth usage information the API logs, have it be displayed in the logs UI and start on the code to display application information when clicked. Note that this does not (yet) do anything with the information returned as we need to wait for the mainline merge of Angular 1.2.9 (which is in master) before I can continue on the display 2014-03-18 16:45:18 -04:00
jakedt
6f39e158d6 Eliminate all of the exceptions when running the tests. 2014-03-18 15:58:37 -04:00
Joseph Schorr
d469b41899 Add an oauth authorization page 2014-03-14 18:57:28 -04:00
Joseph Schorr
525ef8d14f Add support for targeting notifications to organizations and remove the password_required notification for new orbs 2014-03-12 19:00:24 -04:00
jakedt
e74eb3ee87 Add scope ordinality and translations. Process oauth tokens and limit scopes accordingly. 2014-03-12 16:31:37 -04:00
Joseph Schorr
578add3b9e Finish basic notifications system and verify it works for the "password_required" notification. 2014-03-12 16:05:32 -04:00
jakedt
25ceb90fc6 Add some sort of oauth. 2014-03-12 12:37:06 -04:00
Joseph Schorr
368a8da7db - Add data classes for notifications
- Add basic API for notifications
- Change the password required to be a notification
2014-03-12 00:49:03 -04:00
jakedt
bb413126ec Fix list_trigger_builds. 2014-03-06 15:04:59 -05:00
jakedt
fdccba9d8e Reverse the order of the builds from the API. 2014-03-05 16:17:01 -05:00
jakedt
fde96c736a Fix a problem with initdb and add a limit to the builds API. 2014-03-05 15:50:32 -05:00
Joseph Schorr
3f806b10c2 Add support for build status tags, which link to the Quay.io repo 2014-02-28 16:23:36 -05:00