Commit Graph

220 Commits

Author SHA1 Message Date
jkachmar
576b07db28 ci,server: upgrades to GHC 8.10.7 and reworks server builder image
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2727
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: Swann Moreau <62569634+evertedsphere@users.noreply.github.com>
Co-authored-by: Robert <132113+robx@users.noreply.github.com>
GitOrigin-RevId: 0779ab7755fd4bdb7ed1551629b2c01d99c5ccf0
2021-11-15 13:22:39 +00:00
Vishnu Bharathi
df143cf048 ci: init release graphql-engine oss pipeline on buildkite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2652
GitOrigin-RevId: 91a57792d8bc0657b8d206678814e9c7ff270817
2021-11-11 04:41:45 +00:00
Puru Gupta
504f13725f server: forward auth webhook set-cookies header on response
>

High-Level TODO:

* [x] Code Changes
* [x] Tests
* [x] Check that pro/multitenant build ok
* [x] Documentation Changes
* [x] Updating this PR with full details
* [ ] Reviews
* [ ] Ensure code has all FIXMEs and TODOs addressed
* [x] Ensure no files are checked in mistakenly
* [x] Consider impact on console, cli, etc.

### Description
>
This PR adds support for adding set-cookie header on the response from the auth webhook. If the set-cookie header is sent by the webhook, it will be forwarded in the graphQL engine response.

Fixes a bug in test-server.sh: testing of get-webhook tests was done by POST method and vice versa. To fix, the parameters were swapped.

### Changelog

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

### Affected components

- [x] Server
- [ ] Console
- [ ] CLI
- [x] Docs
- [ ] Community Content
- [ ] Build System
- [x] Tests
- [ ] Other (list it)

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

### Solution and Design
>

### Steps to test and verify
>
Please refer to the docs to see how to send the set-cookie header from webhook.

