Commit Graph

3039 Commits

Author SHA1 Message Date
Aravind K P
d8198a8bad cli,ci: testsuite enhancements
- remove `HASURA_TEST_CLI_HGE_DOCKER_TAG` & `HASURA_TEST_CLI_HGE_DOCKER_REPO` env variables
- add `HASURA_TEST_CLI_HGE_DOCKER_IMAGE` environment variable to configure hge image used in tests
- add template test project directories
- add helper functions to manipulate the template projects in individual tests
- add config v2 tests

Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
GitOrigin-RevId: 009a74c042861ff0a8dec2b06002e55de3a8a629
2021-06-03 13:27: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
Chris Done
31658eb874 Implement snakeCaseTableName
This implements the `snakeCaseTableName` method. It's part of the larger BigQuery PR at https://github.com/hasura/graphql-engine-mono/pull/1317, but @0x777 requested a smaller PR with this change.

GitOrigin-RevId: aeb93c3228bb6ba7293cd73b7a34b39c7ed6139a
2021-06-02 11:13:36 +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
Philip Lykke Carlsen
fc17132930 Revert splitting-out of variables in MSSQL
GitOrigin-RevId: 720c0e0c775c9418aea569d3f87875236fdcebfe
2021-06-01 10:05:26 +00:00
Karthikeyan Chinnakonda
f1f56ccf75 server: source initialization fix
GitOrigin-RevId: fcb94ca743a99ee3ffe30d40717bb1f0a13cf751
2021-05-31 13:54:59 +00:00
Shraddha Agrawal
148d3756d4 docs/cloud: add receipt billing email docs
cloud docs for lux PR [#2327](https://github.com/hasura/lux/pull/2327).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 0bb445712c0c91c30f60eaf648d5bfdf4e9b2ec8
2021-05-31 12:17:37 +00:00
Shraddha Agrawal
0dc4a780dd docs/cloud: update default card delete comment
Users can delete their default card now. They will not be allowed to do so if they have any billable projects or have an pending dues. (ref cloud PR [#2155](https://github.com/hasura/lux/pull/2155)).

Note: The changes are already live.
GitOrigin-RevId: 80d695698152a94613309b5711851f018941c280
2021-05-31 12:06:23 +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
Philip Lykke Carlsen
125f37ea28 Server: Use a bespoke type for nullability instead of Bool
GitOrigin-RevId: a793c7a921174611d44b7e7cdc1dc43b132376fe
2021-05-28 10:40:15 +00:00
Swann Moreau
b825af9a96 server: fix error propagation in initCatalogForSource
GitOrigin-RevId: 679bca324dfa7728ebcff5862782f29f538bee20
2021-05-28 08:57:46 +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
Aleksandra Sikora
1b37008a0e console: fix connect db notes content
GitOrigin-RevId: 75cc16950d7be7ad5b52cf266c6c010cb54d53ec
2021-05-28 06:57:55 +00:00
Aravind K P
ea6a2c9a14 cli: config v3 update script improvements
GitOrigin-RevId: cbd80af1334916e6d5af54a925a14b3849034646
2021-05-28 06:05:33 +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
Antoine Leblanc
30ef72bc93 server: better error message on column type mismatch
GitOrigin-RevId: d3d1ff4278e4ced37e90e950fd9043883f72d37f
2021-05-27 16:47:01 +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
Antoine Leblanc
00ca310d21 server: do not do a "successful" noop when tracking a function in the wrong source
GitOrigin-RevId: 9eb78899acd0c60081b2a999a75c11b32f394ba7
2021-05-27 12:09:19 +00:00
Karthikeyan Chinnakonda
7d630e8147 build: use the debian buster version in the docker image
GitOrigin-RevId: 51077f8b5d0c5bdf06a6560444f89d74a3660336
2021-05-27 07:50:15 +00:00
Swann Moreau
390a1552a8 server: rename inDevelopmentMode -> devMode
GitOrigin-RevId: a99deb144f07f4b0bdf60430a12ad34962355d36
2021-05-27 06:52:14 +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
Vijay Prasanna
7dbee42f64 console: add regex to highlight item in data tab nav tree
Adding regex expression to test `view`, `table` and `function` routes.
Fixes no highlight issue when clicking on functions in the data tab navigation tree.

GitOrigin-RevId: f278998ec1c98c98e0bfc9cd72d63d673cd74012
2021-05-26 09:43:31 +00:00
Abby Sassel
06bfe650f0 server/mssql: subscription test cleanup post-fix
GitOrigin-RevId: b67e577b15be3c54f869bb3497b30fb0bb53ddf0
2021-05-26 09:06:57 +00:00
Swann Moreau
8e3e7501c7 server: do not collect metrics for sources that have been dropped
GitOrigin-RevId: ed439426527237c2907df77f45582dbe566aeb51
2021-05-26 07:41:28 +00:00
Vijay Prasanna
3acfd35d4e console/bigquery: fix showing empty dataset name when the dataset is from a non-US region
Fixes [issue](https://github.com/hasura/graphql-engine/issues/6937)

### Description
The problem lies with the `schemaListSql` for Big Query.  Without a region qualifier prefixed, the SQL result contains datasets only US regions, as described in the [docs](https://cloud.google.com/bigquery/docs/information-schema-datasets).
```
If you do not specify a regional qualifier, metadata is retrieved from the us multi-region.
```

The alternative way is to get a list of all available publicly available regions (which is `us` and `europe` atm), for example for europe -
```
SELECT * FROM region-europe.INFORMATION_SCHEMA.SCHEMATA;
```
and then perform `UNION ALL` of the results. This is approached is ditched in favour of the reason that Big Query is read-only on Hasura and new datasets cannot be added from the console (other than by modifying the metadata), we can return the datasets available in the Big Query source's metadata as the possible values of datasets needed by the console to render the data nav tree, thereby avoiding an extra API call in the process.

GitOrigin-RevId: 8117d5698dcc4e7d932362b7cf2e7c8ef34d106a
2021-05-25 18:21:48 +00:00
Antoine Leblanc
1674325eb2 server/mssql: fix order of clause in reselect query generation
GitOrigin-RevId: fb7a258059b767a275a5b337e1549f6b3be45499
2021-05-25 14:58:51 +00:00
Tirumarai Selvan
54b9e96702 update contributing.md with server dependencies
GitOrigin-RevId: 9c42625eea8d758e8aff3eca0af8cde48a500766
2021-05-25 14:00:33 +00:00
Abby Sassel
41908936cf server: improve backend-specific test setup
GitOrigin-RevId: c40393bcdd78feaba7e9490ce4ed78de19b5bfc5
2021-05-25 13:55:11 +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
Vladimir Ciobanu
5ad01a4bac server: Add test file to suite
GitOrigin-RevId: 6522f776c9b267d5c94be484d55f879e79d30c96
2021-05-25 11:37:14 +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
Aleksandra Sikora
a5ce316a96 console/mssql: simplify sql query for fetching schemas list
GitOrigin-RevId: 0d70973991c61b8f06efe61032bcfbfe05a89ded
2021-05-25 09:36:24 +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
Solomon Bothwell
3ad4089126 Rewrites PG Client Cert RFC
GitOrigin-RevId: 430301a70c75ef000d2736a28dfb3da34307c5a8
2021-05-25 03:12:16 +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
Rikin Kachhia
3aff213978 docs: update heading sizes
GitOrigin-RevId: b39c0bdd095cb034caea0cf03ae9f8de8db4ade4
2021-05-24 16:39:41 +00:00
Rikin Kachhia
b8c294bb69 docs: update v2.0 breaking changes section
GitOrigin-RevId: efb01723e8c3c85c2eb051644ecca6b1ce682479
2021-05-24 16:35:07 +00:00
Anon Ray
53beef47ea server, console, docs: fix untrack_function metadata query bug
Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
GitOrigin-RevId: a68a6f8b5c5243372332bfec7d9cdcd3011c001f
2021-05-24 15:57:26 +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
Vijay Prasanna
31465c5bba console/postgres: fix broken table view when clicking on inherited tables
### Description
- Fixes https://github.com/hasura/graphql-engine/issues/6926
- This is to resolve the issue where inherited tables get listed into the array that's used to filter off partitions.
- In the check, we compare if the partition's parent is a "partitioned table" or not before adding to the filter array.

### Steps to verify
- Create the following tables on a postgres db
```SQL
CREATE TABLE cities (
id SERIAL PRIMARY KEY,
name       text,
population real,
elevation  int     -- (in ft)
);

CREATE TABLE capitals (
state      char(2) UNIQUE NOT NULL
) INHERITS (cities);
```
- Navigate to the data tab, and click on the datasource > schema, and verify that both `cities` and `capitals` are present.
- Click on `capitals` and see if it loads properly.
- Create the following table and its partitions
```sql
CREATE TABLE measurement (
    city_id         int not null,
    logdate         date not null,
    peaktemp        int,
    unitsales       int
) PARTITION BY RANGE (logdate);

CREATE TABLE measurement_y2006m02 PARTITION OF measurement
    FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');

CREATE TABLE measurement_y2006m03 PARTITION OF measurement
    FOR VALUES FROM ('2006-03-01') TO ('2006-04-01');
```
- Verify that the data tab nav does not show `measurement_y2006m02` and `measurement_y2006m03`

GitOrigin-RevId: 1cc988fff03f289e6ea36d0b1e9f8e54b8741be9
2021-05-24 11:56:28 +00:00
Tirumarai Selvan
52c720a631 add 2.0.0-cloud.11 changelog
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: babbb1e66f83184896988fc40671b2f5bb80b44f
2021-05-24 11:09:15 +00:00