Commit Graph

1473 Commits

Author SHA1 Message Date
Philippe MARTIN
70e1b771e0
accept query params for filter/sort in browse table page (close #833) (#3041) 2020-02-05 16:00:47 +05:30
Rikin Kachhia
87e97dfda7
update console codeowner (#3832)
[skip ci]
2020-02-05 15:19:10 +05:30
Anon Ray
c6e34baad8
fix parsing JWK expiry time from headers on startup (fix #3655) (#3779) 2020-02-05 12:37:30 +05:30
Rikin Kachhia
916ccc2e2f
console: permission builder fixes (#3823)
* allow manually editing permissions (#1734)
* separate operators for json and jsonb column types
* allow null as valid JSON type
2020-02-05 00:33:06 +05:30
Rakesh Emmadi
53b9cabd88
fix few bugs related to nested insert returning (fix #3609, #3642, #3271) (#3618)
* fix nested insert with returning computed fields gives error, fix #3609

* revert using ordered hashmaps, sort columns based on ordinal postion

* fix 1. keys order 2. json/jsonb column value in nested insert returning

* add a note for sorted columns

* cast 'VALUES' expression as table row type

* use single CTE expression for generating returning for nested inserts
2020-02-04 21:04:17 +05:30
Alexis King
c90c75f0b1
Merge pull request #3622 from jberryman/3552-gather-usage-telemetry-for-cache
Add request timings and count histograms to telemetry. Closes #3552
2020-02-03 18:51:20 -06:00
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
f506cb397f Log time spent consuming request bytes from socket. Closes #3547
Add a new 'request_read_time' to the logging record.

We also use 'withElapsedTime' to get proper monotonic clock for
'query_execution_time' as well.
2020-02-03 18:50:10 -06:00
Brandon Simmons
58ef316118 Add request timings and count histograms to telemetry. Closes #3552
We upload a set of accumulating timers and counters to track service
time for different types of operations, across several dimensions (e.g.
did we hit the plan cache, was a remote involved, etc.)

Also...

Standardize on DiffTime as a standard duration type, and try to use it
consistently.

See discussion here:
https://github.com/hasura/graphql-engine/pull/3584#pullrequestreview-340679369

It should be possible to overwrite that module so the new threadDelay
sticks per the pattern in #3705 blocked on #3558

Rename the Control.Concurrent.Extended.threadDelay to `sleep` since a
naive use with a literal argument would be very bad!

We catch a bug in 'computeTimeDiff'.

Add convenient 'Read' instances to the time unit utility types. Make
'Second' a newtype to support this.
2020-02-03 18:50:10 -06:00
Vamshi Surabhi
21efd3aa1e
Test and dev script improvements
* Unit tests: pass through some useful flags to hspec (--match and --skip)

--match for instance is suggested on test failure, so this is convenient
to have.

* More comments in cabal.project files

* dev.sh: restore code coverage functionality

Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
2020-02-03 21:47:31 +05:30
Vamshi Surabhi
15072237e4
Merge branch 'master' into test-improvements-01-2020 2020-02-03 21:10:42 +05:30
Lyndon Maydwell
be6f966ce0
New ENV variable support for disabling CORS headers (close #3782) (#3785) 2020-02-03 16:43:03 +05:30
Isala Piyarisi
79f1603f13
console: handle create if not exists syntax for track table (close #3766) (#3816) 2020-02-03 15:45:06 +05:30
Aravind
c258fa75cb
cli: add --goto flag in hasura migrate apply (close #2689) (#3715)
* cli: add --goto <version> flag to migrate command

* cli: fix error encoutered in goto, when on version -1

* do down migrations one step down

* reorganize code

* in case of up "gotos" make sure that all previous migration in migration chain are applied

* modify readUp and readDown functions to account for --goto use case

* refactor to clean up and adopt a better implementation addressing the comments

* remove empty error handling step

* return ErrNoChange when no migrations were applied

* respect m.stop() can panic so place conditional cases after that and add a couple other small fixes

* fix bug caused by early checking of versions

* fix to add migration_mode and nil version check

* add some more examples for migrate apply command

Co-authored-by: Aravind Shankar <face11301@gmail.com>
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-03 12:33:32 +05:30
Marion Schleifer
2b977bb9b9
docs: document explain api (close #870) (#3739) 2020-02-03 12:04:44 +05:30
Rikin Kachhia
fca16b88ef
misc console fixes (close #3777, #3789) (#3813)
* handle string errors
* handle empty columns / computed fields in permissions (#3789)
* allow is_null for all operators (#3777)
2020-02-01 09:59:38 +05:30
Rishichandra Wawhal
405d6450f9
console: replace graphiql fork with pkg + update explorer + replace uglify with terser (#3073) 2020-01-31 17:24:19 +05:30
Shahidh K Muhammed
64485a0fd6
cli: fix version constraint for update check (close #3719) (#3730) 2020-01-30 14:41:03 +05:30
Praveen Durairaju
2791000475 update nuxtjs-postgres-graphql dependencies (close #3743) (#3765)
* update nuxt to 2.11

* fix issue 3743
2020-01-24 10:32:55 +05:30
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
5257c61f15 More comments in cabal.project files 2020-01-23 18:20:58 -05:00
Alexis King
5bd5a548fa
server: Parameterize the graphql-engine library over the version (#3668) 2020-01-22 15:55:55 -06:00
Karthikeyan Chinnakonda
b344e7f39c disable explain end-points when metadata API is disabled, fix #3717 (#3751) 2020-01-22 16:20:49 +05:30
Brandon Simmons
8716cf0e08 Unit tests: pass through some useful flags to hspec (--match and --skip)
--match for instance is suggested on test failure, so this is convenient
to have.
2020-01-21 13:12:27 -05:00
Rikin Kachhia
ce547dc341
console: misc bug fixes (#3733)
* handle undefined headers configuration for event triggers
* save SQL to localStorage after execution (to avoid it being lost in case page is closed without umounting)
* fix nested objects View bug in Browse rows in case nested objects are present in a separate * schema.
2020-01-21 17:13:36 +05:30
Rikin Kachhia
5702881d5c
docs: misc updates (#3700)
* added example for select_by_pk query
* improved notes on _or and _and behaviour
* improve distinct and order_by usage note
2020-01-20 17:17:49 +05:30
Aravind Shankar
c00a3d47ff circleci: update workflow id (#3745) 2020-01-20 15:34:00 +05:30
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
Aleksandra Sikora
edb17e8cbb use user friendly terms for filter operators in browse rows page (#3699) 2020-01-17 15:52:08 +05:30
Rikin Kachhia
9355436c43
handle uncategorized types in permission builder (close #3603) (#3712) 2020-01-17 14:32:17 +05:30
Shahidh K Muhammed
9c3e9ff4be
ci: push the latest assets only on stable releases (close #3714) (#3716)
[skip ci]
2020-01-16 11:35:35 +05:30
Phil Freeman
9ed8f717a7 remove hdb_views for inserts (#3598)
* WIP: Remove hdb_views for inserts

* Show failing row in check constraint error

* Revert "Show failing row in check constraint error"

This reverts commit dd2cac29d0.

* Use the better query plan

* Simplify things

* fix cli test

* Update downgrading.rst

* remove 1.1 asset for cli
2020-01-16 10:23:28 +05:30
Shahidh K Muhammed
f6a43fe3ba
fix various version-related issues with cli (close #3706) (#3709)
- do not quit on server-cli version mismatch, show warning
- fix a bug in update-cli command which prevets updates to pre-release
versions
- if a console template for a particular version is not found, use the
latest template
2020-01-16 09:23:18 +05:30
Marion Schleifer
265cf7f12e docs: add meta descriptions to pages (#3631) 2020-01-14 18:27:45 +05:30
Karthikeyan Chinnakonda
f20fc80cfc pretty print json metadata file during export from console (close #3690) (#3694) 2020-01-14 16:32:01 +05:30
Alexis King
feb4a05618
Add fast path for server internal metadata migrations (#3686) 2020-01-14 01:09:10 -06:00
Anon Ray
dca8559703 fix cache-control header parsing for JWK (fix #3655) (#3676)
write a proper parser according to the RFC
https://tools.ietf.org/html/rfc7234#section-5.2
2020-01-13 15:56:51 -06:00
Aravind
204f02fc62 cli: update go-binddata, fix realize (close #3588) (#3687)
* use a maintained version of go-binddata, fix error in `realize
start`

* run go mod tidy
2020-01-13 15:24:41 +05:30
Rikin Kachhia
15b6347bb6
update console readme (#3691) 2020-01-13 15:05:16 +05:30
Rikin Kachhia
db6b2aa378
add computed fields support on console (close #3203 #3565) (#3522) 2020-01-13 12:41:30 +05:30
Rakesh Emmadi
319606b5ff include scalars types returning by computed fields in generated schema (fix #3650) (#3651) 2020-01-10 22:05:07 -06:00
Tirumarai Selvan
66beb02f7b remove brotli from packaging and CI images (#3673)
* Revert "add brotli shared lib to packager image (#2924)"
This reverts commit 79414cb225.
* remove unneeded dockerfile
* remove brotli traces in ci images and compression test
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
2020-01-10 15:15:47 -06:00
Rishichandra Wawhal
02d13ba164 run sql queries refactor (close #3543) (#3662) 2020-01-10 10:32:44 +05:30
Ashish Rao
6a4d643c8d add bigint id to frequently used columns (close #3524) (#3669) 2020-01-10 10:29:23 +05:30
Marion Schleifer
bda02f8192 community: link to coc in contrib guide (#3628) 2020-01-09 17:17:03 +05:30
Alexis King
8053108903
Merge pull request #3394 from lexi-lambda/3354-faster-metadata-migrations
Support incremental builds of the schema cache (fix #3354)
2020-01-08 18:13:40 -06:00
Alexis King
e47a8c4b86 incremental metadata: Clean up a few lingering loose ends
- Move MonadBase/MonadBaseControl instances for TxE into pg-client-hs
- Set the -qn2 RTS option by default to limit the parallel GC to 2
  threads
- Remove eventlog instrumentation
- Don’t rebuild the schema cache again after running a query that needs
  it to be rebuilt, since we do that explicitly now.
- Remove some redundant checks, and relocate a couple others.
2020-01-08 17:19:03 -06:00
Alexis King
06df174e8a Add missing check in SetTableCustomFields; update various test cases 2020-01-08 16:45:54 -06:00
Alexis King
d9bb9f2bed Alter the type of hdb_catalog columns that reference SQL identifiers
As explained in the note included in the diff, this can lead to
dramatically better query plans, and it seems to be especially important
for versions of Postgres <12.
2020-01-08 16:45:54 -06:00
Alexis King
d86a3d9501 Use fine(er)-grained dependency tracking when building permissions
This changes TableCoreCacheT to internally record dependencies at a
per-table level. In practice, this dramatically improves the performance
of building permissions: it makes it far, far less likely for
permissions to be needlessly rebuilt because some unrelated table
changed.
2020-01-08 16:45:54 -06:00