Commit Graph

2456 Commits

Author SHA1 Message Date
hasura-bot
05ccbff1ec Uses fallback migration logic for shadowing PRs
Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6378
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6378

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GitOrigin-RevId: 1db14333fa4f81ea7845846e9f20f6a89b3805d0
2020-12-22 02:48:58 +00:00
Vishnu Bharathi
08cf11ddce Improvements for kodiak commit message
* formats kodiak commit message in PR description

* include co-author information while merging

GitOrigin-RevId: 339be665391326a9c33f76f187dcaa242df5f8a1
2020-12-22 01:58:06 +00:00
Vishnu Bharathi
d552f12707 updates kodiak bot settings
* init kodiak bot configuration

* adds kodiak commit message to PR body

GitOrigin-RevId: 58b0033be2ac9c0c757319a1a5f735e53f08307b
2020-12-21 23:49:14 +00:00
Phil Freeman
2dfbf99b41 server: simplify shutdown logic, improve resource management (#218) (#195)
* Remove unused ExitCode constructors

* Simplify shutdown logic

* Update server/src-lib/Hasura/App.hs

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* WIP: fix zombie thread issue

* Use forkCodensity for the schema sync thread

* Use forkCodensity for the oauthTokenUpdateWorker

* Use forkCodensity for the schema update processor thread

* Add deprecation notice

* Logger threads use Codensity

* Add the MonadFix instance for Codensity to get log-sender thread logs

* Move outIdleGC out to the top level, WIP

* Update forkImmortal fuction for more logging info

* add back the idle GC to Pro

* setupAuth

* use ImmortalThreadLog

* Fix tests

* Add another finally block

* loud warnings

* Change log level

* hlint

* Finalize the logger in the correct place

* Add ManagedT

* Update server/src-lib/Hasura/Server/Auth.hs

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* Comments etc.

Co-authored-by: Brandon Simmons <brandon@hasura.io>
Co-authored-by: Naveen Naidu <naveennaidu479@gmail.com>
GitOrigin-RevId: 156065c5c3ace0e13d1997daef6921cc2e9f641c
2020-12-21 18:56:57 +00:00
Auke Booij
792de5ba7c server: remove bad hlint hint (#232)
GitOrigin-RevId: 14170853e6a273a0bf1f26eba3f61ad6ce5d1918
2020-12-21 13:30:16 +00:00
Karthikeyan Chinnakonda
39a4352569 Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions
server: remote schema permissions
GitOrigin-RevId: 63b9717e30351676c9474bdfddd3ad1ee1409eea
2020-12-21 09:12:35 +00:00
Tirumarai Selvan
b544b87b9b Merge pull request #223 from hasura/jberryman/5863-prep-refactoring
GitOrigin-RevId: 71b1453edf4b93ffc16a15ea3c6057bb865b6606
2020-12-20 06:53:38 +00:00
Auke Booij
84f2991c3d server: schema cache generation generalization (#213)
Generalize TableCoreInfoRM, TableCoreCacheRT, some table metadata data types, generalize fromPGCol to fromCol, generalize some schema cache functions, prepare some enum schema cache code for generalization

GitOrigin-RevId: a65112bc1688e00fd707d27af087cb2585961da2
2020-12-17 11:38:15 +00:00
Jigyasu Arya
cdc140cfd4 docs: update cloud-docs screenshots as per the new layout for env vars, collaborators and domain section (#117)
GitOrigin-RevId: 1c91a3e3c8d89dcb0554797bcb6b3ba67ebad015
2020-12-17 08:15:35 +00:00
Aleksandra Sikora
3b140b63ec console: fix save action permissions request (#214)
GitOrigin-RevId: 083f749c7e36a3f3b5fba623f17c35b047d53308
2020-12-16 12:36:38 +00:00
Rakesh Emmadi
a153e96309 server: expand metadata storage class with async actions and core metadata operations (#184)
An incremental PR towards https://github.com/hasura/graphql-engine/pull/5797
- Expands `MonadMetadataStorage` with operations related to async actions and setting/updating metadata

GitOrigin-RevId: 53386b7b2d007e162050b826d0708897f0b4c8f6
2020-12-14 04:31:20 +00:00
Aleksandra Sikora
479fc6efb0 console: add update version banner (#192)
GitOrigin-RevId: d4c03707341489accc3450ffa5b4404a146f108f
2020-12-11 12:02:53 +00:00
Antoine Leblanc
390585e6a2 Generalize Delete schema. (#193)
GitOrigin-RevId: ba01d7b5d1fa7c343daea7049b07e4cd25ed4a65
2020-12-10 16:59:43 +00:00
Rakesh Emmadi
a2cf9a53c2 server: move to storing metadata as a json blob (#115)
GitOrigin-RevId: 3d1a7618a4ec086c2d255549a6c15087201e9ab0
2020-12-08 14:23:28 +00:00
Auke Booij
5edca3a5c2 server: add tshow :: Show a => a -> Text, including hlint hint (#142)
GitOrigin-RevId: 627a55533831b51aa0d01f8a8d95e3d013744dc5
2020-12-08 12:38:31 +00:00
hasura-bot
f5e56e8981 console: automatically wrap default column values in quotes (close #418) (#162)
Co-authored-by: Varun Choudhary <varun@hasura.io>
Co-authored-by: Sameer Kolhar <sameer@hasura.io>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
GITHUB_PR_NUMBER: 5805
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5805

Co-authored-by: Varun Choudhary <varun@hasura.io>
Co-authored-by: Sameer Kolhar <sameer@hasura.io>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
GitOrigin-RevId: 8c80998ed9fd803465b3ce2ded7de39acdbd545b
2020-12-08 09:30:38 +00:00
hasura-bot
e27535e9b9 console: fix cron trigger path when containing "/" (close #5935) (#161)
Co-authored-by: kentaro84207 <kentaro84207@gmail.com>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
GITHUB_PR_NUMBER: 5953
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5953

Co-authored-by: kentaro84207 <kentaro84207@gmail.com>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
GitOrigin-RevId: 995492c13d8e5ab56c1bd003333c39ea716cd60d
2020-12-07 14:10:24 +00:00
hasura-bot
920c6ea427 ci: add hlint escape hatch (#71)
* ci: add hlint escape hatch

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6164
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6164

* Applied changes to new workflow files.

* Add missing label trigger for lint worklow

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: 3e22c301a9412f7f77978b35f29c38c7876ac13f
2020-12-07 12:10:38 +00:00
Vishnu Bharathi
4f76b9fee2 Fixes circleci error caused on force push to branches
* adds fallback for invalid CIRCLE_COMPARE_URL

* ci: separates ciignore script for mono and oss repos

GitOrigin-RevId: c473c289b8ad6695c589942c27c2369a5d0cd4c7
2020-12-07 07:45:24 +00:00
Auke Booij
9fb80d1230 server: remove some unused top-level definitions; some minor code cleanups (#141)
GitOrigin-RevId: 92002684c5d89791a05975e4b137d93599491ffa
2020-12-04 19:33:10 +00:00
Auke Booij
be7f34891c server: give stack traces when encountering conflicting type definitions (#150)
Since PDV, introspection queries are parsed by a certain kind of reflection where during the GraphQL schema generation, we collect all GraphQL types used during schema generation to generate answers to introspection queries. This has a great advantage, namely that we don't need to keep track of which types are being used in our schema, as this information is extracted after the fact.

But what happens when we encounter two types with the same name in the GraphQL schema? Well, they better be the same, otherwise we likely made a programming error. So what do we do when we *do* encounter a conflict? So far, we've been throwing a rather generic error message, namely `found conflicting definitions for <typename> when collecting types from the schema`. It does not specify what the conflict is, or how it arose. In fact, I'm a little bit hesitant to output more information about what the conflict is, because we support many different kinds of GraphQL types, and these can have disagreements in many different ways. It'd be a bit tiring (not to mention error-prone) to spell this out explicitly for all types. And, in any case, at the moment our equality checks for types is incorrect anyway, as we are avoiding implementing a certain recursive equality checking algorithm.

As it turns out, type conflicts arise not just due to programming errors, but also arise naturally under certain configurations. @codingkarthik encountered an interesting case recently where adding a specific remote and a single unrelated database table would result in a conflict in our Relay schema. It was not readily visible how this conflict arose: this took significant engineering effort.

This adds stack traces to type collection, so that we can inform the user where the type conflict is taking place. The origin of the above conflict can easily be spotted using this PR. Here's a sample error message:

```
Found conflicting definitions for "PageInfo". The definition at "mutation_root.UpdateUser.favourites.anime.edges.node.characters.pageInfo" differs from the the definition at "query_root.test_connection.pageInfo"
```

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: d4c01c243022d8570b3c057b168a61c3033244ff
2020-12-04 15:37:55 +00:00
Aleksandra Sikora
237ac68047 console: allow URLs with templated environment variable for data events (close #6239) (#154)
GitOrigin-RevId: f851af1736280becafff5efcc48867926cadec01
2020-12-04 13:02:19 +00:00
hasura-bot
3451413d1a server: do not block catalog migration on inconsistent metadata (#139)
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GITHUB_PR_NUMBER: 6286
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6286

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
Co-authored-by: Tirumarai Selvan <tiru@hasura.io>
GitOrigin-RevId: 27bbfc960da87e4ad54bad5943782f28aa113874
2020-12-04 08:39:05 +00:00
hasura-bot
115f2cb621 server: don't memoize backend scalar type reps through WithScalarType (#136)
Co-authored-by: Auke Booij <auke@hasura.io>
GITHUB_PR_NUMBER: 6281
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6281
GitOrigin-RevId: b7ab3352af21175f0065f1bc2304a1232f6a5580
2020-12-03 12:22:24 +00:00
Phil Freeman
20913c254d server: allocation limits (#82)
* server: allocation limits

* Move most of the allocation limits work into Pro

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* code review changes

* fix build

Co-authored-by: Brandon Simmons <brandon@hasura.io>
GitOrigin-RevId: 035f15def48f4a0376cb2701eff9982c43a78e2d
2020-12-03 04:07:22 +00:00
Antoine Leblanc
3537e2acdc server: fix primary key mutations issue (closes #6255) (#129)
* Add update_by_pk test with more interesting permissions.

* Add new delete test with more interesting permissions.

* Fix byPk operations not providing all columns.

* Empty commit to unlock ci.

GitOrigin-RevId: eb1ca2cc4c59f421bc5fedf49bef91aa4bbdca94
2020-12-02 14:13:00 +00:00
Swann Moreau
e873c4e650 server: add metric for warp threads (#88)
* server: add ekg gauge to count number of warp threads currently alive

* Apply suggestions from code review

* Fix a weird impredicativity bug

* changelog

* Update server/src-lib/Hasura/App.hs

Co-authored-by: Brandon Simmons <brandon@hasura.io>

* Add hlint pragma :|

Co-authored-by: Phil Freeman <phil@hasura.io>
Co-authored-by: Phil Freeman <paf31@cantab.net>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GitOrigin-RevId: 02e5d85cd8bdf7b1ebbe3395c61d8cac3abc135f
2020-12-02 06:16:58 +00:00
Phil Freeman
1843643c74 Disallow caching for remote joins with forwarded headers (master) (#58)
GitOrigin-RevId: 76eb061534fd2a068965b8b22517a0729d9e3020
2020-12-01 23:24:24 +00:00
Brandon Simmons
bcf251a469 Add missing PROFILING CPP pragma
GitOrigin-RevId: b50acc16cd7194e5a778a34592d44cf21c969d52
2020-12-01 16:05:10 +00:00
Brandon Simmons
d4d5c53468 dev.sh: additional postgres container logging, to support pgBadger
GitOrigin-RevId: dabd4099269121d4c1cb967017861e94201727c8
2020-12-01 16:04:58 +00:00
Auke Booij
3c3ed55914 server: schema that grows (#105)
This PR makes a bunch of schema generation code in Hasura.GraphQL.Schema backend-agnostic, by moving the backend-specific parts into a new BackendSchema type class. This way, the schema generation code can be reused for other backends, simply by implementing new instances of the BackendSchema type class.

This work is now in a state where the schema generators are sufficiently generic to accept the implementation of a new backend. That means that we can start exposing MS SQL schema. Execution is not implemented yet, of course.
The branch currently does not support computed fields or Relay. This is, in a sense, intentional: computed field support is normally baked into the schema generation (through the fieldSelection schema generator), and so this branch shows a programming technique that allows us to expose certain GraphQL schema depending on backend support. We can write support for computed fields and Relay at a later stage.

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: df369fc3d189cbda1b931d31678e9450a6601314
2020-12-01 15:51:13 +00:00
hasura-bot
f6bd354b40 server: hasura on PG v13 (#125)
GitOrigin-RevId: 00fd91c250bcf3dc7ee638e3b152e0dab7281de7
2020-12-01 12:22:42 +00:00
Rishichandra Wawhal
3736a569ad docs: update cloud docs for new project creation change and regions (#24)
GitOrigin-RevId: 4ce5ada89c11828eb20a9e642d22365c8971adbd
2020-11-27 12:14:33 +00:00
hasura-bot
7b31ff99d1 Support Postgres POSIX regex operators (close #4317) (#119)
Co-authored-by: christophediprima <dipdipdip84@gmail.com>
Co-authored-by: dip <dipdipdip84@gmail.com>
Co-authored-by: Auke Booij <auke@hasura.io>
Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6172
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6172
GitOrigin-RevId: 5192d238b527cd21b6efb2f74e279ecc34756c29
2020-11-27 10:54:52 +00:00
Auke Booij
86aef93d31 server: remove a few unused Lift instances (#114)
GitOrigin-RevId: b5679e9579d226f7209b73ac966d29391c308c06
2020-11-26 13:58:07 +00:00
Auke Booij
350d6b3d43 server: make the UnpreparedValue less tightly bound to the backend (#108)
Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GitOrigin-RevId: 90cb7e1cc97961523085ae7ae3d195549b901b1f
2020-11-25 16:08:27 +00:00
hasura-bot
64743cb189 server: all remaining IR changes (#75)
Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6233
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6233

Co-authored-by: Antoine Leblanc <antoine@hasura.io>
Co-authored-by: Auke Booij <auke@hasura.io>
GitOrigin-RevId: 268cdad529ad5d9bebeb5b881fda5413ea9d7715
2020-11-25 14:19:50 +00:00
hasura-bot
29925eb08d server: metadata storage abstraction for scheduled triggers
An incremental PR towards https://github.com/hasura/graphql-engine/pull/5797

* metadata storage abstraction for scheduled triggers

Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Auke Booij <auke@hasura.io>
GITHUB_PR_NUMBER: 6131
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6131

* update pro server code

Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Auke Booij <auke@hasura.io>
GitOrigin-RevId: 17244a47b3e8633acf2492e0b0734b72025f0a09
2020-11-25 10:57:38 +00:00
Tirumarai Selvan A
6fe5daa702 fix migration to 1) account for long trigger names and 2) correct syntax for dropping function without arguments in pg < 10
GitOrigin-RevId: b5382db23dcf8c05a9936404b8ab303a336c8a44
2020-11-25 09:29:04 +00:00
Vishnu Bharathi P
06ab0e537b [skip ci] adds name for shadow pr github action
Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6250
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6250
GitOrigin-RevId: 3f7cc8dd834d81cf465d4b33feff49c8714aa18a
2020-11-25 05:15:57 +00:00
hasura-bot
d9821b85f2 [skip ci] adds a github action to shadow pull requests
* [skip ci] adds a github action to shadow pull requests

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GITHUB_PR_NUMBER: 6201
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6201

* uses setOutput instead of setting environment variable

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
GitOrigin-RevId: 6897541d2377e8442839ec869a4d21d9f74c5f08
2020-11-25 04:59:42 +00:00
Vishnu Bharathi
db88fff890 enables OSS CI tests for monorepo
* init oss ci tests in monorepo

* uses circle env to set base branch

* change ref name to filter_only_vtags

* install from local artifact

* updates comment in ciignore script

* adds oss_all_server_tests_pass job

Co-authored-by: scriptonist <aravindkp@hasura.io>
GitOrigin-RevId: 681b73c7c8331950d84fdd86111ab4297bb60725
2020-11-24 17:01:04 +00:00
hasura-bot
862f160ee6 console: select first operator by default on the browse rows screen (close #5729) (#93)
Co-authored-by: Dmitrii Grachikov <dgrachikov@gmail.com>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
GITHUB_PR_NUMBER: 6032
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6032

Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
Co-authored-by: Dmitrii Grachikov <dgrachikov@gmail.com>
GitOrigin-RevId: 44c2f5f082e3bd854a72abf56ca665bc1b213160
2020-11-24 16:17:57 +00:00
hasura-bot
5ca8cd23a0 server: support remote relationship with ID scalar types (#92)
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GITHUB_PR_NUMBER: 6227
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6227

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GitOrigin-RevId: 666ec37d570e46482e0f27db2c97c9e3f9c1f4d3
2020-11-24 12:20:22 +00:00
Kali Vara Purushotham Santhati
2acad94fb1 cli: misc fixes
GitOrigin-RevId: 9aa0d4b162dc41869bbc5d77cdba727e9f3becb9
2020-11-24 06:12:24 +00:00
hasura-bot
d955001046 server: schema cache syncing without relying on a Postgres table (#40)
An incremental PR towards # 5797 (OSS repo)

* schema cache syncing without relying on a Postgres table

Co-authored-by: rakeshkky <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GITHUB_PR_NUMBER: 6173
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6173

* fix pro compile issues

Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
GitOrigin-RevId: 055b06ae477af80892124ff55d005d04a8034c34
2020-11-24 06:11:07 +00:00
Vishnu Bharathi
e8429a975d docs: add cloud docs for DataDog exporter (#48)
GitOrigin-RevId: 3f69047f1cdb802f03a94fca908f2ac49df216d9
2020-11-23 15:29:44 +00:00
hasura-bot
d1ef6e66c9 server: add missing remote schema webhook env var in server-upgrade script (#63)
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GITHUB_PR_NUMBER: 6221
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6221

Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GitOrigin-RevId: cbff9c7cf037ac45f30af6e9d215d46fac662758
2020-11-23 05:27:24 +00:00
hasura-bot
2f7f2eb32d cli: force update local plugin index (close #6219) (#70)
Co-authored-by: scriptonist <aravindkp@hasura.io>
GITHUB_PR_NUMBER: 6231
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6231

Co-authored-by: scriptonist <aravindkp@hasura.io>
GitOrigin-RevId: c34d88b64fe8ad34ae23692a6513f1e7ca7c571a
2020-11-20 07:59:58 +00:00
hasura-bot
fb902d4209 Support tracking SQL functions as mutations. Closes #1514 (#34)
* Support tracking SQL functions as mutations. Closes #1514

Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GITHUB_PR_NUMBER: 6160
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6160

* Update docs/graphql/core/api-reference/schema-metadata-api/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Brandon Simmons <brandon@hasura.io>
Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Marion Schleifer <marion@hasura.io>
GitOrigin-RevId: 8fd39258641ecace6e3e9930e497b1655ad35080
2020-11-18 18:05:59 +00:00