Commit Graph

75 Commits

Author SHA1 Message Date
Daniel Chambers
d918e701a1 Upgrade cabal version used in CI server-build
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9471
GitOrigin-RevId: 006e63b2ad366ad6369e654beacd8768a570922c
2023-06-08 08:32:15 +00:00
Samir Talwar
0256e1da7d nix: Switch to nixpkgs-unstable.
I am making this change for two reasons:

  * We expect to upgrade to GHC 9.2.7 imminently, which is not available on the nixos-22.11 branch.
  * We need to upgrade unixODBC, which has stagnated on nixos-22.11.

While we expect a new NixOS release in a month or two, we can't really afford to wait that long. In addition, we might need to upgrade GHC again soon after that.

I removed `hpack` because we don't actually use it any more.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8483
GitOrigin-RevId: 9a7ef1a97599a218e34dfde1ad4f6a7279d2ba0e
2023-03-24 20:36:48 +00:00
Nicolas Beaussart
2c3d91b033 frontend: switch cli and server to use the new nx assets
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7533
GitOrigin-RevId: 8adde90a90115c2782dc77b9f30297499f22acab
2023-01-25 12:07:01 +00:00
Abby Sassel
57f456a4cf add run-new.sh docs
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7278
GitOrigin-RevId: 6c17cc846b39a4236f65dd5ab6baac4529b38f4c
2022-12-14 16:11:00 +00:00
Samir Talwar
80c977da85 server: Split the integration tests out into their own directories.
We currently have a fairly intricate way of running our PostgreSQL and MSSQL integration tests (not the API tests). By splitting them out, we can simplify this a lot. Most prominently, we can rely on Cabal to be our argument parser instead of writing our own.

We can also simplify how they're run in CI. They are currently (weirdly) run alongside the Python integration tests. This breaks them out into their own jobs for better visibility, and to avoid conflating the two.

The changes are as follows:

- The "unit" tests that rely on a running PostgreSQL database are extracted out to a new test directory so they can be run separately.
  - Most of the `Main` module comes with them.
  - We now refer to these as "integration" tests instead.
- Likewise for the "unit" tests that rely on a running MS SQL Server database. These are a little simpler and we can use `hspec-discover`, with a `SpecHook` to extract the connection string from an environment variable.
  - Henceforth, these are the MS SQL Server integration tests.
- New CI jobs have been added for each of these.
  - There wasn't actually a job for the MS SQL Server integration tests. It's pretty amazing they still run well.
- The "haskell-tests" CI job, which used to run the PostgreSQL integration tests, has been removed.
- The makefiles and contributing guide have been updated to run these.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6912
GitOrigin-RevId: 67bbe2941bba31793f63d04a9a693779d4463ee1
2022-11-17 12:56:26 +00:00
Gil Mizrahi
15b3ac0aee ghc 9.2.5
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6777
Co-authored-by: Samir Talwar <47582+SamirTalwar@users.noreply.github.com>
GitOrigin-RevId: 916abab76446cf7c4e1e63dc112ba4994ab4d23d
2022-11-15 11:26:42 +00:00
Luca Restagno
49e9c47db3 Docs: improve Console contributing instructions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6471
GitOrigin-RevId: bec885589e9e8e631e73dc288dea60375d5e9248
2022-10-25 08:14:52 +00:00
Samir Talwar
8435d7a5fb server: Update the contributing guide.
* The versions for some tools were out of date; updated accordingly.
* The link to the Dockerfile was broken.
* Included instructions for Nix.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6403
GitOrigin-RevId: 3acbafe90e4bb9267dcdb2dce5e205773a14dfc9
2022-10-18 09:50:46 +00:00
Gil Mizrahi
d8452bf11c server: remove ghc libs from freeze file, update guides
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6231
GitOrigin-RevId: d877e46d7130217cd95eb9c507921e76a0009151
2022-10-06 12:27:09 +00:00
Tom Harding
f05f746b94 Extract the test harness from the Hspec tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6095
Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
GitOrigin-RevId: 51693f7324e62e201a2bdc701255cf6c730745e2
2022-10-04 08:31:26 +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
Samir Talwar
07328fd9fc server: Automate generation and verification of Cabal files from hpack.
We currently use `hpack` to generate the Cabal files from _package.yaml_
files for the two small libraries in _server/lib_. While this is more
convenient, we also check the Cabal files into the repository to avoid
needing an extra step upon pulling changes.

