Commit Graph

526 Commits

Author SHA1 Message Date
Aravind K P
22ec874069 cli: port statestore/settings to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6492
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: 409b220908d773cc6b45bc7ebe11a6ea950e9d35
2022-10-28 07:51:58 +00:00
Aravind K P
f82fc6d420 cli: port pkg/metadata to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6490
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: 10b2ddbd534895c28bc69a6cf1a68229f67e8e3d
2022-10-28 06:47:58 +00:00
Aravind K P
283866526f cli: port pkg/migrate to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6491
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: 37640b3f888f6ca68df6894fa1d0f9a5368136b6
2022-10-27 16:17:24 +00:00
Aravind K P
e73a8f74e4 cli: port metadataobject/inherited_roles to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6406
GitOrigin-RevId: 4dcf132634578a8defd3678e11c03fce94bfb827
2022-10-27 09:51:42 +00:00
Aravind K P
ca6605a036 cli: port metadataobject/apilimits to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6397
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: ff266638f767da75da584f366d1a464ba6b70f0c
2022-10-27 08:28:23 +00:00
Aravind K P
a19a0c4b30 cli: port metadataobject/actions to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6425
GitOrigin-RevId: 87cb9f0244874065ed862f73eef93cfe73b82852
2022-10-27 07:49:44 +00:00
Aravind K P
7669b01e3a cli: port metadataobject/remoteschemas to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6413
GitOrigin-RevId: 3ffdf4076ba454bbbfe09cc61e401a64488637a8
2022-10-27 07:07:37 +00:00
Aravind K P
5217c5f0c1 cli: port metadataobject/network to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6408
GitOrigin-RevId: e3fb8e2b2bcef32b072818ac4c4a32124d7876d4
2022-10-27 06:18:50 +00:00
Mohd Bilal
3394c97fdc cli: refactor plugins/download to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6526
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: b12bbdf7bfac7eb3313b3e814aa6e1d73e77d3ce
2022-10-27 03:18:33 +00:00
Mohd Bilal
edc40ea7be cli: refactor internal/scripts package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6458
GitOrigin-RevId: 579a7cba6780feee81f9ee06cab6ccb5f7a4cae3
2022-10-26 07:30:25 +00:00
Mohd Bilal
6ecf34ade6 cli: refactor seed package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6506
GitOrigin-RevId: cd7fbe3404b337e946022b351188f58b8bfbf6d3
2022-10-26 06:02:09 +00:00
Mohd Bilal
bf6f36a552 cli: refactor migrate/cmd package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6510
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d34597728fdf2070bba35a8e85b5859e30f5c3e4
2022-10-26 05:28:42 +00:00
Mohd Bilal
e3fc8b6e27 cli: refactor migrate/database package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6511
GitOrigin-RevId: f8ed9c2f3cc5014d6e4b6258452109b452c17c39
2022-10-26 04:59:50 +00:00
Mohd Bilal
a34d610e6a cli: refactor plugins/paths to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6527
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 044fb0c845f02dcaa3906b9a575f5bd8842b9056
2022-10-26 02:20:57 +00:00
Aravind K P
5d759189d0 cli: port metadataobject/query_collections to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6410
GitOrigin-RevId: d82eb90669f3a915f2a2fc9d87347ff64f4ee97b
2022-10-24 03:22:47 +00:00
Aravind K P
1aa5cbb195 cli: port metadataobject/allowlist package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6396
GitOrigin-RevId: 180eaa60613985334681bd9011f910c3f3d6afb2
2022-10-21 16:57:31 +00:00
Samir Talwar
c3afa0fdd7 Install and use ODBC Driver 18 for SQL Server (msodbcsql18).
This installs the ODBC Driver 18 for SQL Server in all our shipped Docker images, and update our tests and documentation accordingly.

This version supports arm64, and therefore can run natively (or via Docker) on macOS on aarch64.

`msodbcsql17` is still installed in production-targeted Docker images so that users do not _have_ to migrate to the new driver.

Nix expressions are packaged for the new driver, as it is not yet available in nixpkgs.