### Limitations, known bugs & workarounds
>
- Support for only set-cookie header forwarding is added
- the value forwarded in the set-cookie header cannot be validated completely, the [Cookie](https://hackage.haskell.org/package/cookie) package has been used to parse the header value and any unnecessary information is stripped off before forwarding the header. The standard given in [RFC6265](https://datatracker.ietf.org/doc/html/rfc6265) has been followed for the Set-Cookie format.

### Server checklist

#### Catalog upgrade

Does this PR change Hasura Catalog version?
- [x] No
- [ ] Yes
  - [ ] Updated docs with SQL for downgrading the catalog

#### Metadata

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

#### GraphQL
- [x] No new GraphQL schema is generated
- [ ] New GraphQL schema is being generated:
   - [ ] New types and typenames are correlated

#### Breaking changes

- [x] No Breaking changes

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2538
Co-authored-by: Robert <132113+robx@users.noreply.github.com>
GitOrigin-RevId: d9047e997dd221b7ce4fef51911c3694037e7c3f
2021-11-09 12:01:31 +00:00
Robert
44977bdf9d ci: stabilize server-upgrade-downgrade test on buildkite
fixes https://github.com/hasura/graphql-engine-mono/issues/2635

The test is running postgres via docker compose, but wasn't waiting
for postgres to be ready, which is likely what caused intermittent
failures when trying to clean metadata.

Also make indentation consistent.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2670
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 5a4c03c3c05322695ee9ff9a49efc834dea37074
2021-10-25 12:28:50 +00:00
Divi
ed589f442d ci: add ci builder images jobs to buildkite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2573
GitOrigin-RevId: 94038eba9ec77da5ac61551322861a6324682dad
2021-10-14 12:20:08 +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
Abby Sassel
a9e3a1b4bd server/bigquery: improve test setup and documentation (close #2345)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2495
GitOrigin-RevId: ef250a0796200be6b75363b4275eb8a7ae780154
2021-10-12 17:59:44 +00:00
Karthikeyan Chinnakonda
64e2201179 server: enable inherited roles by default
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2325
Co-authored-by: Nicolas Beaussart <7281023+beaussan@users.noreply.github.com>
GitOrigin-RevId: 8ad6fe25a3788892128c1d56b8fa0e8feed2caca
2021-10-05 12:29:32 +00:00
Vishnu Bharathi
2bc9a3b92e ci: add server test jobs in buildkite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2416
GitOrigin-RevId: 5c4b58255447135f7f1e91ef7b3cb1ef1a8f347f
2021-09-29 04:56:02 +00:00
Antoine Leblanc
9bae641ac4 Always enable inherited roles tests
### Description

The inherited roles integration tests were behind a flag, and its corresponding fixture, presumably to avoid enabling the option globally. However, #2288 introduced a new test using inherited roles that was not gated behind the flag, which fails when run with `dev.sh`. However, that test works on CI... because inherited roles are globally enabled there.

Consequently, this PR:
- globally enables inherited roles in dev.sh
- removes the flag and the associated fixture

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

Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: ebfa6754873324bed15b2cc5e37ec2d8008e8f8d
2021-09-16 06:24:54 +00:00
Divi
2d8daf20dd ci: create non-root user hasura in graphql engine docker images
https://github.com/hasura/graphql-engine-mono/pull/2307

GitOrigin-RevId: 30aafbc5645b7528ab23482a07deca7ed3c97f9d
2021-09-14 08:18:20 +00:00
Anon Ray
dc1ac69dac server: add parameterized query hash for websocket logs
https://github.com/hasura/graphql-engine-mono/pull/2061

Co-authored-by: Naveen Naidu <30195193+Naveenaidu@users.noreply.github.com>
GitOrigin-RevId: bf26b804d93b19ef7fc15c71fec80fb6d6632e64
2021-09-06 12:27:48 +00:00
Abby Sassel
1e7ab8665d server/bigquery: fix data source references & pytest filter in CI
https://github.com/hasura/graphql-engine-mono/pull/2169

GitOrigin-RevId: a0a7190a404ee558a965e06fe1a022953f6f5a10
2021-08-26 18:12:05 +00:00
hasura-bot
50a9dae13b server/bigquery: run tests in CI
GITHUB_PR_NUMBER: 7398
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7398

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

Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 8a20401040c0ca216f8c3c2416243ff4a92b166d
2021-08-19 09:05:45 +00:00
Divi
20b2814a02 ci: add job to build and push base image
https://github.com/hasura/graphql-engine-mono/pull/1924

GitOrigin-RevId: dd402886e67a535aa90afa13f8d9714d92a5daf7
2021-08-19 09:01:51 +00:00
hasura-bot
5c99cebc28 ci: fix test_oss_server_upgrade job
GITHUB_PR_NUMBER: 7403
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7403

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

Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
GitOrigin-RevId: 6d88563445a5d1dc9f1aff0ea1465f04cac07cdb
2021-08-17 12:25:58 +00:00
Divi
ed90bc50f4 add procps package to server builder image
https://github.com/hasura/graphql-engine-mono/pull/2109

GitOrigin-RevId: a687ab86be3db9882a2b4dc963df63d9be9bc0a0
2021-08-16 19:42:36 +00:00
Abby Sassel
6b3db83737 server/bigquery: run tests in CI
server/bigquery: run tests in CI #1525

[Example of successful BigQuery test job](https://app.circleci.com/pipelines/github/hasura/graphql-engine-mono/15951/workflows/86deb614-ddbc-4df5-9af3-288eeff6504a/jobs/283568)

TODO:
- [ ] I'll make corresponding changes in the OSS repo once this is merged
- [ ] @scriptnull or anyone with permissions: to require in CI

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

GitOrigin-RevId: d4ba446e9b13d213de135c73bb72973478575a29
2021-08-12 16:48:29 +00:00
pranshi06
d179a6f2ec server: support EdDSA keys for JWT
https://github.com/hasura/graphql-engine-mono/pull/1818

Co-authored-by: paritosh-08 <85472423+paritosh-08@users.noreply.github.com>
Co-authored-by: Puru Gupta <32328846+purugupta99@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: aae87d34cd19c97e66721a2bd7602d907aeb90b3
2021-08-12 01:54:06 +00:00
hasura-bot
1633160e36 ci: add mssql config to test_console job
GITHUB_PR_NUMBER: 7382
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7382

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

Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 6a9c54afa71712eb37e9d12ae7ab68a4edc64911
2021-08-11 06:32:45 +00:00
awjchen
046da3caca Combine oss and pro server configuration
https://github.com/hasura/graphql-engine-mono/pull/1983

GitOrigin-RevId: 91069bd5d1f9c5a166eae2317cf4435220b472b0
2021-08-11 04:19:27 +00:00
Karthikeyan Chinnakonda
06f5e4fb77 server: inherited roles for mutations, remote schemas, actions and custom functions
https://github.com/hasura/graphql-engine-mono/pull/1715

GitOrigin-RevId: 4818292cff8c3a5b264968e7032887a1e98b6f79
2021-08-09 10:21:05 +00:00
Brandon Simmons
0d4a65f73a ci: don't build non-release with enable_coverage, so perf is comparable
https://github.com/hasura/graphql-engine-mono/pull/1980

GitOrigin-RevId: 76ac1ad91025715d0725d3d586e5ab620e94d77a
2021-08-03 16:13:51 +00:00
Karthikeyan Chinnakonda
cb29607833 server: fix mutations bug when inherited roles is enabled
https://github.com/hasura/graphql-engine-mono/pull/1989

GitOrigin-RevId: d4e41431fdf90426651dd1289eb0f0e099de95b9
2021-08-03 11:12:01 +00:00
Aravind K P
899e4bab60 Revert "ci: push cli-ext binary to cdn on tag release"
https://github.com/hasura/graphql-engine-mono/pull/1939

GitOrigin-RevId: 8d078dd6e457cdcbdb9806b1d9b037ac7705ff35
2021-07-29 14:06:21 +00:00
Divi
00902e322e ci: push cli-ext binary to cdn on tag release
https://github.com/hasura/graphql-engine-mono/pull/1846

GitOrigin-RevId: 1f1d61c88925d412c38d2e790c30de96541b6cc9
2021-07-27 09:13:49 +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
Solomon Bothwell
d88e2bbcce server: add tests ensuring the correct functioning of all endpoints based on user roles
https://github.com/hasura/graphql-engine-mono/pull/1625

Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
GitOrigin-RevId: 6b56efc838d2ed1acc44b2847161fde22d6aee17
2021-07-16 16:09:25 +00:00
Vishnu Bharathi
6e89653814 ci: uploads ARM64 CLI binaries during deploy
https://github.com/hasura/graphql-engine-mono/pull/1804

GitOrigin-RevId: 3348d15c8869d375bb7bf22bfc53a5d148d1568f
2021-07-16 04:20:01 +00:00
Abby Sassel
1c09e7c8cf cleanup: format .circleci/config.yml files
First up: please let me know if we're already using a YAML file formatter, which one, and I'll close this.

**Otherwise:**

This PR formats .circleci/config.yml files with https://github.com/redhat-developer/yaml-language-server formatter.

**As someone who** edits yaml files infrequently, but with a few default language servers active in my editor,
**I'd like to** edit the file without having to think about formatting or yaml idiosyncrasies
**So that** I can raise a PR and move on with my life 

### Before: incorrect formatting highlighted for 1/5 of `.circleci.config.yaml` file. Difficult to read/edit, and unable to use any common editor integrations
![Screenshot 2021-07-14 at 10 51 41](https://user-images.githubusercontent.com/3883855/125602289-6c0ce457-8a1f-43ea-96f4-1b29e440181a.png)

### After: writing yaml brings me joy now
![Screenshot 2021-07-14 at 11 21 42](https://user-images.githubusercontent.com/3883855/125606378-e6e4ee2a-c44a-40c4-bebe-3e7ab4cb98ae.png)

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

GitOrigin-RevId: d821f3ab5af758e4af3aa442afb0997d76e53c72
2021-07-14 15:24:13 +00:00
hasura-bot
f9e11f6bde server/bugfix: update server_builder_image tag
GITHUB_PR_NUMBER: 7235
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7235

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

Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 2905c0d80341aaeec328460864d35c3a3bc96ee0
2021-07-14 13:14:17 +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
Aniket Deshpande
3bdd777ec4 MySQL: Add mysql-client dependencies on CI and in .cabal file
https://github.com/hasura/graphql-engine-mono/pull/1514

Co-authored-by: Sibi Prabakaran <737477+psibi@users.noreply.github.com>
Co-authored-by: Chris Done <11019+chrisdone@users.noreply.github.com>
Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
GitOrigin-RevId: 81fd23f439e8c3db8149fedae2855db1e84a60a3
2021-07-12 20:07:46 +00:00
Sooraj
effb221d97 console: fix test_oss_console ci errors
https://github.com/hasura/graphql-engine-mono/pull/1726

GitOrigin-RevId: ae87ca45a111fcdb25ba9c53c1bfd8650e1be78c
2021-07-12 10:40:50 +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
hasura-bot
35ab147dd9 server/citus: run tests in CI (OSS changes)
GITHUB_PR_NUMBER: 7161
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7161

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

Co-authored-by: Abby Sassel <3883855+sassela@users.noreply.github.com>
GitOrigin-RevId: 7acbfdad71d9c26fb1bb015f66f844988927bdc8
2021-07-02 05:19:58 +00:00
Abby Sassel
5b7d949ef4 server/citus: run tests in CI
https://github.com/hasura/graphql-engine-mono/pull/1526

GitOrigin-RevId: 4fd4214a799bc0d91cd2d29b1ea444f80714f6bc
2021-07-01 14:41:12 +00:00
Brandon Simmons
f1b1dc109e tests: document server-upgrade-downgrade test
https://github.com/hasura/graphql-engine-mono/pull/1658

GitOrigin-RevId: c097de5758847ee01e5cb4f049a662338f6a4dda
2021-06-29 18:39:30 +00:00
Divi
bcb5baf63b ci: make deploy job dependent on cli, console test jobs
https://github.com/hasura/graphql-engine-mono/pull/1663

GitOrigin-RevId: 6731c33adcbfff9ba972fca226d9f3245496233c
2021-06-25 14:07:14 +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
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
Abby Sassel
b6b1354a2b server/mssql: Fix sqlcmd symlink Dockerfile
https://github.com/hasura/graphql-engine-mono/pull/1578

GitOrigin-RevId: 97d793b42b029cd51a8a96699ca4a67f1463d349
2021-06-15 19:45:08 +00:00
hasura-bot
6d8a441e64 ci: renames mssql test job (#1567)
GITHUB_PR_NUMBER: 7059
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7059

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

Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: 12d4cfdb8aee13644c0b9eed56d152e74335dd24
2021-06-14 14:41:20 +00:00
Abby Sassel
34de64bcdf server/mssql: run tests in CI (#1452)
https://github.com/hasura/graphql-engine-mono/pull/1452

GitOrigin-RevId: 9fd345f7e5c24ebc3f47bdd0b15f84c9b8766f0c
2021-06-14 07:31:42 +00:00
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
Karthikeyan Chinnakonda
7d630e8147 build: use the debian buster version in the docker image
GitOrigin-RevId: 51077f8b5d0c5bdf06a6560444f89d74a3660336
2021-05-27 07:50:15 +00:00
hasura-bot
07adb7b273 ci: update server builder to correct version
GITHUB_PR_NUMBER: 6945
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6945

Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: b0c20d6b249f1659ef076881a3aeb2f84b96eaf7
2021-05-18 12:16:34 +00:00
Vishnu Bharathi
ebc01c2378 cli, ci: enables docker based tests
Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: d7a53e512d296bdd4b2119bb1d0b89e30da7d476
2021-05-17 00:30:08 +00:00
Aravind K P
2d126342f8 ci: move "install deps" in server test CI jobs to server image builder
GitOrigin-RevId: 8e4388a856b7bae4abcd3c9db289826e89128f8b
2021-05-12 15:25:30 +00:00
kodiakhq[bot]
a935746e17 Integration test improvements (for speed/clarity), also increase polling interval for scheduled events
This claws back ~7min from integration tests (run serially, as with `dev.sh test --integration`
Further improvements would do well to focus on optimizing metadata operations, as `setup` dominates

GitOrigin-RevId: 76637d6fa953c2404627c4391447a05bf09355fa
2021-04-27 05:35:26 +00:00