Commit Graph

124 Commits

Author SHA1 Message Date
Brandon Simmons
b863dc25c8 dev.sh: exit and report if graphql-engine fails to start up during integration tests 2020-02-03 18:50:10 -06:00
Brandon Simmons
87cbe68cab dev.sh: restore code coverage functionality
After https://github.com/hasura/graphql-engine/pull/3558
2020-01-23 18:35:18 -05:00
Brandon Simmons
1dd63a9386 Switch from stack to cabal-install for building server code (close #3280) (#3558)
Co-authored-by: Alexis King <lexi.lambda@gmail.com>
2020-01-17 16:07:15 -06:00
Simon
7f1cc633ee cli(migrations-docker): take a specific env var for database url (#3351)
Co-Authored-By: Shahidh K Muhammed <shahidh@hasura.io>
2019-12-27 10:00:06 +05:30
Tirumarai Selvan
c2829c662b cli(migrations-docker): randomize server port (fix #3479) (#3481)
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2019-12-27 09:35:29 +05:30
Shahidh K Muhammed
7abe5dd744 merge branch 'release-v1.0' to master after stable release 2019-12-17 19:23:34 +05:30
Shahidh K Muhammed
1d482c02dc update manifests to v1.0.0 2019-12-16 13:06:38 +05:30
Rakesh Emmadi
421a182f64 export metadata without nulls, empty arrays & default values (#3393)
* export metadata without nulls, empty arrays
* property tests for 'ReplaceMetadata' using QuickCheck
-> Derive Arbitrary class for 'ReplaceMetadata' dependant types

* reduce property test cases number to 30
QuickCheck generates the `ReplaceMetadata` value really large
for higher number test cases. Encoded JSON for such values is large and
consumes more memory. Thus, CI is giving up while running property
tests.

* circle-ci: Add property tests as saperate job
* add no command mode to tests
* add yaml.v2 to go mod
* remove indirect comment for yaml.v2 dependency
2019-12-14 00:47:38 -06:00
Brandon Simmons
db126dbea5 dev.sh: fix a bug affecting first time users (#3470) 2019-12-03 16:36:38 -06:00
Shahidh K Muhammed
e43be51dc6 update manifests to v1.0.0-rc.1 2019-12-02 13:02:46 +05:30
Brandon Simmons
84cfe18b3c dev.sh: combine tix from unit/haskell tests and integration tests in final report 2019-11-14 18:53:33 -05:00
Brandon Simmons
505ea4deef dev.sh: support running only integration tests or haskell/unit tests individually 2019-11-14 18:53:33 -05:00
Brandon Simmons
256be84dba dev.sh script: build before waiting for PG 2019-11-14 18:53:33 -05:00
Brandon Simmons
5827d652f6 In dev.sh tests: use postgres:11.5-alpine-postgis image which boots 3 sec faster 2019-11-14 18:53:33 -05:00
Brandon Simmons
da78a77fb2 In tests/dev.sh: upgrade ruamel to support python 3.7. Closes #3312
Tested on python 3.5 and 3.7

We make light use of pyenv to set an appropriate python version if
installed. We could easily install a correct version too if we wanted
but that seemed invasive.

The newer ruamel was an annoying upgrade but also offers some
improvements that exposed some test suite issues (fixed later).
2019-11-14 18:53:33 -05:00
Shahidh K Muhammed
98911df54e update manifests to v1.0.0-beta.10 2019-11-14 11:20:09 +05:30
cheater
637c2cb555 fix server dev script (close #3246) (#3257)
Signed-off-by: cheater <195390+cheater@users.noreply.github.com>
2019-11-06 13:10:46 +05:30
Shahidh K Muhammed
84eb09c1d2 update manifests to v1.0.0-beta.9 2019-10-31 14:29:32 +05:30
Shahidh K Muhammed
713d689dc1 update manifests to v1.0.0-beta.8 2019-10-22 12:54:35 +05:30
Rakesh Emmadi
6d92e4f9db save permissions, relationships and collections in catalog with 'is_system_defined' explicitly (#3165)
* save permissions, relationships and collections in catalog with 'is_system_defined'
* Use common stanzas in the .cabal file
* Refactor migration code into lib instead of exe
* Add new server test suite that exercises migrations
* Make graphql-engine clean succeed even if the schema does not exist
2019-10-21 11:01:05 -05:00
Rikin Kachhia
1369876699
Revert "update manifests to v1.0.0-beta.8" (#3167) 2019-10-17 17:48:29 +05:30
Shahidh K Muhammed
7c1a964819 update manifests to v1.0.0-beta.8 2019-10-17 15:30:07 +05:30
Shahidh K Muhammed
b7fb4eb13e
cli-migrations: enable metadata api while applying migrations (#3163) 2019-10-17 15:28:27 +05:30
Shahidh K Muhammed
624ce0c6aa Revert "update manifests to v1.0.0-beta.7"
This reverts commit ae145c587f.
2019-10-11 11:14:25 +05:30
Shahidh K Muhammed
ae145c587f update manifests to v1.0.0-beta.7 2019-10-10 10:37:33 +05:30
Arun Babu Neelicattu
927a48753e disable auto-update checks in cli-migrations container entrypoint (#2835) 2019-09-05 16:57:10 +05:30
Shahidh K Muhammed
f9daaf40d3 update manifests to v1.0.0-beta.6 2019-08-29 18:38:18 +05:30
Shahidh K Muhammed
b8b71c1000 update manifests to v1.0.0-beta.5 2019-08-23 14:57:40 +05:30
Vamshi Surabhi
a5a07634a5
Merge branch 'master' into dev-scripts-and-doc-tweaks 2019-08-07 12:08:46 +05:30
Shahidh K Muhammed
bfc6fc8a5e update manifests to v1.0.0-beta.4 2019-08-01 16:26:32 +05:30
Arun Babu Neelicattu
dc52c0e507 migrations image: use nc zero-i/o mode when waiting for po… (#2594)
This change adds the `-z` option to the nc command when waiting for
a port to be ready. This ensures that we exit correctly reporting
connection status.
2019-07-31 05:18:03 +00:00
Brandon Simmons
24409c7cbd Tweak local dev ekg console for longer timespan graphs 2019-07-26 01:17:56 -04:00
Brandon Simmons
0ed7891c0a Add fork of 'ekg' console for local development
These are assets forked from https://github.com/tibbe/ekg at revision fe5e5a1e67
Only monitor.js was modified slightly to take a local port from the URL
fragment.

I think we should feel free to continue modifying this, or replace with
our own tooling later on.
2019-07-26 01:17:56 -04:00
Brandon Simmons
bc4456eccc Add local development swiss army knife script scripts/dev.sh
At the moment we can...

...run tests in isolation, generating coverage report:

    $ dev.sh test

You can pass args to pytest as well. e.g. to run a specific test:

    $ dev.sh test -k "test_jsonb_has_all"

Launch a postgres container with useful dev defaults, with PostGIS,
cleaning up afterwards:

    $ dev.sh postgres

Build and launch graphql-engine in dev mode, connecting with a
`postgres` launched above

    $ dev.sh graphql-engine
2019-07-26 01:17:35 -04:00
Shahidh K Muhammed
694ba2cb6d update manifests to v1.0.0-beta.3 2019-07-12 11:00:10 +05:30
Shahidh K Muhammed
f20b12664c Revert "update manifests to v1.0.0-beta.3"
This reverts commit ec58269b7f.
2019-07-12 10:18:45 +05:30
Shahidh K Muhammed
ec58269b7f update manifests to v1.0.0-beta.3 2019-07-11 15:33:10 +05:30
tpaktop
8282e92408 add ability to override server timeout for cli migrations image (#2034) 2019-05-31 16:07:59 +05:30
Shahidh K Muhammed
e7e4f480d5 update manifests to v1.0.0-beta.2 2019-05-21 11:11:21 +05:30
Shahidh K Muhammed
97246f95fc update manifests to v1.0.0-beta.1 2019-05-16 17:01:50 +05:30
Shahidh K Muhammed
49535e447a update manifests to v1.0.0-beta.01 2019-05-16 14:45:15 +05:30
Shahidh K Muhammed
76ceb707f4
bundle console assets into server (close #516, close #521, close #2130) (#2192)
This PR builds console static assets into the server docker image at `/srv/console-assets`. When env var `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets` or flag `--console-assets-dir=/srv/console-assets` is set on the server, the files in this directory are served at `/console/assets/*`.

The console html template will have a variable called `cdnAssets: false` when this flag is set and it loads assets from server itself instead of CDN.

The assets are moved to a new bucket with a new naming scheme:

```
graphql-engine-cdn.hasura.io/console/assets/
   /common/{}
   /versioned/<version/{}
   /channel/<channel>/<version>/{}
```

Console served by CLI will still load assets from CDN - will fix that in the next release.
2019-05-16 13:15:29 +05:30
Shahidh K Muhammed
564bcb0239 update manifests to v1.0.0-alpha45 2019-05-06 16:58:57 +05:30
Shahidh K Muhammed
cb87fb45b5
update brand assets (#2062) 2019-04-26 10:05:52 +05:30
Shahidh K Muhammed
d38729b15f update manifests to v1.0.0-alpha44 2019-04-18 18:13:17 +05:30
Shahidh K Muhammed
4f289813af update manifests to v1.0.0-alpha43 2019-04-17 22:52:38 +05:30
Aravind Shankar
22656cefbd support metadata.json in cli-migrations image (close #1947) (#1968)
/scripts/cli-migrations/docker-entrypoint.sh only checks for metadata.yaml, however, https://docs.hasura.io/1.0/graphql/manual/migrations/manage-metadata.html#exporting-hasura-metadata talks about a metadata.json
2019-04-11 09:11:44 +05:30
Shahidh K Muhammed
8187f400a6 edit-pg-dump: fix a missing semi-colon 2019-04-09 09:24:59 +05:30
Shahidh K Muhammed
883646334a
update regex to delete event triggers in edit-pg-dump (close #1959) (#1960) 2019-04-08 15:59:11 +05:30
Shahidh K Muhammed
8c005795f6 update manifests to v1.0.0-alpha42 2019-04-08 13:35:01 +05:30
Shahidh K Muhammed
42a25f044e
add script and now.sh function to edit pg_dump output (close #1861) (#1884)
<!-- Thank you for submitting this PR! :) -->
<!-- Provide a general summary of your changes in the Title above ^, end with (close #<issue-no>) or (fix #<issue-no>) -->

### Description
<!-- The title might not be enough to convey how this change affects the user. -->
<!-- Describe the changes from a user's perspective -->
This PR adds a bash script and a serverless function to clean up the output of `pg_dump` so that it can be used as a migration file for Hasura. This can be later integrated with the CLI so that the cleanup is handled by CLI.

### Affected components 
<!-- Remove non-affected components from the list -->

- Scripts

### Related Issues
<!-- Please make sure you have an issue associated with this Pull Request -->
<!-- And then add `(close #<issue-no>)` to the pull request title -->
<!-- Add the issue number below (e.g. #234) -->
#1861 
### Solution and Design
<!-- How is this issue solved/fixed? What is the design? -->
<!-- It's better if we elaborate -->
- A serverless function written in Go gets the SQL content though HTTP POST.
- A set of pre-defined lines are removed from this SQL string.
- SQL comments are removed using regex matching.
- Postgres triggers created by Hasura for use with event triggers are removed with regex matching.
- Empty newlines are removed by regex matching.
- Resulting string is returned in the HTTP response.
### Steps to test and verify
<!-- If this is a feature, what are the steps to try them out? -->
<!-- If this is a bug-fix, how do we verify the fix? -->
```bash
curl --data-binary @filename.sql https://hasura-edit-pg-dump.now.sh > newfile.sql
```

### Limitations, known bugs & workarounds
<!-- Limitations of the PR, known bugs and suggested workarounds -->
NA
<!-- Feel free to delete these comment lines -->
2019-03-27 21:36:58 +05:30
Shahidh K Muhammed
058fc61a05 update manifests to v1.0.0-alpha41 2019-03-26 10:33:01 +05:30
Shahidh K Muhammed
50b02e950b update manifests to v1.0.0-alpha40 2019-03-12 12:05:46 +05:30
Shahidh K Muhammed
6ecc187e4c update manifests to v1.0.0-alpha39 2019-03-04 13:21:19 +05:30
Shahidh K Muhammed
12ecea16d0 update manifests to v1.0.0-alpha38 2019-02-14 15:10:02 +05:30
Shahidh K Muhammed
31050af32c update manifests to v1.0.0-alpha37 2019-01-29 15:45:32 +05:30
Shahidh K Muhammed
9b36dca243 update manifests to v1.0.0-alpha36 2019-01-29 10:56:25 +05:30
Shahidh K Muhammed
d454dd8fed update manifests to v1.0.0-alpha35 2019-01-18 19:53:52 +05:30
Shahidh K Muhammed
feaeccba71
apply metadata also in cli migrations image (close #1316) (#1319) 2019-01-08 14:35:03 +05:30
Shahidh K Muhammed
8ec69b68e6 update manifests to v1.0.0-alpha34 2019-01-04 17:08:24 +05:30
Shahidh K Muhammed
633631e0b1 update manifests to v1.0.0-alpha33 2018-12-19 18:43:43 +05:30
Shahidh K Muhammed
87edce1b12 update manifests to v1.0.0-alpha32 2018-12-18 15:51:56 +05:30
Shahidh K Muhammed
71d48682f1 update manifests to v1.0.0-alpha31 2018-11-28 16:01:40 +05:30
Shahidh K Muhammed
6cdffa8269 update manifests to v1.0.0-alpha30 2018-11-23 19:09:02 +05:30
Shahidh K Muhammed
45be696e45 fix tag script to handle multiple directories (#1100) 2018-11-23 18:59:22 +05:30
Vamshi Surabhi
571c00831a update manifests to v1.0.0-alpha29 2018-11-16 18:21:51 +05:30
Shahidh K Muhammed
546c8a3786 update manifests to v1.0.0-alpha28 2018-11-02 20:45:54 +05:30
Shahidh K Muhammed
fbcae53efa
build cli-migrations image on tagged deploys (close #534) (#953) 2018-11-02 19:38:25 +05:30
edawine
963d86464f update brand assets and the generator script (fix #670) (#712) 2018-10-13 14:01:31 +05:30
Shahidh K Muhammed
4e2ab8ad79
add brand assets (#543) 2018-09-27 16:44:50 +05:30
Shahidh K Muhammed
5929ec5be3
add installation manifests (#432) 2018-09-13 15:03:13 +05:30
Shahidh K Muhammed
183cbb169b only deploy dev|release branches (#76)
* remove special characters from version string
2018-07-10 11:52:13 +00:00
Shahidh K Muhammed
98c827449b
build: integrate circleci
integration with circleci for various workflows
2018-07-03 22:40:13 +05:30
Shahidh K Muhammed
6170d6b094 cli: add circleci config for cli (#26) 2018-06-29 13:09:21 +00:00