In order to ensure that the Cabal files do not get out of sync with the
hpack files, this introduces a few improvements:

1.  Makefile targets to automatically generate the Cabal files without
    needing to know the correct incantation. These targets are a
    dependency of all build targets, so you can simply run
    `make build-all` and it will work.
2.  An extra comment at the top of all generated Cabal files that
    explains how to regenerate it.
3.  A `lint-hpack` Makefile target that verifies that the Cabal files
    are up-to-date.
4.  A CI job that runs `make lint-hpack`, to stop inconsistencies
    getting merged into trunk.

Most of these changes are ported from #4794.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5217
GitOrigin-RevId: d3dfbe19ec00528368d357b6d0215a7ba4062f68
2022-07-29 16:22:12 +00:00
Samir Talwar
0e4d709285 Factor tool versions out into server/VERSIONS.json.
This helps us use the same versions locally as in CI. If you're using the Nix setup, it guarantees it.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5111
GitOrigin-RevId: 6e00cd7a78593df1e60fac37cc1195aba60e488f
2022-07-22 12:23:46 +00:00
Jesse Hallett
80d19a80c4 server: update docs for updating cabal.project.freeze
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4980
GitOrigin-RevId: 7015295b037869f21a1c30895c9ffb846da62ff2
2022-07-07 15:59:26 +00:00
Daniel Harvey
921ada70e9 tooling: Opt-in shared tooling
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4753
GitOrigin-RevId: 3fc3324e584210e57e5acb9d8361d4e5b3caf26a
2022-06-16 17:12:35 +00:00
Evie Ciobanu
8f0b3f6d06 server: build/run unit tests faster
This aims to support loading up a `ghci repl` with both the `graphql-engine` library and the unit tests. This is currently not officially supported by cabal, but it uses a hack, which is why I added a flag. See the updated documentation for more info.

Also see

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4739
GitOrigin-RevId: 5e7b15855a7a829ed76b5830be1efc9146d25da6
2022-06-16 10:39:24 +00:00
Abby Sassel
2518d16191 Create troubleshooting.md
Documenting a workaround discussed at https://hasurahq.slack.com/archives/C03263T1L9W/p1653561662369129 in a new Troubleshooting doc

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4575
GitOrigin-RevId: eb80662b93f157d363cd0b53993fc5bb5972b546
2022-05-30 09:18:44 +00:00
Abby Sassel
7eda345f3b server/tests: Troubleshooting docs
From discussion threads at https://hasurahq.slack.com/archives/CV3UR1MT2/p1651627110710999 and https://hasurahq.slack.com/archives/CV3UR1MT2/p1651590300512049

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4445
GitOrigin-RevId: c5c674f91d065e6864ec781b17db151bc649e75c
2022-05-04 08:23:53 +00:00
jkachmar
6720aef26f server: Clean up Cabal project files
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4105
GitOrigin-RevId: 423eecf04061ca8d5ee036a84ee6792036a149e4
2022-04-07 07:16:12 +00:00
Rakesh Emmadi
d7b6585454 server/gardening: move local hoogle setup from Makefile to bash script
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3996
GitOrigin-RevId: ace7f4c13cab6e549aedf4520334c435acac9ab1
2022-03-16 10:44:01 +00:00
Rakesh Emmadi
62304312e8 server: add Makefile targets and instructions to run local hoogle server
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3973
GitOrigin-RevId: 986955e3c74d9ec581e9cad37198cc9c1db34037
2022-03-16 06:35:13 +00:00
Evie Ciobanu
5f0584379d server: testing guidelines
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3776
GitOrigin-RevId: ad4355445a75611b1edfc462374f6c3998a94c4a
2022-03-08 09:53:27 +00:00
Evie Ciobanu
374ec8ab12 server: reference hspec README in CONTRIBUTING
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3775
GitOrigin-RevId: ff781587ec968d91f8423a8aa3498e5e981aade2
2022-02-23 13:47:44 +00:00
Gil Mizrahi
abefdd31d0 update contributing and compiling on m1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3431
GitOrigin-RevId: fe899b33ca9f3d128b125e40a58dfee0407826a5
2022-01-21 11:21:49 +00:00
Evie Ciobanu
ab829b4355 test: have dev.sh pass through CLI options for unit tests
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3420
GitOrigin-RevId: eba7ac0bb609cf83ac1e636c24907601ffcd3651
2022-01-20 15:40:34 +00:00
Auke Booij
a7dbe95666 Hlint all Haskell code
So far we've only used `hlint` to lint the OSS code. This moves some things around to lint the Pro code as well.

