Commit Graph

580 Commits

Author SHA1 Message Date
Vamshi Surabhi
5eb72e202b bigquery: pass the location when fetching a job's status
https://github.com/hasura/graphql-engine-mono/pull/1847

GitOrigin-RevId: ed6c5e0d3caae27f32b97d563873720df77b017a
2021-07-22 15:00:16 +00:00
hasura-bot
2814934cf7 console: add pagination on rawsql results page
GITHUB_PR_NUMBER: 5629
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5629

https://github.com/hasura/graphql-engine-mono/pull/1665

Co-authored-by: Sooraj <8408875+soorajshankar@users.noreply.github.com>
GitOrigin-RevId: 9bf8c6f9068fc04160e9e9ebce2600b30e523a90
2021-07-22 09:58:24 +00:00
Karthikeyan Chinnakonda
34ccca305d server: relax unique operation name constraint in a query collection
https://github.com/hasura/graphql-engine-mono/pull/1849

GitOrigin-RevId: 56c1737b69511c3f2c4480d22f84828f51d3b543
2021-07-21 12:05:50 +00:00
Lyndon Maydwell
4c4a599373 Committed choice in ReplaceMetadata parsing based on Version
https://github.com/hasura/graphql-engine-mono/pull/1830

GitOrigin-RevId: 1f308ff11c1671ba10a854f221c0912e61b6b114
2021-07-21 05:03:37 +00:00
Abhijeet Khangarot
fe1f50d0f1 console: add/remove database persist in metadata
https://github.com/hasura/graphql-engine-mono/pull/1721

GitOrigin-RevId: 15ce3b966db26a88357922e45af742474a8abe19
2021-07-20 12:40:03 +00:00
Tirumarai Selvan
83911544c8 tag release v2.0.3
https://github.com/hasura/graphql-engine-mono/pull/1823

GitOrigin-RevId: 0b8fb6f885c799661c50b56fdf51e2fb171a43b6
2021-07-19 14:25:04 +00:00
Aniket Deshpande
295f7f3736 bq: fix optional global_select_limit config
The following has been tested locally:
1. [x] Uses the default query limit when `global_select_limit` is not present in the `metadata` configuration
2. [x] Uses the provided number when present in the configuration (tested with `1`)
3. [x] Throws an error if the provided value is not a parseable non-negative number (because bigquery throws an error when limits are negative)

