Commit Graph

307 Commits

Author SHA1 Message Date
Brandon Simmons
3e2e14357a Add rebuild-ghc-options to stack.yamls
I found this default a super annoying time waster.
2019-07-31 10:22:50 -04:00
Brandon Simmons
bc32130d09 Clarify HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL docs 2019-07-26 01:17:56 -04:00
Brandon Simmons
3a4071af09 Remove some output noise from tests 2019-07-26 01:17:55 -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
Brandon Simmons
04f90dd35d pytest.exit breaks pytest-xdist and produces a misleading error 2019-07-26 01:16:17 -04:00
Brandon Simmons
7e0f00a229 Remove obsolete Makefile target for tests removed in 6393aba447 2019-07-26 01:16:17 -04:00
Brandon Simmons
02ae91c64d Increase idle GC interval to workaround CPU leak issue (#2581)
This seems to resolve the issue locally (and has worked in the past),
but it's not clear what exactly is going on here (in particular, why
this should resolve what looks like a memory leak). It certainly seems
like a GHC issue of some sort.

Closes #2565
2019-07-24 10:41:52 +05:30
Vamshi Surabhi
4facb3c780 remove support for query templates (#2560)
query templates is a little known feature that lets you template rql
queries and serve them as rest apis. This is not relevant anymore
given the GraphQL interface and getting rid of it reduces the dev
time when adding features in few subsystems.

This feature has never been used outside hasura's internal projects or
documented or exposed through console and hence can safely be removed.
2019-07-23 19:11:34 +00:00
Alexis King
8f9a41ff88 Support casting between PostGIS geometry and geography types in where expressions (close #1983) (#2495)
* server: Bump dependencies to allow Haddock to run successfully

* Support casting between PostGIS geometry and geography types in filters
2019-07-15 14:22:45 +05:30
Vamshi Surabhi
66a2f33fa9 use all available cpu cores by default (#2511)
Use all available cores by default. sets -N rts flag by default. Can be disabled by
setting the `GHCRTS` env variable to `-N1`.
2019-07-12 05:25:15 +00:00
Anon Ray
c797d23a14 fix server tests (#2510) 2019-07-11 10:55:34 +00:00
Anon Ray
f2f14e727b Merge pull request from GHSA-2j98-fw5g-j43v
* fix bug in audience check while verifying JWT

  - previously the check was converting the audience type into a string
  and then comparing with the conf value. all audience types (as it is a
  string or URI) will convert to plain strings
  - use the Audience type from the jose library for comparing

* add docs for audience

* add issuer check as well

* docs minor syntax fix

* skip audience check if not given in conf

* minor docs update

* qualify import jose library
2019-07-11 09:58:39 +00:00
Ajeet D'Souza
92c4cff79e check input for empty strings for metadata api (close #2302) (#2300) 2019-07-11 09:00:45 +00:00
Ajeet D'Souza
605f8633f3 fail on tracking table/function with name conflict (close #2020) (#2383)
Currently, we allow tracking of a table with the same name as an already tracked function, and vice-versa. This causes an issue when querying from GraphQL since it will only query the table and not the function. I've made changes to disallow this by throwing an error.
2019-07-11 07:41:20 +00:00
Anon Ray
8f1e7dbc8d breaking: server logging changes (close #507, close #2171) (#1835) 2019-07-11 05:37:06 +00:00
Vamshi Surabhi
5aa4a46e72
allow fetching gc stats through dev api (#2489) 2019-07-10 17:31:52 +05:30
Vamshi Surabhi
f1cf6d0b17
allow session variables in operators which expect array input (#2475) 2019-07-10 15:49:58 +05:30
Rakesh Emmadi
9eb38e6c96 cache remote schema's introspection query response (fix #1679) (#2089) 2019-07-08 11:21:41 +05:30
Alexis King
6393aba447 Remove obsolete/unmaintained server Haskell test suite (#2472)
* Remove obsolete/unmaintained server Haskell test suite

* Prune some unused server dependencies
2019-07-05 10:56:32 +05:30
Anon Ray
f9863a29c7 update server cabal file to reflect the correct license (#2471) 2019-07-04 10:58:02 +00:00
Ajeet D'Souza
666fd1bbc7 improve code for release channel detection (#2456) 2019-07-04 09:47:17 +00:00
Alexis King
a96adad786 Clarify a few steps involved in running the server test suite (#2467) 2019-07-04 11:43:16 +05:30
Alexis King
fb3794c31a Support Node v12.x and fix tests on macOS (#2455)
* Bump node-sass to version ^4.12.0

This avoids sass/node-sass#2632, which causes compilation failures on
Node v12.x.

* Do most of the work in /pg_dump in Haskell instead of shell

The shell version caused problems on non-Linux systems since it relied
on the non-POSIX -i option for sed, which works slightly differently on
BSD and macOS.
2019-07-03 14:07:13 +05:30
Ajeet D'Souza
b184ce0188 add server version to console html (close #2444) (#2452) 2019-07-02 12:44:29 +00:00
Anon Ray
f31c3b2887 freeze requirements.txt for server tests (#2450) 2019-07-01 13:34:48 +00:00
Rakesh Emmadi
4f9d5952b9 add a make rule to build server docker image locally (#2410) 2019-06-27 11:58:26 +05:30
Ajeet D'Souza
08df38aa8c add name of ci environment to telemetry data (#2382) 2019-06-26 11:53:40 +05:30
Rakesh Emmadi
dc84bb4e77 fix renaming of columns used in insert permission (fix #2398) (#2414) 2019-06-21 16:34:21 +05:30
Shahidh K Muhammed
a8dd3b3deb add api to get server config details (close #1831); add jwt-analyzer (close #1369) (#1925) 2019-06-11 18:59:03 +05:30
Rakesh Emmadi
c3c01beccc support null and default values for function arguments (close #2176, close #2250) (#2282) 2019-06-04 18:13:28 +05:30
Anon Ray
278f26b073 forward set-cookie headers from remote servers (fix #1654) (#2305) 2019-06-04 15:40:28 +05:30
Rakesh Emmadi
31cf7314e2 better change detection when altering foreign key constraints (fix #2060) (#2252)
foreign keys are considered to be dropped only if constraint oid changes
2019-06-03 15:51:55 +05:30
Anon Ray
95a27fba89 fix response for remote schema queries over ws (fix #2246) (#2248) 2019-05-29 17:21:09 +05:30
Rikin Kachhia
7ab9d5eaeb update console favicons to png (#2287) 2019-05-29 10:03:29 +05:30
Rakesh Emmadi
4aabbd5a28 fix and improve help description for stripes and connections (#2278) 2019-05-27 13:46:53 +05:30
Vamshi Surabhi
6aa1216a59
link server with -rtsopts (#2233)
This allows customisation of Haskell's runtime system's parameters.
2019-05-21 14:58:08 +05:30
Rakesh Emmadi
70f4db19ad allow creating multiple relationships which includes the same column (fix #2228) (#2232) 2019-05-21 10:30:33 +05:30
Josha Inglis
277be9074e fix transaction isolation settings on server (#2211) 2019-05-20 19:48:17 +05:30
Rakesh Emmadi
2e19cbee8d keep allowed queries in sync when collections are changed, fix #2221 (#2230) 2019-05-20 15:59:32 +05:30
Rakesh Emmadi
94a8a50410 set allowlist table as system defined on catalog migration, fix #2225 (#2226) 2019-05-20 10:27:32 +05:30
Shahidh K Muhammed
7c89e951f2 serve console assets without any authorization checks (#2201) 2019-05-16 16:58:50 +05:30
Anon Ray
81bdfafd69 ignore content-type header in auth webhook (#2197) 2019-05-16 14:41:15 +05:30
Rishichandra Wawhal
3ef1219fa0 change default endpoint to v1/graphql; remove semver checks (#2181) 2019-05-16 14:38:44 +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
Rakesh Emmadi
0b210cc245 support allow-list for graphql queries (closes #989) (#2075) 2019-05-16 11:43:25 +05:30
Anon Ray
935eaf2211 booleans from env are case insensitve (fix #2177) (#2182) 2019-05-14 16:52:05 +05:30
Anon Ray
7d03e7af2f fix non-200 response for authorization errors on /v1/graphql (#2173) 2019-05-14 16:50:55 +05:30
Rakesh Emmadi
c6f40df6d5 close websocket connection on JWT expiry (fix #578) (#2156) 2019-05-14 11:54:46 +05:30
Anon Ray
ee783e142e fix sending duplicate content-type header to remote schemas (fix #2159) (#2170) 2019-05-13 18:17:01 +05:30
Tirumarai Selvan
36e49ea75b manual event triggers (close #1687) (#2077) 2019-05-13 15:11:07 +05:30