Note that the CI action only runs `hlint` on Haskell files that are _changed_ by a PR, relative to its merge-base (usually `main`).

As a reminder, you can use the `ignore-server-hlint-checks` label to prevent this from blocking a merge.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3383
GitOrigin-RevId: d5779c63d780f526a1d58ae4107f0d5262a23ec1
2022-01-18 04:06:15 +00:00
Evie Ciobanu
db22401e4f server: document python integration test suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3350
GitOrigin-RevId: 47dcebbfa84ed3681da40b3ea52e9b849b2fe8e4
2022-01-13 14:29:10 +00:00
Rakesh Emmadi
549a5a31f0 server/mssql: fix pytest class names for update mutations
**TLDR**: Rename the pytest class names for update mutations by suffixing with `MSSQL` instead of `Mssql`.

We run the pytest in the CI using option `-k "MSSQL or Common"` which runs the test classes having `Common` or `MSSQL` in their name. Assuming the option `-k` to be case insensitive I named the update mutation test classes ending with `Mssql`. To confirm whether the CI is running the update mutation tests, I opened this PR with a commit making a test to fail and it is not reflected in the CI (all tests are passing!). I renamed the test classes with `MSSQL` as suffix. Now, the CI is able to capture the failing test as expected. Finally, the failing test is fixed.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3227
GitOrigin-RevId: 65b2b2bfbaca64c44ff7607148c32eb0c15e4956
2021-12-29 18:03:46 +00:00
Evie Ciobanu
babdd61ad7 server: Document and update HIE file for haskell integration suite
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3215
GitOrigin-RevId: 006789ae185f31a34740780d6ddeb0a68bcdbb5d
2021-12-23 16:52:21 +00:00
Robert
5473bfa952 tests: simplify command line of Haskell test suite
# Description

The tests were only being run with fully qualified postgresql and
mssql connection env vars anyhow. Makes it a bit simpler to run the
tests.

- the test suite now requires only plain connection strings as
  `HASURA_GRAPHQL_DATABASE_URL` (postgres) or
  `HASURA_MSSQL_CONN_STR` (mssql)
