Commit Graph

119 Commits

Author SHA1 Message Date
Toan Nguyen
22d515dcb6 cli: introduce BigQuery source
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5766
Co-authored-by: Mohd Bilal <24944223+m-Bilal@users.noreply.github.com>
GitOrigin-RevId: 1bd4718dbf7b0368e99e5d7c6dd08f362dbf5c2b
2023-02-13 08:31:42 +00:00
Mohd Bilal
094b5e6db2 cli: Support migrations for Cockroach DB in CLI Console
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7550
GitOrigin-RevId: eb9d6c8dae1c1f7980df45f5080f8d7cab8791c9
2023-01-19 10:51:17 +00:00
Rikin Kachhia
50a5462857 cli: improve log messages to highlight database names
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7363
GitOrigin-RevId: 2b58511c374ee4d93a202e23c87c48b54ec363a6
2023-01-09 08:03:13 +00:00
Mohd Bilal
06b7952149 cli: refactor migrate/migrate.go to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7232
GitOrigin-RevId: 51ed7ae004957d94568e16c8309920a5960cbc0d
2022-12-28 13:30:16 +00:00
Mohd Bilal
c35add2a9c Revert "cli: refactor migrate/migrate.go to use internal/errors"
Reverts hasura/graphql-engine-mono#7005

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7228
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d35202ee97b51db61c4598bb1a42e9551b1a89e3
2022-12-12 14:04:28 +00:00
Mohd Bilal
a2fb3de1ce cli: refactor migrate/migrate.go to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7005
GitOrigin-RevId: ee70ef351ed1915adef5b865773a2210c7dd1073
2022-12-12 12:48:49 +00:00
Mohd Bilal
c55cca3061 cli: refactor migrate/ to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7006
GitOrigin-RevId: bfa2be15cef0460b32576e8297cfa177ed59031a
2022-11-23 17:15:19 +00:00
Mohd Bilal
11484f5699 cli: refactor migrate/source/file, migrate/source/stub and migrate/stub/testing to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6666
GitOrigin-RevId: db16b44d5abe3d63357a5806a0c479a6fc690a01
2022-11-17 14:27:20 +00:00
Mohd Bilal
1538490bdd cli: refactor migrate/database/hasuradb package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6514
GitOrigin-RevId: c4d83b28d8550f61167b6f4270166b9513f89891
2022-11-02 06:14:46 +00:00
Mohd Bilal
5cffe3d723 cli: refactor migrate/source package to use internal/errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6512
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: ea3fd23e2783a2934eda061c31aed82a69f691f4
2022-10-31 10:17:15 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
Aravind K P
3136ffad1b cli: update go.mod
>

### Description
Update `go.mod` to allow other packages to import [v2.0.0 versions](https://blog.golang.org/v2-go-modules).

### 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] CLI

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

GitOrigin-RevId: a5d17ad20289d1cd7217763f56ef3ba6552d69c4
2021-06-16 11:45:07 +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
Aravind K P
ea6a2c9a14 cli: config v3 update script improvements
GitOrigin-RevId: cbd80af1334916e6d5af54a925a14b3849034646
2021-05-28 06:05: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
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
Kali Vara Purushotham Santhati
489835eb36 cli: metadata apply,export enhancements
- modified the `dry-run` flag of metadata apply command.
- added new flag `o` which takes "json" or "yaml" as parameters for metadata apply command.
- added new flag `o` which takes "json" or "yaml" as parameters for metadata export command. It outputs the metadata from server to stdout in form of  json or yaml and won't change the project's metadata.
- added deprecation warnings for `--from-file` flag
- added info message for describing change of behavior of `--dry-run` flag
- v3 metadata objects like `rest_endpoints` was also added to list of metadata objects in config v2 (fix)
- the order in which metadata objects are appended to metadata objects list matter when using `--dry-run` flag, refactored this order to match server metadata.
- `metadata apply` command can now accept json/yaml metadata from io pipe
- config v3 `metadata apply` didn't show any information to user when applied metadata is inconsistent, this is addressed.
- removed `github.com/ghodss/yaml` dependency from repo
- version metadata object was added twice during intialization (fix)

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 2316f519eb40645efd86ffee2a85d3c90543ec17
2021-05-14 19:09:59 +00:00
Aravind K P
7638d1832a cli: add support for bigquery
GitOrigin-RevId: 8d479cbd056ee839b11ae24557085573b3e5b5ba
2021-04-19 07:06:18 +00:00
Kali Vara Purushotham Santhati
214e5363a6 cli: separate action operations from migrate driver
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 166de18b2ca3fd83ad6c0f471e0af2c8f22206d0
2021-04-12 17:28:32 +00:00
Aravind K P
7f420ad1ae cli: add --all--databases flag on migrate apply
GitOrigin-RevId: 87a8b4250abad349153d1af73917859bd8f2a31a
2021-04-01 12:59:20 +00:00
Aravind K P
cc3539415b cli: fix seeds incorrectly being applied to databases
GitOrigin-RevId: cce2612ddfd90d1fd10a0a3561d24c64569a6935
2021-04-01 10:39:53 +00:00
Kali Vara Purushotham Santhati
b875d95a75 cli: separate the metadata operations from migrate driver
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 8f6791d5fd51d011623361ac2f5994c8badb50bf
2021-04-01 05:14:17 +00:00
Aravind K P
a9e78b267f cli: fix issue with adding operation to allow list in console mode
GitOrigin-RevId: 6f5d1e4e103e3a219bbfe1fb1ff213aa9e3fd521
2021-03-18 06:11:56 +00:00
Aravind K P
4abc2061fe cli: support inherited roles in metadata
GitOrigin-RevId: f70f199e8ef5c9b859250673bcb7de766400748c
2021-03-09 20:21:03 +00:00
Aravind K P
f6ca551df4 cli: support mssql sources
GitOrigin-RevId: 4b1a63c8dc342ae4001b16c4b1dce282092d5c6f
2021-03-08 12:00:34 +00:00
Kali Vara Purushotham Santhati
6d04f587b4 cli: follow symlinks in migrations directory
GitOrigin-RevId: 66840f2b087be3c7660115c5e7158574997f0292
2021-03-05 17:14:17 +00:00
Kali Vara Purushotham Santhati
f998fc089e cli: add API docs
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 1cbcba2d458d82814703682c63b1f0f7bf6226bc
2021-03-05 11:57:55 +00:00
Aravind K P
c8e08e2804 cli: support rest endpoints
GitOrigin-RevId: cd32497fb751489d9b17e91e30e18772f7fa07ec
2021-03-05 03:22:59 +00:00
Aravind K P
8996bcf70d cli: use v2 replace_metadata in config v3
GitOrigin-RevId: b0263799a17052195ebf295516c3105c5c80ce74
2021-02-18 05:37:46 +00:00
Aravind K P
cb029c317b cli: refactor datasource -> database
GitOrigin-RevId: 89bb1fbac0848d833678e33e98b5d558917c13ea
2021-02-17 12:52:37 +00:00
Aravind K P
a0995d1b30 cli: add client package, statestore implementations, deprecate config v1
GitOrigin-RevId: 5a1d9cb772ac62603f2543bfe6c01a95c0a035c6
2021-02-17 04:21:11 +00:00
Aravind K P
8ec92cc198 cli: config v3 project metadata directory
GitOrigin-RevId: c2dce9ca1f37688eecb7eb78c97944ac96d81d54
2021-02-16 06:26:24 +00:00