https://github.com/hasura/graphql-engine-mono/pull/1816

Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: e21157ce9ca8f8130b3b01e91ed048e79f376293
2021-07-19 11:40:17 +00:00
Abby Sassel
f33349d1a4 server: fix MySQL dependencies in Pro Dockerfile
Issue: `graphql-engine-pro: error while loading shared libraries: libmariadb.so.3: cannot open shared object file: No such file or directory` for the `v2.0.2-pro.1` image ([DockerHub](https://hub.docker.com/layers/hasuraci/graphql-engine-pro/v2.0.1-pro.1/images/sha256-f31213d4b8febfde3b1b49fcbb0fe736fdd09eb495464fcf36309280c3d05a83?context=explore))

Cause: missing MySQL deps in the Pro Dockerfile

Slack conversation: https://hasurahq.slack.com/archives/CTRL7L1PZ/p1626432181337100?thread_ts=1626091359.266500&cid=CTRL7L1PZ

https://github.com/hasura/graphql-engine-mono/pull/1811

GitOrigin-RevId: 2eed6e627c39fef256001718081991650e9ce0b4
2021-07-19 10:23:17 +00:00
Karthikeyan Chinnakonda
6bddaa7564 server: inherited roles improvements for select permissions only
https://github.com/hasura/graphql-engine-mono/pull/1539

GitOrigin-RevId: 7444973e9cc7e0598eeb1bd7951ad45dd37ec550
2021-07-16 21:19:58 +00:00
Sooraj
08847566d8 console: support global_select_limit for bigquery sources
https://github.com/hasura/graphql-engine-mono/pull/1812

GitOrigin-RevId: 55785579523fcd3500486139431c4d9b3c1ace19
2021-07-16 15:05:28 +00:00
Divi
4ed8ba8bb3 cli: fix inconsistent metadata object list rendering
closes https://github.com/hasura/graphql-engine/issues/7202

https://github.com/hasura/graphql-engine-mono/pull/1781

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: bcbdf74773aa8f653ebe62c5bf00bcbda1aa51ee
2021-07-16 05:26:47 +00:00
Tirumarai Selvan
241a116e8e tag release v2.0.2
GitOrigin-RevId: de0c1b7bcd59f6501379e1ebce8c2490cbb29a2d
2021-07-15 07:31:00 +00:00
Ikechukwu Eze
175b1a86ca console: fix issue with changing table's column name and graphQL field name simultaneously
This PR fixes the following errors when column name and graphql field name are modified:

    1. Metadata out-of-date error -> when graphql field name is removed (set to empty on the console UI)
    2. Inconsistent state error -> due to old column name used in modifying graphql field name

### Changelog
- [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR.

### Affected components
- [x] Console

### Related Issues
Closes [7221](https://github.com/hasura/graphql-engine/issues/7221)

### Solution and Design
1. Use exportMetadata function after column name rename has been completed, passing the function to rename graphql field name
2. Use new column name, instead of old column name when renaming graphql field name

### Steps to test and verify
1. Go to data tab
2. Create a table if none
3. click the table name by the side-menu and when it has loaded, click on the modify tab.
4. Then edit any column of the table:
     - Change column name and graphql field name, it should work successfully without an error
     - Change column name and remove graphql field name, it should work successfully without metadata out-of-date error

Does this PR add a new Metadata feature?
- [x] No

#### GraphQL
- [x] No new GraphQL schema is generated

#### Breaking changes
- [x] No Breaking changes

https://github.com/hasura/graphql-engine-mono/pull/1778

GitOrigin-RevId: edfd795fb804df71a4e07e0373ca0714ff45fda9
2021-07-14 09:46:37 +00:00
Vishnu Bharathi
8a6f3f7e9d cli: support ARM architecture
https://github.com/hasura/graphql-engine-mono/pull/1534

GitOrigin-RevId: 67723bb64e2505c665b04b5b0d691e5599843f87
2021-07-14 08:54:43 +00:00
Varun Choudhary
b1013e8d6c console: add reload all databases checkbox to the metadata settings page
Closes: https://github.com/hasura/graphql-engine/issues/7146

### Description

This PR adds a `reload all databases` check box along `with` the `reload metadata` check box to reload all databases (inconsistent databases also).

![Screenshot from 2021-07-07 16-51-49](https://user-images.githubusercontent.com/68095256/124750932-af31a000-df43-11eb-88d9-b6585214a188.png)

### Affected components

- [x] Console

### Steps to test and verify

Use this for your docker image: https://235669-308610159-gh.circle-artifacts.com/0/server/image.tar

1. Go to the metadata setting page
2. If `reload all databases` check box is checked: It reloads everything by sending * in the API
3. If `reloading all databases` check box is not checked: It reloads inconsistent DB and if no inconsistent then it passes an empty string

https://github.com/hasura/graphql-engine-mono/pull/1703

GitOrigin-RevId: 2b6f029a17d40a43f5bce3680d5681c97433d78c
2021-07-14 06:16:00 +00:00
Nicolas Beaussart
cdfb71c1da console: add a feature flag for schema sharing
https://github.com/hasura/graphql-engine-mono/pull/1786

GitOrigin-RevId: a35dfa98508a8ef1ea92fe8588e79fc6f8479a2d
2021-07-13 16:57:04 +00:00
Vamshi Surabhi
9ec40be58d bigquery: 'global_select_limit' is now optional and defaults to 1000
See https://github.com/hasura/graphql-engine-mono/pull/1774. This new branch had to be opened because of an issue with cli test failure if the branch name starts with a number.

https://github.com/hasura/graphql-engine-mono/pull/1784

Co-authored-by: Aniket Deshpande <922486+aniketd@users.noreply.github.com>
GitOrigin-RevId: 25d2d92f57c10d80bc54b47a3f895ab014b8e6fa
2021-07-13 15:50:12 +00:00
Anon Ray
d8fa32776b server: log query in http-log/ws-log only if query-log is enabled
https://github.com/hasura/graphql-engine-mono/pull/1771

GitOrigin-RevId: 1fb8246f6ebff7e114779f284ba36d510b504f29
2021-07-13 12:24:19 +00:00
Rakesh Emmadi
df1efdcd27 server/postgres: fix reload sources and remote schemas if they're inconsistent
https://github.com/hasura/graphql-engine-mono/pull/1709

GitOrigin-RevId: c0684380d0e86dd6f28d6c8a0aebeaa210319272
2021-07-13 07:57:21 +00:00
Rakesh Emmadi
a375f8c105 server/postgres: Support scalar computed fields in remote joins
https://github.com/hasura/graphql-engine-mono/pull/1692

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: fcef85910899859f7421cad554c022f8023965ea
2021-07-12 16:04:37 +00:00
Aniket Deshpande
66f09eeaab MSSQL nodes aggregates & inherited roles
https://github.com/hasura/graphql-engine-mono/pull/1293

Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 776402dbbaf3d8166a62b1aaaf6abc7e584b3eb2
2021-07-08 20:50:09 +00:00
Nicolas Beaussart
e3e078fa42 console: add schema sharing
https://github.com/hasura/graphql-engine-mono/pull/1512

Co-authored-by: Varun Choudhary <68095256+Varun-Choudhary@users.noreply.github.com>
GitOrigin-RevId: 71efbb2a5a577f765b83b1fd9ee9254a292d361d
2021-07-08 08:18:25 +00:00
Rakesh Emmadi
e567a096e6 server/postgres: support computed fields in query filters ('where' expression)
https://github.com/hasura/graphql-engine-mono/pull/1677

GitOrigin-RevId: 30175a442237f6ac4b112c652f448a635ad90dc6
2021-07-07 11:59:32 +00:00
Robert
ae6d624441 server: improve handling of HTTP client errors for remote schema calls
https://github.com/hasura/graphql-engine-mono/pull/1719

GitOrigin-RevId: 5ff671bcff5f0559b9821f8359ebee4129f4b664
2021-07-07 10:15:05 +00:00
Swann Moreau
f6e49500d5 server: log request type (batched/single) in http-log
https://github.com/hasura/graphql-engine-mono/pull/1488

GitOrigin-RevId: 092335d6eb95224b8ed81d853a71fca01379dd7d
2021-07-05 09:46:29 +00:00
Robert
5cc91aebc3 server: Log action and event names (close #1603)
- add name fields to log output in several spots:
  - action logs get the action name in detail.action_name
  - events (triggered and scheduled) get the trigger name in detail.event_name
  - one-off scheduled events don't have a trigger name; instead, they get the
    comment if it exists
- remove unused event creation timestamp from ExtraLogContext

https://github.com/hasura/graphql-engine-mono/pull/1712

GitOrigin-RevId: 28907340d4e2d9adc0c48cc5d3010eef1fa902e1
2021-07-05 07:48:39 +00:00
Anon Ray
f263af31a0 server: add query field to http-log and websocket-log
https://github.com/hasura/graphql-engine-mono/pull/1683

GitOrigin-RevId: 6f46e31bb14f135d528b20ae9513e393c06c3c8a
2021-07-02 13:05:57 +00:00
Chris Done
6dc555f9eb Bigquery/global limit
This resolves https://github.com/hasura/graphql-engine/issues/6947.

A new [`global_select_limit`](b0ab5deefe/server/tests-py/queries/graphql_query/bigquery/replace_metadata.yaml (L17)) field is supported in the BigQuery configuration.

To test global limits, we have two sources defined,  the normal one (limited to 1million) and one with a limit of 1.

https://github.com/hasura/graphql-engine-mono/pull/1592

GitOrigin-RevId: 6ebcc7c1a16bc26ec36e53ae3694d36b7ce5c6e1
2021-06-25 13:36:35 +00:00
kodiakhq[bot]
a11b4135fc Use exceptions to handle compatibility with pg 9.6 in 2.0 upgrade migration
https://github.com/hasura/graphql-engine-mono/pull/1651

Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Brandon Simmons <210815+jberryman@users.noreply.github.com>
GitOrigin-RevId: cdb4a33cbb1a136bc30e8f0dd59aaae584d3a636
2021-06-24 02:20:11 +00:00
Tirumarai Selvan
345cf8fe4c tag release v2.0.1
GitOrigin-RevId: f33aca9566de9cb6e2fe9fa7a94e7d64d06d3ef4
2021-06-23 18:10:07 +00:00
Rakesh Emmadi
13bedf5821 server/postgres: fix resetting the metadata catalog version to 43 while initializing postgres source with 1.0 catalog (#1645)
* fix resetting the catalog version to 43 on migration from 1.0 to 2.0

* ci: remove applying patch in test_oss_server_upgrade job

* make the 43 to 46th migrations idempotent

* Set missing HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE=8 in upgrade_test

It's not clear why this wasn't caught in CI.

* ci: disable one component of event backpressure test

Co-authored-by: Vishnu Bharathi P <vishnubharathi04@gmail.com>
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GitOrigin-RevId: c74c6425266a99165c6beecc3e4f7c34e6884d4d
2021-06-23 18:01:09 +00:00
Tirumarai Selvan
1f2470289f tag release v2.0.0
GitOrigin-RevId: ea05a42fdc33008ef177b3c459e1d148aa05f113
2021-06-23 08:35:05 +00:00
Abhijeet Khangarot
c0fde4d1d5 console: hide postgres system schemas by default
>

### Description
We want to hide postgres system schemas like `pg_toast` and `pg_temp` and their variations (ex. `pg_toast_temp_35`) from showing up in console.
>

### Changelog

- [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label.

### Affected components

- [x] Console

### Related Issues
->
https://github.com/hasura/graphql-engine/issues/6954

### Solution and Design
>
We can achieve this by updating the `schemaListSql` query for postgres datasources to filter out postgres system schemas.

### Steps to test and verify
>

1. Add a postgres datasource containing some system schemas
2. The system schemas should not show up in console

https://github.com/hasura/graphql-engine-mono/pull/1499

Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: 6a179b9d5cd4d061ae9fda17bf3824321cf7e96e
2021-06-22 15:24:20 +00:00
Kali Vara Purushotham Santhati
59679babfa cli: add server flag to migrate delete and modify the docs for resetting migrations
https://github.com/hasura/graphql-engine-mono/pull/1540

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 8aceb35c583d20b7dc7b16f257e20c83171008a2
2021-06-22 11:16:14 +00:00
Sameer Kolhar
608e4fbb20 server, console, docs: add update_remote_schema API
https://github.com/hasura/graphql-engine-mono/pull/1546

GitOrigin-RevId: 142b0d0e0ffc35b2679c91c411868c45a8b8e221
2021-06-21 17:42:40 +00:00
Kali Vara Purushotham Santhati
a924720a3a cli: add skip-execution support for up and down flags in migrate apply
https://github.com/hasura/graphql-engine-mono/pull/1510

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 9f7b271bda08ecd156a6220e830063bbb36a4b36
2021-06-21 15:57:41 +00:00
Aravind K P
4517478ccc cli: add support for citus sources
https://github.com/hasura/graphql-engine-mono/pull/1247

GitOrigin-RevId: 8383a37f71a4d45fe01c002eb229102f0dd38e9a
2021-06-21 14:35:00 +00:00
Ikechukwu Eze
6bb8df6a26 console: add citus support
### Description
Add console support for Citus DB

### Changelist
- [x] Add/Remove Citus Datasource
- [x] Track/Untrack tables
- [x] Create Relationships + Tracking suggested relationships
- [x] Permissions
- [x] Browse Rows (minimal)
- [x] Insert Row (using Mutations)
- [x] Filtering Shards and Partitions (partition details are not present in Modify tab, it should work once https://github.com/hasura/graphql-engine-mono/pull/1164 is merged)
- [x] Create Table
- [x] Fixes issue https://github.com/hasura/graphql-engine/issues/6926 for Citus.

### Known Issues
- Unable to create Functions from Raw SQL, server returns 400.
- Unable to run `ALTER` SQL commands, server returns 400.

### Screenshots

![Screenshot 2021-04-21 at 7 53 23 PM](https://user-images.githubusercontent.com/11921040/115569900-468b3d80-a2db-11eb-8374-e06d5d61b2e4.png)

### Setting up a Citus Source
- Link to [docker compose](https://github.com/citusdata/docker/blob/master/docker-compose.yml)
- Create an `.envfile` and add the following
```env
COORDINATOR_EXTERNAL_PORT=<port to expose citus master>
COMPOSE_PROJECT_NAME=test
```
- run `docker-compose --file docker-compose.yml --env-file .envfile up --scale worker=2 -d`. `worker` controls the number of citus worker nodes.
- Link to [sample data](http://docs.citusdata.com/en/v10.0/get_started/tutorial_multi_tenant.html#data-model-and-sample-data)

### Changelog
- [x] console: add citus support

https://github.com/hasura/graphql-engine-mono/pull/1184

Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 2500a5d5f996a2904fe8b5c656d6f3f2db707db6
2021-06-21 06:47:18 +00:00
Philip Lykke Carlsen
cfab5fc987 Add support for collapsing nulls across all PG expressions (close #1597)
https://github.com/hasura/graphql-engine-mono/pull/1608

GitOrigin-RevId: 02b6fa0e941a27b3149c9dfb37e0758c94f2986e
2021-06-18 15:34:50 +00:00
Phil Freeman
456caa59e1 server: fix caching for queries using remote schema permissions
https://github.com/hasura/graphql-engine-mono/pull/1579

Co-authored-by: Solomon Bothwell <24038+ssbothwell@users.noreply.github.com>
GitOrigin-RevId: 8fdf33863d812f2ee4edee7eec34150a7dc03231
2021-06-17 19:16:59 +00:00
Philip Lykke Carlsen
73e5c6ce47 Generalize set_table_customization to other backends (close #1501)
https://github.com/hasura/graphql-engine-mono/pull/1591

GitOrigin-RevId: 42332798160a3a3b18404345390b235db1dd81a1
2021-06-17 13:22:54 +00:00
Kali Vara Purushotham Santhati
a70e6089c8 cli: show only differences in metadata on metadata diff
https://github.com/hasura/graphql-engine-mono/pull/461

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 626bdfd8d1d05996153cd9676f1695ea796b00d9
2021-06-17 10:16:17 +00:00
Karthikeyan Chinnakonda
62e7fe62db server: log additional info in the livequery poller logs
https://github.com/hasura/graphql-engine-mono/pull/1529

GitOrigin-RevId: 27060632d5ac0da3f695c6755350f4e32dc0efc1
2021-06-16 13:28:17 +00:00
Tirumarai Selvan
283b77c5e0 tag release v2.0.0-beta.2
GitOrigin-RevId: cb066ee5e6738973f05a442230c074cb262e8c8d
2021-06-16 11:57:34 +00:00
Chris Done
67a9045328 Bigquery/cleanups
A pull request for cleaning up small issues, bugs, redundancies and missing things in the BigQuery backend.

Summary:

1. Remove duplicate projection fields - BigQuery rejects these.
2. Add order_by to the test suite cases, as it was returning inconsistent results.
3. Add lots of in FromIr about how the dataloader approach is given support.
4. Produce the correct output structure for aggregates:
   a. Should be a singleton object for a top-level aggregate query.
   b. Should have appropriate aggregate{} and nodes{} labels.
   c. **Support for nodes** (via array_agg).
5. Smooth over support of array aggregates by removing the fields used for joining with an explicit projection of each wanted field.

https://github.com/hasura/graphql-engine-mono/pull/1317

Co-authored-by: Vamshi Surabhi <6562944+0x777@users.noreply.github.com>
GitOrigin-RevId: cd3899f4667770a27055f94988ef2a6d5808f1f5
2021-06-15 08:59:11 +00:00
Kali Vara Purushotham Santhati
0ce7769603 cli: generate migrations for mssql databases in hasura console mode
closes https://github.com/hasura/graphql-engine/issues/7011

https://github.com/hasura/graphql-engine-mono/pull/1527

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: c03af1b9c4221263a5e23a41bb710010fe82c018
2021-06-15 06:30:36 +00:00
Aravind K P
c1fd8beeef Revert "cli: add exclude-schema & full flags to migrate create command (#1564)" (#1566)
This reverts commit b4441cbde667c66f3ae203d752d6b33a0833f34e.

GitOrigin-RevId: 33ddf5c3d94e888497eb909ccb18d35bb5614ea2
2021-06-14 12:28:34 +00:00
hasura-bot
6e5186475c cli: add exclude-schema & full flags to migrate create command (#1564)
GITHUB_PR_NUMBER: 5713
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5713

https://github.com/hasura/graphql-engine-mono/pull/1564

Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
GitOrigin-RevId: b4441cbde667c66f3ae203d752d6b33a0833f34e
2021-06-14 12:11:31 +00:00
Vamshi Surabhi
e8e4f30dd6 server: support remote relationships on SQL Server and BigQuery (#1497)
Remote relationships are now supported on SQL Server and BigQuery. The major change though is the re-architecture of remote join execution logic. Prior to this PR, each backend is responsible for processing the remote relationships that are part of their AST.

This is not ideal as there is nothing specific about a remote join's execution that ties it to a backend. The only backend specific part is whether or not the specification of the remote relationship is valid (i.e, we'll need to validate whether the scalars are compatible).

The approach now changes to this:

1. Before delegating the AST to the backend, we traverse the AST, collect all the remote joins while modifying the AST to add necessary join fields where needed.

1. Once the remote joins are collected from the AST, the database call is made to fetch the response. The necessary data for the remote join(s) is collected from the database's response and one or more remote schema calls are constructed as necessary.

1. The remote schema calls are then executed and the data from the database and from the remote schemas is joined to produce the final response.

### Known issues

1. Ideally the traversal of the IR to collect remote joins should return an AST which does not include remote join fields. This operation can be type safe but isn't taken up as part of the PR.

1. There is a lot of code duplication between `Transport/HTTP.hs` and `Transport/Websocket.hs` which needs to be fixed ASAP. This too hasn't been taken up by this PR.

1. The type which represents the execution plan is only modified to handle our current remote joins and as such it will have to be changed to accommodate general remote joins.

1. Use of lenses would have reduced the boilerplate code to collect remote joins from the base AST.

1. The current remote join logic assumes that the join columns of a remote relationship appear with their names in the database response. This however is incorrect as they could be aliased. This can be taken up by anyone, I've left a comment in the code.

### Notes to the reviewers

I think it is best reviewed commit by commit.

1. The first one is very straight forward.

1. The second one refactors the remote join execution logic but other than moving things around, it doesn't change the user facing functionality.  This moves Postgres specific parts to `Backends/Postgres` module from `Execute`. Some IR related code to `Hasura.RQL.IR` module.  Simplifies various type class function signatures as a backend doesn't have to handle remote joins anymore

1. The third one fixes partial case matches that for some weird reason weren't shown as warnings before this refactor

1. The fourth one generalizes the validation logic of remote relationships and implements `scalarTypeGraphQLName` function on SQL Server and BigQuery which is used by the validation logic. This enables remote relationships on BigQuery and SQL Server.

https://github.com/hasura/graphql-engine-mono/pull/1497

GitOrigin-RevId: 77dd8eed326602b16e9a8496f52f46d22b795598
2021-06-11 03:27:39 +00:00
Vamshi Surabhi
96104ec1a8 Revert "remote schema typename customisation"
This reverts the remote schema type customisation and namespacing feature temporarily as we test for certain conditions.

GitOrigin-RevId: f8ee97233da4597f703970c3998664c03582d8e7
2021-06-10 09:57:16 +00:00
Varun Choudhary
a7ef558b41 console: add modify functionality on columns, primary keys & unique keys to MS SQL Server tables
Modify page for mssql.
Column edit, add and delete
Pk add and delete
unique key add and delete

> Known Issues
> It is not because of this PR, but evident after implementing this changes.
> Table comments section is not only showing table comments but also anything that has `SYS.EXTENDED_PROPERTIES` with the table id, we may need to fix this by adding more conditions while fetching the table comments
> issue: https://github.com/hasura/graphql-engine-mono/issues/1486

Update
> Found a common issue while testing this PR, and it happens for PG tables too, so keeping it as a different issue
https://github.com/hasura/graphql-engine/issues/7018

GitOrigin-RevId: f7883a797ce8d25034824ae35668b1f830e59c70
2021-06-10 09:09:33 +00:00
David Overton
4a69fdeb01 Dmoverton/5863 prefix namespacing
GitOrigin-RevId: 108e8b25e745cb4f74d143d316262049cef62b70
2021-06-09 22:42:05 +00:00
Rakesh Emmadi
04e041b8cb server: fix replace configuration in add source metadata API
>

### Description
>

### Changelog

- [x] `CHANGELOG.md` is updated with user-facing content relevant to this PR. If no changelog is required, then add the `no-changelog-required` label.

### Affected components

- [x] Server

### Related Issues
->
Fixes #1528

### Solution and Design
>
Only replace connection configuration instead of replacing entire metadata with empty one.

GitOrigin-RevId: f9a16dcc7b1219ec1af915bf083622fcb7dde69a
2021-06-09 12:14:24 +00:00
Kali Vara Purushotham Santhati
8bfc56b7c4 cli: remove the unnecessary empty lines in actions.graphql generated by metadata export command
closes https://github.com/hasura/graphql-engine/issues/5338

GitOrigin-RevId: 83bd8492beb9f52c761d5857ca369425c69691a4
2021-06-09 10:46:05 +00:00
Abhijeet Khangarot
75f37f69d3 console: allow input object presets in remote schema permissions
GitOrigin-RevId: 6a535a5b9adb0a80d8f57682618aa7dd406236b0
2021-06-09 08:52:22 +00:00
Vishnu Bharathi
4b76289d03 cli: add interactive prompt to get input when --database-name flag is missing
GitOrigin-RevId: f92478d0ca6a4f6d0cfaa7aca3b4bb8a215a5cad
2021-06-09 07:13:46 +00:00
Varun Choudhary
3f19e8a3a8 console: allow tracking of custom SQL functions having composite type (rowtype) input arguments
Closes: https://github.com/hasura/graphql-engine/issues/6858

Description:

Following two things are done:

1. Show compatible functions in the Untracked custom functions list (i.e. even those with ROWTYPE arg)
![Screenshot from 2021-05-11 16-13-21](https://user-images.githubusercontent.com/68095256/117803100-dd606f80-b273-11eb-8d02-1ea55b31863d.png)
2. When a function with ROWTYPE argument is tracked, a confirmatory dialogue box is shown. The text reads `This function can be added as a root field or a computed field inside a table` and the buttons reflect the options: `Add as root field`, `Add as computed field` (this will take the user to the Modify -> Add a computed field section of the first-row type argument)
![Screenshot from 2021-06-03 17-28-28](https://user-images.githubusercontent.com/68095256/120641377-28dff500-c491-11eb-80ea-cc60e6f37f23.png)

Affected Component:

- [x] Console

Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: 089944aadba73f7a77e220a49489846ff1cb9540
2021-06-08 15:22:24 +00:00
Varun Choudhary
f3643f26ad console/mssql: support CRUD operations for foreign keys
adds foreign key functionality to mssql tables under Modify Tab.

Steps to test:
1. Connect an MSSQL data source.
2. Create a table
3. go to modify page
4. make sure the `Add foreign key `button is visible
5. click on `Add foreign key`, and try to add FK
6. after adding the FK, we will see the `edit` and `remove` button, try to edit and remove the FK

Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 63be7c4ef909503ac05096a64c686b72f7c47307
2021-06-03 11:49:21 +00:00
Tirumarai Selvan
205a31de0c tag release v2.0.0-beta.1
GitOrigin-RevId: e015b7d72751b54684e2e74a645d0b58714ef102
2021-06-02 12:07:58 +00:00
hasura-bot
c1381d38e0 console: show error notification for table and cloumn names exceeding 63 characters and trim migration names exceeding 255 characters
GITHUB_PR_NUMBER: 5785
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5785

Co-authored-by: Abhijeet Khangarot <26903230+abhi40308@users.noreply.github.com>
GitOrigin-RevId: b12a729cfb708ff0622805f247473cb16b44ae0a
2021-06-02 10:23:58 +00:00
kodiakhq[bot]
01d8a37706 server: fix asymptotics of event_log batch fetching
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 9b8afb502e94dd371a8596ccde97d023bd2344a9
2021-06-01 17:34:38 +00:00
Aravind K P
757327d94c cli: use stdout logger in version command
closes https://github.com/hasura/graphql-engine/issues/6998

GitOrigin-RevId: 202eecc6085970aa5433e652cfafd34195252dbf
2021-05-31 04:13:34 +00:00
Ikechukwu Eze
9b42a52637 console: allow renaming data source
Before: on edit source page, changing data source name was not allowed and the input disabled.
Now: data source name can be changed on edit source page.

Note:
- ~When only the data source name is changed, a  request is sent for renaming and another for updating data source even when other values of the data source configuration weren't changed.~
- This has been fixed and should be tested thus:
    - run `npm run jest`
    - on edit source UI, change only data source name and confirm that only `rename_source` request is being sent through network tab in dev tools
    - change any other fields but the source name, and confirm that only `add_source` with `replace_configuration: true` is sent.
    - change both source name and any other field in the form and confirm that both request are sent (in this order: rename request before add request) and export_metadata request only sent once after that.
    - Try with bigquery, mssql and postgres

Possible Refactor:
  - consider if `renameDataSource` and `addDataSource`, can be refactored or left as is

Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: cbb041ac8362fd94de5aa19bfa61c0cde8703459
2021-05-28 07:59:47 +00:00
Lyndon Maydwell
f3749f24b3 Fix for 6913 - Undefined ENV variable during a replace metadata throws on allow_inconsistent_metadata
GitOrigin-RevId: 46494f8784d21179e49d2034e1f68171cf146e49
2021-05-28 04:32:33 +00:00
Sooraj
c3d7a7634f console: add drop table functionality to ms sql server tables
GitOrigin-RevId: a79c864263ebdde4a9a7e1ce1354a3ac17be4098
2021-05-27 21:26:50 +00:00
Abhijeet Khangarot
9a68cb51c9 console: update connect database form with SSL certificates
GitOrigin-RevId: b8da60cbe1220c8f4f8ec180fd3967e326b7f3a8
2021-05-27 16:00:01 +00:00
Rakesh Emmadi
e43d0273e0 server: mssql: apply schema changes by mssql_run_sql DDL on metadata (fix #779)
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
GitOrigin-RevId: 6905d5914c8a698445c0ef03d6a8303747701e1c
2021-05-27 15:07:10 +00:00
Aravind K P
8ebf5eef2b cli: disable reading metadata from pipe
closes https://github.com/hasura/graphql-engine/issues/6987

GitOrigin-RevId: f12b7475055d2f9767a6dd20eee531042bdbcbc5
2021-05-27 14:17:25 +00:00
Karthikeyan Chinnakonda
72c24eea69 server: fix cron trigger bug of new events not getting generated when cron trigger is imported via metadata
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 1a9076e039ba2c8da898683c64ef988fb8512eae
2021-05-26 16:20:19 +00:00
Vijay Prasanna
1c79bb4b80 console: add create table view for mssql schemas
### Description
This PR adds `Create Table` view for MSSQL server schemas.

### Changelist
* [x] Add basic `create table` form view on navigating from Schema's create table action.
* [x] Hide frequently selected columns button.
* [x] Allow the user to manually add column types for now: convert `select` for columns to a `text` input .
* [x] Remove `Restrict` radio selection for foreign key constraints.
* [x] Add SQL query for Create table in MSSQL.
### Screenshot
![Screenshot 2021-03-09 at 5 22 03 PM](https://user-images.githubusercontent.com/11921040/110467030-82d45700-80fc-11eb-84af-dd228d84b135.png)

### Changelog
- [x] CHANGELOG.md is updated with user-facing content relevant to this PR. If no changelog is required, then add the no-changelog-required label.

### Modified components
 - Console

Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: a783b5940198ecf582d1cd6ad4d4224efabf59fc
2021-05-26 15:28:32 +00:00
Aleksandra Sikora
455b5a9fd6 console/mssql: add comment and check constraints to modify page
GitOrigin-RevId: 0fcc9741d031ec7a74efff5437e676ea7f744922
2021-05-26 14:27:42 +00:00
Abhijeet Khangarot
d0a66e5172 console: add new connection params to connect database form
GitOrigin-RevId: 073d30e50a196e265cd8dfb7cfb3c9af00c3fc0e
2021-05-25 13:03:08 +00:00
Tirumarai Selvan
3bcf758e14 tag release v2.0.0-alpha.11
GitOrigin-RevId: cbc36c7b0385ad7e1ca7fcda8a364ee9b201b35d
2021-05-25 12:18:44 +00:00
Naveen Naidu
12b57530f3 server: log warning for deprecated environment variables
Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: e3a845d93d05545816aa9448aad5845b7247b679
2021-05-25 10:50:51 +00:00
Swann Moreau
d3611af58d server: lazy event catalog initialisation
event catalog:
- `hdb_catalog` is no longer automatically created
- catalog is initialised when the first event trigger is created
- catalog initialisation is done during the schema cache build, using `ArrowCache` so it is only run in response to a change to the set of event triggers

event queue:
- `processEventQueue` thread is prevented from starting when `HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL=0`
- `processEventQueue` thread only processes sources for which at least one event trigger exists in some table in the source

Co-authored-by: Anon Ray <616387+ecthiender@users.noreply.github.com>
GitOrigin-RevId: 73f256465d62490cd2b59dcd074718679993d4fe
2021-05-25 06:51:03 +00:00
Antoine Leblanc
6e95f761f5 server: rewrite remote input parsers to deal with partial variable expansion (fix hasura/graphql-engine#6656)
GitOrigin-RevId: e0b197a0fd1e259d43e6152b726b350c4d527a4b
2021-05-24 20:13:47 +00:00
Abhijeet Khangarot
82e2e382f1 console: rearrange connect database form and add prepared statements
GitOrigin-RevId: 2cb84e3feabc72875c6b3f5368b55fa893ba72a9
2021-05-24 15:09:55 +00:00
Vladimir Ciobanu
0f8f4764c7 server: rename source
GitOrigin-RevId: 5f4a17941bfd447deb9663a4c250f149238c5f53
2021-05-24 13:15:02 +00:00
Abby Sassel
c9e7e10eaa server/bugfix: Include permission filter in the exists clause. Fixes #6931
GitOrigin-RevId: d3080dfa00c96afcf1254d83757a5e50a0726381
2021-05-24 09:09:50 +00:00
Anon Ray
63594e1828 server: fix referenced session vars for live queries when UDF has specified session argument
GitOrigin-RevId: 23efdf4d3b3902b5ce7ec14061faa53b18258e86
2021-05-24 07:34:33 +00:00
hasura-bot
2a24947e57 🐛 [3897] Squash fails when down/metadown empty (close #3897)
GITHUB_PR_NUMBER: 6934
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6934

Co-authored-by: Appréderisse Benjamin <8669741+bappr@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 13c7bcdcac9e2bcb659734e0e91d676525f8adcc
2021-05-24 06:05:54 +00:00
Kali Vara Purushotham Santhati
5e92ce028e cli: migrate delete command, update migration state on server after squash
It contains 2 flags

all   -  To delete all migrations locally and on database
version - To delete a single migration locally and on database

Usage :
`hasura migrate delete --all`
`hasura migrate delete --version <version_number>`

Additional fix :
The `migrate squash`  will deletes the migration history on server after squashing if user opts to delete the migrations.

closes https://github.com/hasura/graphql-engine-mono/issues/292
closes https://github.com/hasura/graphql-engine/issues/5373
closes https://github.com/hasura/graphql-engine/issues/6434

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: fa7ceae7a1970d6724fb601a147900e880ad2e6f
2021-05-24 02:34:33 +00:00
Chris Done
feb08d8998 Various MSSQL bugfixes/cleanups
GitOrigin-RevId: 673df70de7b7f9130482b7a28f860bbaffad44a4
2021-05-21 12:28:52 +00:00
Abby Sassel
1afa4ac3cc server/citus: feature branch
Co-authored-by: Vladimir Ciobanu <1017953+vladciobanu@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Ikechukwu Eze <22247592+iykekings@users.noreply.github.com>
Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Phil Freeman <630306+paf31@users.noreply.github.com>
GitOrigin-RevId: 1b964fe5f5f50380172cb702b6a328fed782b6b7
2021-05-21 02:47:51 +00:00
Antoine Leblanc
5238bb8011 server: support for custom directives
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: f11b3b2e964af4860c3bb0fd9efec6be54c2e88b
2021-05-20 10:03:50 +00:00
Vishnu Bharathi
9e3f5a9f01 cli: validate pro plugin version
GitOrigin-RevId: 2bcb64256b357d07d0f06d8347260c649bfcc132
2021-05-20 09:14:29 +00:00
Naveen Naidu
d8d4626ba3 server: fix bigint overflow, incorrect geojson format in event trigger payload
GitOrigin-RevId: f43f54f6851d366b60ff72a1fe9b89ca236c3d89
2021-05-20 07:24:20 +00:00
Karthikeyan Chinnakonda
9a99923fef server: support adding a tracked function as a computed field and vice versa
GitOrigin-RevId: 2f4db0b716d493ce245d9fa7e37e11382f18cd67
2021-05-20 06:29:24 +00:00
Antoine Leblanc
dfbdfca144 server: fix order of fields in introspection output
GitOrigin-RevId: edd6af755d46c3d13c8b7b5504f8d89701a3250f
2021-05-19 16:38:54 +00:00
Swann Moreau
a83194239e server: forward request id when not user-provided
GitOrigin-RevId: 78745dda0112321c809220fdcdeaf2adc6f9c3e5
2021-05-19 14:08:00 +00:00
Abhijeet Khangarot
95d1ab78e1 console: add one-to-one relationships support
Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
GitOrigin-RevId: 6177c63a0e8ac86085441cbd4ad1aab179052434
2021-05-19 12:42:45 +00:00
Abby Sassel
3ba5d1e540 server: include more detail in inconsistent metadata error messages (fix #6684)
GitOrigin-RevId: 1a0d8fa2b465320e9ab4ea43259d0e8d92364473
2021-05-19 05:02:53 +00:00
Ikechukwu Eze
a7639145fe console: allow editing sources configuration
This adds the feature to edit data sources to the console

Co-authored-by: Aleksandra Sikora <9019397+beerose@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Martin Mark <74692114+martin-hasura@users.noreply.github.com>
GitOrigin-RevId: 40f97a362620e9cebe97a2267cb9fb143c32af5d
2021-05-19 04:16:38 +00:00
Kali Vara Purushotham Santhati
8edd3f03a5 cli: using forward slash as filepath separator irrespective of os.
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 6ad93a11830868a05a1c02333d482a2978b704c2
2021-05-19 03:36:23 +00:00
Abhijeet Khangarot
8da98c00ba console: show db version in manage db page and remove from about page
GitOrigin-RevId: 482121bb4dd29d36b87f472ec14c966d04daab2c
2021-05-19 03:36:18 +00:00
David Overton
ddad668f07 Fix/custom table name
GitOrigin-RevId: 5004717ac7d9e848ca186a1cdf52e375547034bf
2021-05-18 13:37:27 +00:00
Vishnu Bharathi
b408b04e33 cli: allow space in database name
GitOrigin-RevId: 470bcc6926c19998b2d30787f1ea4649c35bfa41
2021-05-18 10:49:05 +00:00
Antoine Leblanc
ecb90c47a1 server: fix action output fields return type (fix hasura/graphql-engine#6631)
GitOrigin-RevId: 9be5ac87fe69c55aafb6b5af918eb4deb97e27d5
2021-05-18 09:32:43 +00:00
Aravind K P
9dfed5da57 cli: fix applying migrations in a different environment after config v3 update
GitOrigin-RevId: 2f5d554dba50da1d45ea9689afca07f4d0f2c1e5
2021-05-17 15:20:08 +00:00
Vishnu Bharathi
6d340b58c6 cli: adds support for graphql_schema_introspection metadata object
GitOrigin-RevId: a0c372bfa7ee0620bdd80d110da4b1e85e45f73f
2021-05-17 04:53:34 +00:00