- update `CONTRIBUTING.md` for this change, and make it
  generally a bit less inaccurate

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3065
GitOrigin-RevId: b0b2f01ef867645d55c87a0e5c2bc1c0e94ee41f
2021-12-06 15:47:45 +00:00
Abby Sassel
6246bd297f server/docs: link to STYLE from CONTRIBUTING
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2655
GitOrigin-RevId: b5a60ad43ab0e2f8e026b91c4fe0aa48883c7d41
2021-10-21 11:34:50 +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
Robert
3c3c048bb9 server: drop dependency on ghc-heap-view again for profiling builds (close #2554)
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2557
GitOrigin-RevId: e392651861140bfefc65ce387d5cfbd6d3211f66
2021-10-12 09:34:08 +00:00
Sameer Kolhar
51ad8a18c6 document recommended node version info in README
https://github.com/hasura/graphql-engine-mono/pull/2171

GitOrigin-RevId: 35725e8b652564b1c500c81d9ae38e7f87652d57
2021-09-24 10:20:01 +00:00
Robert
a206d04062 server, CI: use ormolu as a formatter for Haskell sources
### Description

- sets up a Makefile target for running ormolu to format and check source code
- updates CI to run ormolu instead of stylish-haskell (and to check instead of format actively)

Compare #1679.

Here's the plan for merging this:
1. merge this PR; at this point, all PRs will fail CI unless they have the `ignore-server-format-checks` label set
2. merge follow-up PR #2404 that does nothing but actually reformats the codebase
3. tag the merge commit as `post-ormolu` (also on `graphql-engine`, for the benefits of community contributors)
4. provide the following script to any devs in order to update their branches:
   ```
   $ git checkout my-feature-branch
   $ git merge post-ormolu^
   $ make format
   $ git commit -a -m "reformat with ormolu"
   $ git merge -s ours post-ormolu
   ```
   (I'll put this in the commit message)

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

Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
Co-authored-by: Swann Moreau <62569634+evertedsphere@users.noreply.github.com>
GitOrigin-RevId: 130f480a6d79967c8d045b7f3a6dec30b10472a7
2021-09-23 21:23:21 +00:00
Evie Ciobanu
5cba4fd079 server: add a short note clarifying order of teardown functions
Closes https://github.com/hasura/graphql-engine-mono/issues/1435

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

GitOrigin-RevId: ecbdf98edb3a6b0b8bcd1b96fb9ee533b4f98cad
2021-08-24 09:20:13 +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
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
Abby Sassel
76c322589c server/bigquery: Document BigQuery integration tests
This PR documents & streamlines how we run BigQuery integration tests locally as a first step to [running them in CI](https://github.com/hasura/graphql-engine-mono/issues/1525).

I've also created a hasura service account for internal use. [Internal docs here](https://github.com/hasura/graphql-engine-mono/wiki/Testing-BigQuery).

Thanks to FP Complete team for [the guidance here](https://docs.google.com/document/d/1dGDK0touUtsDxRQPonMxSoPbIfzBoSYo02tAjQEO7qA/edit?ts=60c0cf24#), which I've reused parts of.

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

GitOrigin-RevId: 303819d212aa073fbef685d077b1cfa583cd15fc
2021-07-06 11:13:06 +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
Abby Sassel
33a710f4c7 server/docs: Add MSSQL testing steps for those running pytest manually
GitOrigin-RevId: 36eaab863c7bea552a394bd6c36cedb1aa877f50
2021-03-26 09:49:19 +00:00
Abby Sassel
881cc55e0e server: split TestGraphQLQueryBasic into common and backend-specific test classes
GitOrigin-RevId: 9e99047f7ab83f06c94c4741c7c0591eb2ca35e8
2021-03-16 16:42:20 +00:00
Karthikeyan Chinnakonda
84d55cf771 docs: add a guide on writing python tests
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 37528597f947a62b4c119cad8feb5428b904a00b
2021-03-10 17:30:41 +00:00
Abby Sassel
01cb59919f docs: changelog & server documentation improvements
GitOrigin-RevId: e6a5e464acb5492ab7a592362fff2bac6528dfaa
2021-03-01 20:53:43 +00:00
Tirumarai Selvan
b544b87b9b Merge pull request #223 from hasura/jberryman/5863-prep-refactoring
GitOrigin-RevId: 71b1453edf4b93ffc16a15ea3c6057bb865b6606
2020-12-20 06:53:38 +00:00
Vishnu Bharathi P
58c44f55dd Merge oss/master onto mono/main
GitOrigin-RevId: 1c8c4d60e033c8a0bc8b2beed24c5bceb7d4bcc8
2020-11-12 22:37:19 +05:30
Vishnu Bharathi P
666058ab7f oss: renames dot files and folders
GitOrigin-RevId: 540aeec3be091e1cfb7b05a988f50445534ed663
2020-11-12 22:37:19 +05:30
Vamshi Surabhi
10ada484f4
adds haskell-language-server/ghcide configuration (#6133) 2020-11-09 19:05:39 +05:30
Marion Schleifer
c3c9e2983e
Merge branch 'master' into webdeb-remove-dublicate-section 2020-09-04 07:36:08 +02:00