Commit Graph

71 Commits

Author SHA1 Message Date
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