Commit Graph

1534 Commits

Author SHA1 Message Date
Marion Schleifer
ab54e47335
docs: add note on pg versions for actions (#4034) 2020-03-09 14:27:29 +05:30
Rishichandra Wawhal
52d3979f92
console: update actions intro image (#4042) 2020-03-06 16:54:17 +05:30
Rishichandra Wawhal
e64bb8956f
console: hide starter kit button if a framework has no starter kit (#4023) 2020-03-06 13:25:21 +05:30
Praveen Durairaju
55ea3ea4a7
docs: avoid redirect, update title tag suffix (#4030) 2020-03-06 12:47:20 +05:30
Vamshi Surabhi
c52bfc540d
More robust forking, exception safety. Closes #3768 (#3860)
This is the result of a general audit of how we fork threads, with a
detour into how we're using mutable state especially in websocket
codepaths, making more robust to async exceptions and exceptions
resulting from bugs.

Some highlights:
- use a wrapper around 'immortal' so threads that die due to bugs are
  restarted, and log the error
- use 'withAsync' some places
- use bracket a few places where we might break invariants
- log some codepaths that represent bugs
- export UnstructuredLog for ad hoc logging (the alternative is we
  continue not logging useful stuff)

I had to timebox this. There are a few TODOs I didn't want to address.
And we'll wait until this is merged to attempt #3705 for
Control.Concurrent.Extended
2020-03-05 23:29:26 +05:30
Shahidh K Muhammed
4015e512db
tag release v1.2.0-beta.2 (#4028) 2020-03-05 22:49:17 +05:30
Rikin Kachhia
8bbdbb037b
docs: correct version info for config v2 section (close #4019) (#4026) 2020-03-05 15:58:35 +05:30
Rikin Kachhia
901c33079b
console: add TypeScript setup (#3902) 2020-03-05 15:01:32 +05:30
Shahidh K Muhammed
d7d53f222c
cli: add version flag in update-cli command (#3996)
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-03-05 12:25:33 +05:30
Shahidh K Muhammed
cb75660b3e
cli(migrations-img): add env to skip update prompts (fix #3964) (#3968) 2020-03-05 11:31:22 +05:30
Vamshi Surabhi
8a648e77f3
Don't update catalog version if using --dryRun (#3970) 2020-03-05 11:12:38 +05:30
Aravind Shankar
45bcb6b536
cli, server: use prerelease tag as channel for console assets cdn (#3975)
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-03-04 20:10:47 +05:30
Praveen Durairaju
2c13ba5a28
docs: fix broken link (#4005) 2020-03-03 23:18:45 +05:30
Rikin Kachhia
80a239c735
docs: update connecting actions page title (#4008) 2020-03-03 17:44:28 +05:30
Rikin Kachhia
08bc778bf1
update actions docs (#4007) 2020-03-03 17:32:40 +05:30
Shahidh K Muhammed
cba773fdc7
fix syntax error in codeowners file (#4006) 2020-03-03 14:28:16 +05:30
Aravind Shankar
e3b843ce81
cli: fix flags in actions, migrate and metadata cmd (fix #3982) (#3991) 2020-03-03 12:36:59 +05:30
Aravind Shankar
28941b4eef
cli(actions): preserve action definition in metadata apply (fix… (#3993) 2020-03-03 12:36:07 +05:30
Shahidh K Muhammed
b87063dc05
build: rename file to adhere to windows rules (close #4002) (#4003) 2020-03-03 12:33:21 +05:30
Berat Bozkurt
88d039bab1
translations(readme): add turkish (#3921)
Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: sezgi <sezgi.ulucam@gmail.com>
2020-03-03 09:43:02 +05:30
Sean Grove
90f46c0e23
docs: add AuthGuardian JWT guide (#3958) 2020-03-02 18:19:56 +05:30
Praveen Durairaju
5387ba0c44
revert auth heading changes in docs (#3992) 2020-03-02 16:54:19 +05:30
Shahidh K Muhammed
da54244115
add changelog file to the repo and update pr template (#3946)
* add changelog file to the repo and update pr template

* update codeowner for changelog file

* Update PULL_REQUEST_TEMPLATE.md

* Update CHANGELOG.md

Co-authored-by: Tirumarai Selvan <tirumarai.selvan@gmail.com>
2020-03-02 16:09:56 +05:30
Praveen Durairaju
f01c19d580
fix docs 404 (#3979) 2020-02-28 12:47:50 +05:30
Shahidh K Muhammed
da5e4498d3
tag release v1.2.0-beta.1 (#3966) 2020-02-27 16:55:12 +05:30
Praveen Durairaju
865b150c82
noop: replace subdomain links with subpath (#3869)
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
2020-02-27 15:43:07 +05:30
Luis Fernando
85dae9be9f
docs: add reference to QualifiedTable to table args (#3880) 2020-02-27 15:32:46 +05:30
Rikin Kachhia
87706158b1
update actions docs (#3953) 2020-02-25 21:00:00 +05:30
Aravind Shankar
21e6dd7759
cli: bug fixes related to actions (#3951) 2020-02-25 20:28:28 +05:30
Rikin Kachhia
bea1de28f3
update docs (#3947)
* update catalogue downgrade docs
* update CLI doownload link for actions
2020-02-25 14:59:14 +05:30
Shahidh K Muhammed
8844459fb8
fix regression on tag release script (#3944) 2020-02-25 12:29:55 +05:30
Aravind Shankar
89b6ce86ca
cli: misc fixes related to actions (#3942) 2020-02-25 12:16:11 +05:30
Vamshi Surabhi
7b045f1a24
rfc: check condition in update permissions (#3750) 2020-02-25 11:46:24 +05:30
Rikin Kachhia
048c1de414
docs: add actions docs (#3907) 2020-02-24 21:49:14 +05:30
Aravind Shankar
bb63d7e60e
cli: allow managing actions (#3859)
Co-authored-by: Rishichandra Wawhal <rishichandra.wawhal@gmail.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Aravind <aravindkp@outlook.in>
Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com>
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-24 21:44:46 +05:30
Phil Freeman
8df0151f99
Maintain downgrade commands in a text file, update when tagging (#3933) 2020-02-24 20:03:56 +05:30
Rikin Kachhia
2921a56808
fix new release notification logic (#3930) 2020-02-24 16:14:57 +05:30
Phil Freeman
e72bd922dc
Update Init.hs for newer tags (#3931) 2020-02-24 12:45:24 +05:30
Noon van der Silk
4ebfaf2ffd
adds postgres password to docker-compose setup (fix #3894) (#3895)
* adds postgres password to docker-compose setup

* fix confusion with pg password

* add pw to other docker-compose files

* add password to db url

* setting postgis image version

Co-authored-by: Marion Schleifer <marion@hasura.io>
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-19 19:22:40 +05:30
Shahidh K Muhammed
88afa2ef70
update manifests to v1.1.0 (#3913) 2020-02-19 19:21:40 +05:30
Rikin Kachhia
0805719523
docs: remove wip actions docs (#3909)
* revert actions docs
2020-02-19 17:49:35 +05:30
Rikin Kachhia
b0d180efa2
docs: use install manifests from stable branch (#3906)
* update docs install manifests to use stable branch

* change the link to master at some more places

Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-19 17:13:08 +05:30
Rishichandra Wawhal
6b8c7eff67
console: add actions support (#3889) 2020-02-19 15:29:20 +05:30
Rikin Kachhia
ff3ac78d8f
console: show pre-release update notifications with opt out option (#3888) 2020-02-18 15:05:06 +05:30
InHoeKu
03e1e75705
translation(readme): add korean (#3818) 2020-02-18 14:02:23 +05:30
Vamshi Surabhi
b84db36ebb
allow custom mutations through actions (#3042)
* basic doc for actions

* custom_types, sync and async actions

* switch to graphql-parser-hs on github

* update docs

* metadata import/export

* webhook calls are now supported

* relationships in sync actions

* initialise.sql is now in sync with the migration file

* fix metadata tests

* allow specifying arguments of actions

* fix blacklist check on check_build_worthiness job

* track custom_types and actions related tables

* handlers are now triggered on async actions

* default to pgjson unless a field is involved in relationships, for generating definition list

* use 'true' for action filter for non admin role

* fix create_action_permission sql query

* drop permissions when dropping an action

* add a hdb_role view (and relationships) to fetch all roles in the system

* rename 'webhook' key in action definition to 'handler'

* allow templating actions wehook URLs with env vars

* add 'update_action' /v1/query type

* allow forwarding client headers by setting `forward_client_headers` in action definition

* add 'headers' configuration in action definition

* handle webhook error response based on status codes

* support array relationships for custom types

* implement single row mutation, see https://github.com/hasura/graphql-engine/issues/3731

* single row mutation: rename 'pk_columns' -> 'columns' and no-op refactor

* use top level primary key inputs for delete_by_pk & account select permissions for single row mutations

* use only REST semantics to resolve the webhook response

* use 'pk_columns' instead of 'columns' for update_by_pk input

* add python basic tests for single row mutations

* add action context (name) in webhook payload

* Async action response is accessible for non admin roles only if
  the request session vars equals to action's

* clean nulls, empty arrays for actions, custom types in export metadata

* async action mutation returns only the UUID of the action

* unit tests for URL template parser

* Basic sync actions python tests

* fix output in async query & add async tests

* add admin secret header in async actions python test

* document async action architecture in Resolve/Action.hs file

* support actions returning array of objects

* tests for list type response actions

* update docs with actions and custom types metadata API reference

* update actions python tests as per #f8e1330

Co-authored-by: Tirumarai Selvan <tirumarai.selvan@gmail.com>
Co-authored-by: Aravind Shankar <face11301@gmail.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
2020-02-13 23:08:23 +05:30
Tirumarai Selvan
f8e133070b
run default tests in test_server_upgrade (#3718)
* run basic tests after upgrade

* terminate before specifying file in pytest cmd

* Move fixture definitions out of test classes

Previously we had abstract classes with the fixtures defined
in them. The test classes then inherits these super classes. This
is creating inheritence problems, especially when you want to just
inherit the tests in class, but not the fixtures. We have now moved
all those fixture definitions outside of the class (in conftest.py).
These fixtures are now used by the test classes when and where they
are required.

* Run pytests on server upgrade

Server upgrade tests are run by
  1) Run pytest with schema/metadata setup but do not do schema/metadata
teardown
  2) Upgrade the server
  3) Run pytest using the above schema and teardown at the end of the
tests
  4) Cleanup hasura metadata and start again with next set of tests

We have added options --skip-schema-setup and --skip-schema-teardown to
help running server upgrade tests.

While running the tests, we noticed that error codes and messages for
some of the tests have changed. So we have added another option to
pytest `--avoid-error-message-checks`. If this flag is set, and if
comparing expected and response message fails, and if the expected
response has an error message, Pytest will throw warnings instead of an
error.

* Use marks to specify server-upgrade tests

Not all tests can be run as serve upgrade tests, particularly those
which themselves change the schema. We introduce two pytest markers.
Marker allow_server_upgrade_test will add the test into the list of
server  upgrade  tests  that  can  be run. skip_server_upgrade_test
removes it from the list.

With this we have added tests for queries, mutations, and selected
event trigger and remote schema tests to the list of server upgrade
tests.

* Remove components not needed anymore

* Install curl

* Fix error in query validation

* Fix error in test_v1_queries.py

* install procps for server upgrade tests

* Use postgres image which has postgis installed

* set pager off with psql

* quote the bash variable WORKTREE_DIR

Co-authored-by: nizar-m <19857260+nizar-m@users.noreply.github.com>
Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
2020-02-13 14:44:02 +05:30
Phil Freeman
f615abd2f2
Add check expresion to update permissions (close #384) (#3804)
* Add check expresion to update permissions (close #384)

* wip on conflict behavior

* Handle upserts for views properly

* Use insert check if there is no update check

* Fix the test

* Improve error message slightly

Co-authored-by: Vamshi Surabhi <0x777@users.noreply.github.com>
2020-02-13 13:08:49 +05:30
Karthikeyan Chinnakonda
441c0a2452
cli: update installation instructions in the readme (fix #3875) (#3876)
Co-authored-by: Shahidh K Muhammed <muhammedshahid.k@gmail.com>
2020-02-13 12:54:36 +05:30
Rikin Kachhia
4b78884d36
handle invalid keys in permission builder (close #3848) (#3863)
* handle non-existent column names
* handle invalid _exist operator expression keys
* handle non-array values for _and/_or operators
2020-02-12 14:45:26 +05:30