In this version, [the default encryption setting was changed from "no" to "yes"](https://techcommunity.microsoft.com/t5/sql-server-blog/odbc-driver-18-0-for-sql-server-released/ba-p/3169228). In addition, "mandatory" and "optional" were added as synonyms for "yes" and "no" respectively.

I have therefore modified all connection strings in tests to specify `Encrypt=optional` (and changed some from `Encrypt=no`). I chose "optional" rather than "no" because I feel it's more honest; these connection strings will work with or without an encrypted connection.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6241
GitOrigin-RevId: 959f88dd1f271ef06a3616bc46b358f364f6cdfd
2022-10-21 16:25:04 +00:00
Aravind K P
3cec172f6f cli: port metadataobject/rest_endpoints to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6424
GitOrigin-RevId: 3b210e6f6b47756e7941fcb14e960674718855a1
2022-10-21 14:51:38 +00:00
Mohd Bilal
0c8b80ee71 cli: port commonmetadata package to use internal/errors package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6318
GitOrigin-RevId: 2274c535f5475d50fbfdf645572b8553625a87fc
2022-10-20 15:18:46 +00:00
Aravind K P
754fb6e8b9 cli: port metadataobject/crontriggers to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6398
GitOrigin-RevId: 25f9964b3eecb2f89d482401d425752bd7d33708
2022-10-20 07:54:31 +00:00
Aravind K P
3d7effbcc1 cli: refactor metadataobject.WriteDiff to use std error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6389
GitOrigin-RevId: 731b74ae5bb1ad0479c141f1e66795d9fd21e9e3
2022-10-20 06:58:52 +00:00
Aravind K P
e89895b5f1 cli: refactor metadataobject.GetFiles to use std error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6388
GitOrigin-RevId: 4ae565fc7d7a9275473a736aac78a2da7d031260
2022-10-20 04:36:56 +00:00
Aravind K P
4b1ab8bf67 cli: refactor metadataobject.Object interface to use std error
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6387
GitOrigin-RevId: 5a18fb9b26eaf9bc9a1b55ae79ce18e4147f4aa3
2022-10-19 12:52:46 +00:00
Mohd Bilal
51424c0857 cli: use github.com/stretchr/testify/require assertions in internal/hasura/pgdump tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6364
GitOrigin-RevId: c6c99c092e6992d3905e1a1f58ea0373911238f8
2022-10-18 03:24:17 +00:00
Mohd Bilal
aa70c62bdd cli: port internal/hasura/v2query package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6379
GitOrigin-RevId: 787e5cce03006b0d248a79797923efb8fe6fa7b4
2022-10-17 18:28:56 +00:00
Mohd Bilal
081b9163c4 cli: port internal/hausra/sourceops/postgres to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6374
GitOrigin-RevId: 8b52f7409799d7ac3b43937cc66837ab3861cd03
2022-10-17 17:56:02 +00:00
Mohd Bilal
7044bf194d cli: port internal/hasura/v1graphql package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6322
GitOrigin-RevId: 1f1c8f13bd688881c48f3381dc9e3e7bacf5fc0c
2022-10-17 17:02:00 +00:00
Mohd Bilal
06138634bc cli: use github.com/stretchr/testify/require assertions in internal/hasura/catalogstate tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6360
GitOrigin-RevId: 1c0f1666fb0ca70d7cf00e6584c549f1bf044c69
2022-10-17 09:57:59 +00:00
Aravind K P
2e0cd9267b cli: port v1query package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6334
GitOrigin-RevId: 094745ed3c8e6aaab5f7f01236ddbebba0f043ba
2022-10-13 15:06:56 +00:00
Mohd Bilal
7b5d61d04f CLI: port catalogstate package to use new errors package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6259
GitOrigin-RevId: be90386154d7906a41c2334db5cc24fe5febf774
2022-10-12 09:45:51 +00:00
Mohd Bilal
0bd013653a cli: port pgdump package to use new errors package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6263
GitOrigin-RevId: e410548ecba70e556e41a0377952555c3b40c8ef
2022-10-12 08:47:21 +00:00
Mohd Bilal
56a26a74ee CLI: Add utility Match and print function for the new errors package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6258
GitOrigin-RevId: fa3148c467b527fbe62cebca3177a39f9b02b38c
2022-10-11 16:41:57 +00:00
Aravind K P
a949af5e14 cli: refactor httpc package to use error framework
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6227
GitOrigin-RevId: fcf9ee64345309ddcba95e4369a6564defa54fc0
2022-10-11 13:40:46 +00:00
Samir Talwar
740341382f CLI: Upgrade Dockertest to try and fix the build on CI.
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6184
GitOrigin-RevId: 796f400fd45a58a5a81212e04a0730c53f04899a
2022-10-04 12:06:32 +00:00
Mohd Bilal
c28ed6cc6c cli: Fix query collection export missing definition object and queries array in yaml
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5954
GitOrigin-RevId: b7b29c43ca9c3b2934ea12e71bca2dadecc4c34b
2022-09-27 13:46:42 +00:00
Mohd Bilal
8d18a55212 cli: move AddDatabaseToHasura to testutil package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6069
GitOrigin-RevId: f7a3b98685c16fec613719eaa05024cd3c9cd3d4
2022-09-27 11:16:22 +00:00
Aravind K P
451f252c0f cli: [rfc] improve error handling
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4817
GitOrigin-RevId: 340f8d0cb3df496c1c0df1cc60fe3752dd58c75c
2022-09-21 08:29:37 +00:00
hasura-bot
df5e887098 cli: fix bug when exporting metadata to remote_schemas.yaml
GITHUB_PR_NUMBER: 8921
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8921

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5744
Co-authored-by: Ryohei KOMATSUYAMA <54347899+kmtym1998@users.noreply.github.com>
GitOrigin-RevId: cc0948b62c3caccfb2c814433bb1a84508e3c37e
2022-09-19 12:20:26 +00:00
Mohd Bilal
9552b38d1b Docs: Update CLI docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5585
Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 655bdb574eb609fbef79a4dd68be77449585db44
2022-09-15 05:37:46 +00:00
Vishnu Bharathi
c60aed3e36 ci: changes for enabling the release of EE lite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5528
GitOrigin-RevId: d32439aa921202d88f709df44d1d3ebfba2fff02
2022-08-29 05:20:24 +00:00
Divi
bb1020bd47 cli/docs: update hasura cli docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5192
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: a89fa52fad4fd1d61df3026b8d00f3a740fd806b
2022-08-16 14:29:19 +00:00
Mohd Bilal
6a90332ab1 cli: Add --disallow-inconsistent-metadata flag to hasura metadata apply command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5045
GitOrigin-RevId: 1e8da16285705e3e439f1e3e3e4c495c715a902b
2022-08-16 09:59:03 +00:00
Mohd Bilal
48a0a34a92 cli: add support for health_check metadata object in sources
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5287
GitOrigin-RevId: be7e1d19b9875cf05a52a9894cf2bda58b209733
2022-08-03 13:17:36 +00:00
Samir Talwar
349ccd3296 Use docker compose, not docker-compose.
Docker Compose is now a plugin for Docker, bundled by default in Docker Desktop and many Linux distribution packages. The standalone `docker-compose` binary has been deprecated since Docker Compose v2.

Using the new version directly allows us to write development scripts that do not require `docker-compose` to be installed.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5185
GitOrigin-RevId: c8542b8b2405d1aa32288991688c6fde4af96383
2022-08-02 10:30:57 +00:00
Divi
c1fc137075 cli: upgrade cuelang to fix memory leak
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5072
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 8c3eafe15ae1e8b8a5d47307b6739d5a4910b94d
2022-07-19 13:50:46 +00:00
kodiakhq[bot]
d8b595575d server: more GHC 9.2 changes compatible with 8.10 (#3550)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4968
GitOrigin-RevId: 1175b2fcc90e0436c99da7fa58d317a49c7704d4
2022-07-07 16:51:18 +00:00
hasura-bot
92f601587c cli: use 2-spaces indent for graphql query in metadata (fix #8469)
GITHUB_PR_NUMBER: 8519
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8519

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4544
Co-authored-by: Yudai Shinnoki <2777896+shinnoki@users.noreply.github.com>
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 3d9f9d1bf940e528a1ad9fab67b6ae818927ffac
2022-06-27 05:27:19 +00:00
Divi
c668aa1158 cli: improve error reporting in metadata apply command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4454
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: ae66bdfdc140c1a2a7747fb0ff2acd6f7b577d3f
2022-06-15 15:45:38 +00:00
Divi
b50aecdae4 cli: fix perfomance regression with large metadata in metadata apply
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4661
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 48050e899592878c47c382281605a0c8666ddc8b
2022-06-15 12:39:43 +00:00
Brandon Simmons
6e8da71ece server: migrate to aeson-2 in preparation for ghc 9.2 upgrade
(Work here originally done by awjchen, rebased and fixed up for merge by
jberryman)

This is part of a merge train towards GHC 9.2 compatibility. The main
issue is the use of the new abstract `KeyMap` in 2.0. See:
https://hackage.haskell.org/package/aeson-2.0.3.0/changelog

Alex's original work is here:
#4305

BEHAVIOR CHANGE NOTE: This change causes a different arbitrary ordering
of serialized Json, for example during metadata export. CLI users care
about this in particular, and so we need to call it out as a _behavior
change_ as we did in v2.5.0. The good news though is that after this
change ordering should be more stable (alphabetical key order).

See: https://hasurahq.slack.com/archives/C01M20G1YRW/p1654012632634389

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4611
Co-authored-by: awjchen <13142944+awjchen@users.noreply.github.com>
GitOrigin-RevId: 700265162c782739b2bb88300ee3cda3819b2e87
2022-06-08 15:32:27 +00:00
Divi
b7c414a875 ci: add action to release cli-ext binaries
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4342
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 2b7686bda333d977aa20a1ff10f7b3179509eac3
2022-06-07 22:25:41 +00:00
Aravind K P
384756f7be cli: support multiple admin secrets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4566
GitOrigin-RevId: b03008099ec0b053fd24798b2b78d12471ed6fdd
2022-06-03 13:29:56 +00:00
Vishnu Bharathi
0016d3cad5 cli: avoid exporting hasura-specific schemas during hasura init
fixes https://github.com/hasura/graphql-engine/issues/8352

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4178
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: eff7067c34932435207eff794f9435356b55b666
2022-04-25 13:06:52 +00:00
Aravind K P
23f32c3db4 cli: fix performance regression in v2.5.0
closes https://github.com/hasura/graphql-engine/issues/8398

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4313
GitOrigin-RevId: 3f24434b8256ec30838ce0014a04f8dfdca7f0d5
2022-04-21 11:55:12 +00:00
Aravind K P
ff255bd065 cli: support remote relationships metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4274
GitOrigin-RevId: 5a839a39cc47268e8da52d039b91fbc35fec8b13
2022-04-18 11:07:46 +00:00
Vishnu Bharathi
9d15c07a9d cli: expose methods for marking and unmarking migration as applied
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4171
GitOrigin-RevId: cd5a4a7159c89e6e2b9e97c4b187049515637145
2022-04-13 04:54:32 +00:00
Naveen Naidu
d10b862b61 server: fix bugs in clear_metadata code path
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3927
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 6f3457698029af94e9157c23b552ac2034f9c740
2022-04-11 11:25:13 +00:00
Aravind K P
e46777b7ea cli: fix formatting errors in query collection metadata
closes https://github.com/hasura/graphql-engine/issues/7616
closes https://github.com/hasura/graphql-engine/issues/8205

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3955
GitOrigin-RevId: dc97e23e78d522cb7ac4d57ad825526eaa90a4de
2022-03-31 14:02:49 +00:00
Aravind K P
649ef41e3c cli: fix remote schema formatting errors in metadata
closes https://github.com/hasura/graphql-engine/issues/7608
closes https://github.com/hasura/graphql-engine/issues/7459

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3951
GitOrigin-RevId: bad3505c79fab10453580a6a43ad7e71bc2d3753
2022-03-31 08:28:30 +00:00
Vishnu Bharathi
fac5e0b2c3 ci: produce ubuntu and centos flavoured graphql-engine images
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3597
GitOrigin-RevId: f1fded72524f28f41433eea6819276932ee0b5cb
2022-03-22 12:03:25 +00:00
Sooraj
d1cdb9f0ae console: disable search indexing with HTML meta tag [CON-28]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3948
GitOrigin-RevId: 5af852fd7c9c131fc85c05f97c601058c99e6dcc
2022-03-16 05:51:47 +00:00
Vishnu Bharathi
2e04bd5ac2 cli: add support for customization field in sources metadata
closes https://github.com/hasura/graphql-engine/issues/8292

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3954
GitOrigin-RevId: cc27dcffbb71579136a3cae7d99ecd239eb37ed2
2022-03-10 16:47:03 +00:00
Aravind K P
2ff0f25e08 cli: refactor metadataobject package
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3943
GitOrigin-RevId: 4cc8f67dd8b6ba0e78f1c35d415f89bd1b901705
2022-03-10 08:13:50 +00:00
paritosh-08
a0c83b8e99 server: add inconsistency information in reload_metadata API call
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3860
GitOrigin-RevId: 02d1963946d69fdf6886aa61806eb71db60f8931
2022-03-03 13:34:44 +00:00
hasura-bot
19415ada9c cli: fix install script failing when specifying a version
GITHUB_PR_NUMBER: 8248
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8248

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3802
Co-authored-by: Christian van der Leeden <2522744+mccare@users.noreply.github.com>
GitOrigin-RevId: 470f6ab94a5b108f14f762aa49f63ba597a530b5
2022-02-25 13:52:48 +00:00
Divi
d87b961378 cli: fix metadata version being set to 3 for v2 project
closes https://github.com/hasura/graphql-engine/issues/8148

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3619
GitOrigin-RevId: d10b715fc71dcc89bb0874f1c115ad9e562cfd6c
2022-02-23 10:53:22 +00:00
hasura-bot
195c05f14d cli: improve handling of wrapped errors in migrate operations
GITHUB_PR_NUMBER: 7992
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7992

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3259
Co-authored-by: Shoki Hata <37888628+sho-hata@users.noreply.github.com>
GitOrigin-RevId: f93f251fb6de56212f7024eef06e965f85a9182a
2022-02-08 14:30:35 +00:00
Kali Vara Purushotham Santhati
780d942fad cli: skip tls verfication for all API requests when insecure-skip-tls-verify flag is set
closes: https://github.com/hasura/graphql-engine/issues/4926

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3307
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 90222fc2e5b176fbf5721fea3f5b2af929ca93f4
2022-02-04 11:11:37 +00:00
Vishnu Bharathi
f4007596fb tag release v2.2.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3558
GitOrigin-RevId: b4ba6830be191aac6ce9e8e5bef974bd5322260d
2022-02-02 12:49:55 +00:00
Antoine Leblanc
d66d2d81fd server: use placeholder to prevent empty query roots
### Description

The GraphQL spec has to conflicting requirements:
1. an object must contain at least one field: the schema may not contain empty objects
2. the _query_root_ must always be present

Given _1_, the schema generation code removes from the schema all fields that would result in empty objects, such as a table for which a user does not have select permissions. But, as a result, our code also potentially removes _query_root_ if it is empty, breaking _2_.

This PR introduces a dummy "placeholder" field in the query root if it's empty, to ensure we never remove it from the schema.

### Remaining work

- [x] changelog entry
- [x] tests

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/148
GitOrigin-RevId: bfd6bfcc2f3de92900b6ba566012f093399ca037
2022-01-27 18:08:11 +00:00
hasura-bot
f530b3ac6f cli: fix regression with --address flag of hasura console command
GITHUB_PR_NUMBER: 8039
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8039
closes https://github.com/hasura/graphql-engine/issues/8005

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3381
Co-authored-by: Shoki Hata <37888628+sho-hata@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 6ca7c091ebf7c240e97b65fbfc1713cccb5a5b82
2022-01-20 06:41:05 +00:00
hasura-bot
d5e2d613f0 cli: stop using healthz endpoint
GITHUB_PR_NUMBER: 7994
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7994

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3268
Co-authored-by: Romain Briand <183016+romainbriand@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: e034fddaea604ba98797e2d9dcab779b2cc21378
2022-01-14 04:17:41 +00:00
Divi
5723baaab4 cli: fix migrate create command behaviour when no data provided
closes https://github.com/hasura/graphql-engine/issues/7971

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3292
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 4f7e38d649c1f414132d576d0f288ca8d3cdb53d
2022-01-12 16:16:50 +00:00
Kali Vara Purushotham Santhati
695164b176 cli: misc changes
- Hasura CLI shows metadata diff in YAML for type `json` in directory mode. The expected behaviour is to show the diff in JSON
- The unified-json shows diff in YAML, not in JSON.
- Add new diff type unified-yaml which shows the diff in YAML unified format.
- Check the flag value of type in `hasura metadata diff --type`
- The help text of `seed apply`( `hasura seed apply --file seeds/1234_add_some_seed_data.sql`) should be updated to `hasura seed apply --file 1234_add_some_seed_data.sql --database-name default` and similarly in docs.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3246
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1d16ad9ea4dd366af32498ce878ae132bd239be9
2022-01-12 13:25:22 +00:00
hasura-bot
57f38d8d7c Update README.md
GITHUB_PR_NUMBER: 8006
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/8006

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3295
Co-authored-by: Benjamin Kniffler <4349324+bkniffler@users.noreply.github.com>
GitOrigin-RevId: 02c45f3bd91ee4fd5fc77a97f466686127bc6425
2022-01-10 06:21:05 +00:00
Marion Schleifer
5fa2e489e8 improve cli contributing.md
## Description

As discussed with @scriptonist, I went through the instructions on the `CONTRIBUTING.md` file of the CLI. The instructions largely work, but there is one section we need to add. I made a comment.

## Changelog

-  `CHANGELOG.md`:  No changelog is required.

## Affected components

-  CLI

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3185
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 00776de89ef745d24acd74beaebcdc2c11889597
2021-12-29 02:19:27 +00:00
Kali Vara Purushotham Santhati
f0bef2b482 cli: add All option for migrate sub-commands (apply, delete and status) and seed apply command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2509
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 03ee878072b58c6dc7f43af9d26d30a5594d9a50
2021-12-23 15:59:56 +00:00
Vishnu Bharathi
26a69b3821 tag release v2.1.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3175
GitOrigin-RevId: 702444a8adba2817540382396704bcfbad0df228
2021-12-17 12:38:06 +00:00
Vishnu Bharathi
50fb471fae ci: misc fixes and backports
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3165
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
GitOrigin-RevId: a0a509187d9e5e9e913ae7c5d42682c63b7b341f
2021-12-17 07:04:34 +00:00
Aravind K P
96cfacb58b cli: wrap errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3146
GitOrigin-RevId: 5dd78bf9145d3bfc9ff4281239d849e796a36246
2021-12-15 17:55:44 +00:00
Vishnu Bharathi
291de84179 tag release v2.1.0
GitOrigin-RevId: 3456e09d2c096a3a89866f9e92c86605237b9693
2021-12-14 15:38:26 +00:00
Aravind K P
0c7e233125 cli: revert split remote schema permissions metadata into seperate files
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3123
GitOrigin-RevId: f327c7324edd66e1f57fafe7703c3318e1362049
2021-12-14 05:08:08 +00:00
hasura-bot
b3228150e8 Use proxy if env vars set (close #7781)
GITHUB_PR_NUMBER: 7796
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7796

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2814
Co-authored-by: Rob Hayes <3910392+robhayesmba@users.noreply.github.com>
GitOrigin-RevId: b01e8f7e91f36cf1b5bfb9c078a4744f71c34f17
2021-12-13 04:17:08 +00:00
Kali Vara Purushotham Santhati
8c41ff539a cli: enhance metadata diff command
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2581
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 327c26868102ea1c277b795b9f508847faa2ae8b
2021-12-09 17:26:53 +00:00
Aravind K P
048471bdc0 cli: stop parsing unnecessary fields from config API
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2899
GitOrigin-RevId: 99dacb9dcbc6f1093b01aefbf7cbdc975d47569e
2021-12-09 12:52:21 +00:00
Vishnu Bharathi
a835d95b17 tag release v2.1.0-beta.3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3099
GitOrigin-RevId: 7aa2926871bd44d80490768f86fab7bac02a7758
2021-12-09 11:28:19 +00:00
Kali Vara Purushotham Santhati
4edc723d64 cli: codesign the cli binaries
closes https://github.com/hasura/graphql-engine/issues/7147

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2100
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1816493b6cdf1b00b267ee8852c7b8a7c5fc3ee9
2021-12-02 10:21:30 +00:00
Kali Vara Purushotham Santhati
b21a86937a ci: increase golang linter timeout
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3020
GitOrigin-RevId: 500e6e0c427ce6274ddeb2a9bd89b6ee175f2f9f
2021-12-01 10:01:11 +00:00
Kali Vara Purushotham Santhati
b312ca1596 ci: check lint errors before building oss-cli and pro-cli
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2665
GitOrigin-RevId: dac1c8f7137ff4826a3155fb78c99fc1341a8583
2021-11-15 11:04:25 +00:00
hasura-bot
52efcc208d cli: allow specifying api hostname in console command
GITHUB_PR_NUMBER: 7519
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7519

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2311
Co-authored-by: CJ Lazell <1819+cj@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: f5f2eb2ebf0eaa9f67f0f924003e839108e4034f
2021-11-15 07:16:37 +00:00
hasura-bot
bc10d9eb1c cli: fix changelog hyperlink in the log message
GITHUB_PR_NUMBER: 6936
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6936

closes https://github.com/hasura/graphql-engine/issues/6682

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1365
Co-authored-by: pow-devops2020 <69558219+pow-devops2020@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: fbf66ea7e4abe0be8684b8e6cc7361f14a6faea0
2021-11-11 10:56:16 +00:00
Kali Vara Purushotham Santhati
7d26e86fa1 cli: fix cli-console failing to add migrations if there are tabs in SQL body
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2822
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 1036a177e81a24ac4d047b56aead42d297682c14
2021-11-10 12:36:35 +00:00
Aravind K P
97134b4d44 cli: defer validating plugins index and actions codegen repo
closes https://github.com/hasura/graphql-engine/issues/7695

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2647
GitOrigin-RevId: 675f8daa3a329f4159103178faf225e642acdb13
2021-11-10 09:22:06 +00:00
Rikin Kachhia
d98c83c3a9 cli: add example for --from-table specifying schema for seed create
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2797
GitOrigin-RevId: d53a2bae6ca304c7b4d85a1796bfde6192c24d7a
2021-11-08 13:32:09 +00:00
Tirumarai Selvan
1b43f0caaa tag release v2.1.0-beta.2
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2762
GitOrigin-RevId: 092e3fee604f9620198128a8c8aced434a20644e
2021-11-08 09:26:08 +00:00
Aravind K P
50d8448403 cli: fix actions transforms test
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2754
GitOrigin-RevId: 442ce3a279f598e175ab28223db3ccf68b20b706
2021-11-03 17:44:12 +00:00
Aravind K P
bea2855b88 cli: support request_transforms in actions metadata
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2738
GitOrigin-RevId: b125043dbb9321aa8319a6dcd6e1cd6a21f4dfe1
2021-11-03 06:38:48 +00:00
Tirumarai Selvan
bcb386e7fd tag release v2.0.10 (#2646)
Co-authored-by: Vishnu Bharathi <vishnubharathi04@gmail.com>
GitOrigin-RevId: d6a8802cf4db8f852bdabe92ffa81854fe594186
2021-10-20 09:55:17 +00:00
Kali Vara Purushotham Santhati
1e5a48286f cli: split remote schema permissions metadata into seperate files
closes https://github.com/hasura/graphql-engine/issues/7033

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1877
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 3764db9102d41f67a43f76aa79d28eb5485579ca
2021-10-14 06:52:57 +00:00
Kali Vara Purushotham Santhati
94a3be3e6e cli: fix lint errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1749
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 4515f7f2c58b7f28645b2c5a5d9842aa7a844eae
2021-10-13 14:39:15 +00:00
Vishnu Bharathi
5e77973ecd cli: use docker auth config to avoid docker rate limiting in CI
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2580
GitOrigin-RevId: 4365a93d14558e858d04794fd2affc88ffe6e821
2021-10-13 01:57:38 +00:00
Kali Vara Purushotham Santhati
e3fa6bee0a cli: improve error/log messages
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2513
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: bff6e5f6d3553904914eabda02d3406c4b779f3c
2021-10-08 16:10:31 +00:00
hasura-bot
744cf0233e cli: support absolute paths in --envfile
GITHUB_PR_NUMBER: 5768
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5768
closes https://github.com/hasura/graphql-engine/issues/5689

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2545
Co-authored-by: cybai <6782666+CYBAI@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 38eacaaa5541a7162b584f1df1376266853fe4bf
2021-10-08 14:44:48 +00:00
Kali Vara Purushotham Santhati
bcb0b99f8b cli: make --database-name optional in migrate subcommands when using a single database
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2428
GitOrigin-RevId: 2319408773b1c73bca6297c7b22dc3db82775953
2021-10-08 13:30:12 +00:00
Kali Vara Purushotham Santhati
f47095ff55 cli: init --endpoint intializes the project with metadata and migrations from HGE
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2409
Co-authored-by: Ajay Tripathi <24985760+atb00ker@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 06bb3462ffe1604b80a4afde241568790aaa6704
2021-10-07 14:24:52 +00:00
Tirumarai Selvan
b0f723b201 tag release v2.1.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2472
GitOrigin-RevId: b18f755b8db82ee6376d9af02495fe55cfd93aa8
2021-09-30 09:48:30 +00:00
Aravind K P
61e069ad8a cli: allow specifiying a "to" version on migrate squash command
closes https://github.com/hasura/graphql-engine/issues/7472

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2442
GitOrigin-RevId: d804d04e0b87fc33c25407ff3991f266b0d6a6aa
2021-09-29 17:47:25 +00:00
Aravind K P
186baa7915 cli: add support for metadata subcommands to work with json/yaml files
closes https://github.com/hasura/graphql-engine/issues/7542

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2445
GitOrigin-RevId: c0087fa475cf4b353f4af150629684d3b9e1f82f
2021-09-29 11:13:31 +00:00
hasura-bot
20f7c85382 cli: add deploy command (close #7349)
GITHUB_PR_NUMBER: 7426
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7426

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2173
Co-authored-by: Ajay Tripathi <24985760+atb00ker@users.noreply.github.com>
Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1030d24c9e6c7d0c7062b6f0e98f8464950529d3
2021-09-29 06:15:17 +00:00
Aravind K P
5011955f73 cli: support query_tags in metadata
closes https://github.com/hasura/graphql-engine-mono/issues/2261

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2347
GitOrigin-RevId: 30d461c0b70f4a4924496d9c3f53cb73a658093a
2021-09-28 17:05:48 +00:00
Kali Vara Purushotham Santhati
d87f7abd02 cli: throw user friendly errors when server is unreachable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2369
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: af635612948822ae7ea9eb7b7b79d7d4f147e0e6
2021-09-27 14:53:44 +00:00
Vishnu Bharathi
2165736497 ci: complete the CLI pipeline in buildkite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2437
GitOrigin-RevId: 0b3cd970be1e814df7d679979af6aa09d95c21cd
2021-09-27 13:35:04 +00:00
Aravind K P
566b441b12 cli: remove config v1 specific logic from migrate squash
https://github.com/hasura/graphql-engine-mono/pull/2381

Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
GitOrigin-RevId: 42db5ea7ecd46838b5f2b266beca48e5af040bb9
2021-09-24 12:06:11 +00:00
Kali Vara Purushotham Santhati
ffce0d266b cli: non zero exit code if any of the database migrations aren't applied
Issue: https://github.com/hasura/graphql-engine/issues/7499

Problem: cli doesn't exit if `migrate apply --all-databases` fail on 1 or more databases

Solution: Store the names of the databases for which it failed and return
```
operation failed on : <database1>,<database2>,etc
```

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 8a30bdcc24de8a204320b00e5ea9d593a6293ad4
2021-09-23 06:50:25 +00:00
Kali Vara Purushotham Santhati
40c3d08d4a cli: migrate apply progress bar improvements
https://github.com/hasura/graphql-engine-mono/pull/2356

GitOrigin-RevId: 181db6e14ffd08083a1ffc97bf2e0e578f3da0fc
2021-09-22 12:53:43 +00:00
Kali Vara Purushotham Santhati
24d9bbcd93 cli: apply the migration after creating for flag --from-server
Issue: https://github.com/hasura/graphql-engine/issues/7510

Problem:

- To mark the migration applied after creating the migration from the server with skip-execution flag

Solution:

After creating migration apply it with skip-execution true

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 72eca352b76afe3a19d2198169b31284e38af07a
2021-09-22 11:48:29 +00:00
Kali Vara Purushotham Santhati
4cf13762e2 cli: add support for network metadata object
Issue: https://github.com/hasura/graphql-engine/issues/7520

Problem: add support for network metadata object

Solution: add new network.yaml which consists of network metadata and in code add new network metadata object

Metadata.json
```
{
  "resource_version": 6,
  "metadata": {
    "version": 3,
    "sources": [
      {
        "name": "default",
        "kind": "postgres",
        "tables": [],
        "configuration": {
          "connection_info": {
            "use_prepared_statements": true,
            "database_url": {
              "from_env": "HASURA_GRAPHQL_DATABASE_URL"
            },
            "isolation_level": "read-committed",
            "pool_settings": {
              "connection_lifetime": 600,
              "retries": 1,
              "idle_timeout": 180,
              "max_connections": 50
            }
          }
        }
      }
    ],
    "network": {
      "tls_allowlist": [
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "www.google.com"
        },
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "play.golang.com"
        },
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "hasura.io"
        }
      ]
    }
  }
}
```
network.yaml
```
tls_allowlist:
- suffix: null
  permissions:
  - self-signed
  host: www.google.com
- suffix: null
  permissions:
  - self-signed
  host: play.golang.com
- suffix: null
  permissions:
  - self-signed
  host: hasura.io

```

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

GitOrigin-RevId: ef508ae946dc5c7c5bcb4a9a3ccb982394ae8639
2021-09-22 08:12:46 +00:00
hasura-bot
b50c4aee1d cli: install v2.0.9 by default instead of v2.0.6
GITHUB_PR_NUMBER: 7575
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7575

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

Co-authored-by: Tyler Breisacher <244381+MatrixFrog@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: afc8c5cc178e16deb89046d1df4d80fafea69147
2021-09-20 05:56:17 +00:00
Antoine Leblanc
e2ce1972f6 Prevent empty subscription roots (fix hasura/graphql-engine#6898)
### Description

We always build a subscription root, even when there was no possible fields. This breaks some third party clients, as the spec does not allow empty types in the schema. This PR fixes this by changing the `buildSubscriptionParser` helper to return a `Maybe` value, and harmonizes / cleans places where we build the subscription root.

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

GitOrigin-RevId: 1aeae25e321eee957e7645c436d17e69207309fd
2021-09-16 07:42:46 +00:00
Kali Vara Purushotham Santhati
54e0e0264b cli: make progress bar render properly on all emulators and add progress bar-logs flag to get logs on CI
Issue: https://github.com/hasura/graphql-engine/issues/4795

Problem:
- Hasura CLI displays many lines of progress bar logs in CI which is not needed by many users ( not needed as default behaviour)
- The progress bar won't render properly on all the terminal emulators

Solution:
 - [x] change the default behaviour of the progress bar to display it only in terminal mode
 - [x] add new flag `progressbar-logs` which sets the width of progress bar to render
 - [x] hard set the terminal value as true so that the return symbol will be carriage return

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 0efe141050d0804c679cec5fdf2ac4d49a16d78d
2021-09-14 14:28:52 +00:00
Vijay Prasanna
1afd38f887 console: add source attribute to make migration action
https://github.com/hasura/graphql-engine-mono/pull/2213

Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
GitOrigin-RevId: 3cf65f0062005d23aa264da744dc680417275add
2021-09-14 06:49:57 +00:00
hasura-bot
ff8e76d1b7 [Hasura CLI]: fix possible typo "depricated" to "deprecated"
GITHUB_PR_NUMBER: 7527
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7527

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

Co-authored-by: José Moreira <3604053+cusspvz@users.noreply.github.com>
Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: df04785e2e6104352dc7e3c703e6116ab60cc093
2021-09-10 04:55:52 +00:00
Kali Vara Purushotham Santhati
58d0a1e29f cli: send error to telemetry
closes https://github.com/hasura/graphql-engine-mono/issues/2093

Problem:
 - [x] Send errors to telemetry
 - [x] send flags along with the command to telemetry

Solution:
 - Added Error field in the data struct and if there is an error then the error will get copied to the field
 - Use Visit fn in cobra for getting the flag names which are set and append the flag-names to command

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

GitOrigin-RevId: bd28c2e83e039a4eb8d7fe0d2b7646d0c982c91b
2021-09-08 08:56:54 +00:00
Kali Vara Purushotham Santhati
b75ab7233e cli: fix data-race warnings
#### Issue: https://github.com/hasura/graphql-engine-mono/issues/2179

### Problem:

1. There are few warnings when tests are executed with cli if it is built with `race` flag
It is because of a race condition between stdin in migrate_delete for the prompt and stdout for other commands.

2. The integration test of the console used to behave as follows:
    ```
     - Initially there won't be any wg.adds in wait-group so the second go-routine created in console-test (integration-test)
     - It will send the interrupt signal to the channel before the server has been started
     - So practically the server won't start
    ```
3. The read and write for consoleopts.WG has been happening in different go-routines without control or lock system(reading and writing into same memory location without lock system). So there is a chance of data-race(warning for data-race while integration tests are executed)
4. Data-race errors from `promptui` package

### Solution:

1. Use `--force` flag to avoid getting the input from the prompt in `migrate_delete_test.go`
2. Introduced two fields in server and console opts to let know other go-routines whether the server has been started or not
3. To avoid data-race above which are shared b/w go-routines to know the status of servers has been operated atomically.
4. using new package https://github.com/AlecAivazis/survey

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

GitOrigin-RevId: 387eb1be74f24dda34bb3588314b5a909adac227
2021-09-07 13:34:54 +00:00
Tirumarai Selvan
4cabb0bdf9 tag release v2.0.9
GitOrigin-RevId: dfba245a4dbe1a71b1e3cc7c92914fc0a919c2b0
2021-09-07 07:49:53 +00:00
Vishnu Bharathi
2329c16ce9 cli: embed cli-ext as exe in case of windows
https://github.com/hasura/graphql-engine-mono/pull/2295

Co-authored-by: Kali Vara Purushotham Santhati <72007599+purush7@users.noreply.github.com>
GitOrigin-RevId: 16a03d33d5bf4d45a71ba79b3b775fba3176a1e8
2021-09-07 06:01:00 +00:00
Kali Vara Purushotham Santhati
b50df8a24b cli: add progress bar to migrate apply
https://github.com/hasura/graphql-engine-mono/pull/1673

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 59b8258557b2769853d0ca64032f453780a3cd7e
2021-08-31 09:57:32 +00:00
Tirumarai Selvan
9d592fde87 tag release v2.0.8
GitOrigin-RevId: 7e2c6333183ebf763ff37bda114219f5e7bf0951
2021-08-30 12:43:41 +00:00
Aravind K P
39f5d04ba8 cli: optimize state copy
https://github.com/hasura/graphql-engine-mono/pull/2176

GitOrigin-RevId: 71f72704c3097ee05f3adca954b4c283701cf5e9
2021-08-26 06:09:55 +00:00
Kali Vara Purushotham Santhati
c6d47a7db3 cli: use server metadata as base for comparison in metadata diff
Reference: https://hasurahq.slack.com/archives/C024GF6FCTH/p1629193174042700

Problem: The `metadata diff` is conventional where it takes the project metadata and w.r.t to the signs `---`, `+++`, it shows the diff output but it is not similar to git diff as taking the remote repo as base and `+` denotes it has, `-` not. So make the metadata diff output follow as git diff output

Solution: To change the order of arguments in diff function and assign `---` to server,`+++` to project, so that it will be similar to prev diff output

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

GitOrigin-RevId: bf35b5a3ef835fc64f590b65160c01c9a8c1382a
2021-08-24 03:25:05 +00:00
Vishnu Bharathi
cf6f3edc1f tag release v2.0.7 (#2118)
GitOrigin-RevId: b86611a3393d2b8008b09c1d833d5b2c43f72aaf
2021-08-17 13:07:37 +00:00
Aravind K P
f2e74da5aa cli: improve cli package error propogation in migrate operations
https://github.com/hasura/graphql-engine-mono/pull/1887

GitOrigin-RevId: 40c7e1a16e8dd25a46e0c58afc7cbc9169af8f0b
2021-08-16 06:44:05 +00:00
Tirumarai Selvan
7b863a1b3b tag release v2.0.6
GitOrigin-RevId: b2b906cf7b05bc444148a334aba42385046be75c
2021-08-11 01:19:22 +00:00
Kali Vara Purushotham Santhati
4d7aa0e105 cli: fix query endpoint construction
closes https://github.com/hasura/graphql-engine/issues/7196

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

GitOrigin-RevId: ab7c765d4de710dd08f48dc1bfb94eb606ac5d3f
2021-08-09 08:41:16 +00:00
Tirumarai Selvan
553aecb5e5 tag release v2.0.5
GitOrigin-RevId: 8c98e9dba9fa655b5d7503211a5d3f42f641cef5
2021-08-05 07:35:10 +00:00
Divi
28788f4b0b cli: add VERSION env to pin cli version
https://github.com/hasura/graphql-engine-mono/pull/1845

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: f12ab6ef5a3aa1ee5181f5ddbf16f7232ef2874e
2021-07-29 09:21:57 +00:00
Divi
80846d36b7 cli: add support for query_tags metadata object
- add support for query_tags metadata object
- fix filename for cron_triggers metadata object

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d9266d723f06d11d92f156f70660e0122412e41a
2021-07-29 07:22:25 +00:00
Kali Vara Purushotham Santhati
ca567bf8cb cli: enhance e2e tests
- actions use-codegen
    - Assert if starter kit files are created
- metadata apply
    - Assert server metadata after apply
    - assert that --dry-run flag will not modify metadata on server
- metadata clear
    - Assert with server metadata that operation was successful.
- metadata inconsistency drop
    - Assert with server metadata that operation was successful.
- metadata inconsistency status
    - Assert for all possible states
- metadata reload
    - Assert effect of operation with server
- migrate and seed subcommands
    - Add tests for MSSQL sources
    - Structure tests in such a way that it’s easy to add tests for new sources

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: fcdbb806d105978a07487a40f7fa6e16b3ab8816
2021-07-28 06:45:03 +00:00
Aravind K P
33d6025a20 cli: refactor metadata object interface
https://github.com/hasura/graphql-engine-mono/pull/1618

GitOrigin-RevId: f4559de4852f247de35604be3808f05fe5ed341a
2021-07-23 09:50:36 +00:00
Kali Vara Purushotham Santhati
2aeb6ad0b1 cli: use absolute path of project directory
closes https://github.com/hasura/graphql-engine/issues/7089
closes https://github.com/hasura/graphql-engine/issues/6499

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 74209e249c692d01f2bd849181c8a2ef46493e74
2021-07-16 12:59:04 +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
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
Aravind K P
e99c012af6 cli: expose method to get iconsistent metadata objects
https://github.com/hasura/graphql-engine-mono/pull/1725

GitOrigin-RevId: 68c64369dcc950def19bf773ab1bc95226ebcdd4
2021-07-06 09:37:28 +00:00
hasura-bot
621029b4ed cli: make cli-ext to be usable in the cli library
GITHUB_PR_NUMBER: 7099
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7099

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

Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 610215142cadfab76fd8368c28a125f46da5e759
2021-06-27 13:50:20 +00:00
Aravind K P
be7a100ebf cli: set default value for metadata_directory
https://github.com/hasura/graphql-engine-mono/pull/1630

GitOrigin-RevId: bb18133041739d30f5b270c3f64aeb680e47c2cd
2021-06-23 06:34:19 +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
hasura-bot
e640000a09 cli: skip compression for macos x64 binary
GITHUB_PR_NUMBER: 7096
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7096

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

Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 7234dc7d6bb4f4f62437a77824ce7904d3029f24
2021-06-22 08:05:16 +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
Kali Vara Purushotham Santhati
fbbd423d8b cli: migrate create gives warning if database isn't connected to server
https://github.com/hasura/graphql-engine-mono/pull/1518

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: a9e836545922719bcbd6e8c9c027df6056d23cef
2021-06-21 13:55:09 +00:00