Commit Graph

3368 Commits

Author SHA1 Message Date
Rakesh Emmadi
b8629eaa58 server: implement protocol connection_init timeout
## Summary by CodeRabbit

## Release Notes

- **Documentation**
	- Updated the configuration documentation for the Hasura GraphQL Engine, including new flags and environment variables, with clarifications on WebSocket connection initialization and deprecated options.

- **Bug Fixes**
	- Enhanced WebSocket connection management and error handling, ensuring proper initialization and cleanup of connections across various components.

- **Tests**
	- Improved tests for WebSocket connection handling and logging, ensuring robust verification of connection states and error responses.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11069
GitOrigin-RevId: 8ee25d702a64f3bb04077bbcf0f3e1bd10c916d6
2024-11-05 11:26:43 +00:00
Toan Nguyen
8b956bfafa server: add hasura_postgres_connection_error_total metric
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11063
GitOrigin-RevId: 0e0f8b6e7759623f470893aaa6d6e68d205269b5
2024-10-22 11:53:07 +00:00
Daniel Chambers
31babc3693 Return correct isRepeatable value for directives in graphql schema introspection
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11058
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 5fafb1611b3a080c6e90e3b7da85d41999503e73
2024-10-15 00:59:52 +00:00
ashwiniag
daad9da2bb Catalogue update v2.44.0 stable
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11045
GitOrigin-RevId: d909ac81cd96b137c3c853b5f346fdc58a028272
2024-09-25 05:26:39 +00:00
ashwiniag
2a39140ec2 ci: tag release v2.36.8
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11034
GitOrigin-RevId: a60c66540650e592af8003681b9783e741fb8c68
2024-09-19 07:07:20 +00:00
Rakesh Emmadi
a29101a3e9 server: Include operationName in http-log when HASURA_GRAPHQL_HTTP_LOG_QUERY_ONLY_ON_ERROR env var set to true
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11031
GitOrigin-RevId: 73091f5826fde006a190bc295b36829906181c2f
2024-09-18 11:38:36 +00:00
Rakesh Emmadi
f4aafb234d server: Introduce option to add query field in http-log only on errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11029
GitOrigin-RevId: f5c8aa1b81d67b84030215cb68b3bb9ee6021087
2024-09-18 09:21:02 +00:00
ashwiniag
7602629741 ci: tag release v2.44.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11027
GitOrigin-RevId: 935bd1ad87729507d82033118b1319fb8452b215
2024-09-18 06:13:13 +00:00
ashwiniag
8140910ded ci: tag release v2.43.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11012
GitOrigin-RevId: 35907872534d0626eeaaf97a6f180071355f3fa7
2024-08-26 08:57:25 +00:00
Brandon Simmons
a71ef17345 server: compress OTLP export transport
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11010
GitOrigin-RevId: f4cb78213c3ad91c546d6af1ab9ae42a30f0862c
2024-08-26 08:10:26 +00:00
Nikunj Shukla
b5b41b1166 ci: tag release for v2.43.0-beta.1 and v2.36.8
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11005
GitOrigin-RevId: 048b8f9aba7d722278314240af147f0e17397c18
2024-08-21 11:37:07 +00:00
ashwiniag
62311841c9 adds catalogue for exclusive request from optum
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10994
GitOrigin-RevId: 74f871a7a71d283f710add82c8669f55d99a48ca
2024-08-14 10:33:32 +00:00
kodiakhq[bot]
61fe468d47 GHC 9.10.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10944
GitOrigin-RevId: f7e98c510a0f866f98fd43b7b1c10e5fe730e61f
2024-08-13 13:41:16 +00:00
Samir Talwar
9c88a3a16f Only schedule cleanup for event triggers if any exist.
Users were seeing spurious log entries saying that cleanup could not be scheduled for BigQuery sources as event triggers are not supported.

This makes the error go away by enforcing non-emptyness on the list of triggers, which means we cannot call the function throwing the error, as there will never be any event triggers for which to schedule cleanup.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10987
GitOrigin-RevId: ce9bd6a340bbc8f45f4c74cf9c69f65c4ee91bf5
2024-08-07 13:56:58 +00:00
Gil Mizrahi
9b1111e0d9 Native queries validation: use existing pool instead of creating a new one
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10975
GitOrigin-RevId: f8f6a740e28c4b8d1491181dff075992285b60e8
2024-08-06 14:28:00 +00:00
ashwiniag
16d8037937 ci: stable release v2.42.0 catalogue update
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10979
GitOrigin-RevId: d7dc3dd2600d410e087c3a954b7314c5c6927979
2024-08-05 10:30:33 +00:00
ashwiniag
4b1a3ec71f ci: tag release v2.36.7
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10972
GitOrigin-RevId: 2ff4fec4e026d8d8c5ef6dba1b0eb2f17978a23b
2024-07-31 12:53:55 +00:00
ashwiniag
268fdc835a ci: catalogue updates v2.42.0-beta.1 and update ubuntu base image
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10969
GitOrigin-RevId: d6a85368cbcd0564fd90cc2518f578e043bafd58
2024-07-31 11:47:13 +00:00
Tom Harding
e08b89df65 Allow a custom list of ignored headers in actions
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10968
GitOrigin-RevId: 308a2c92e2c4b075ff2f55c94c82572f2fe85a7b
2024-07-30 15:32:00 +00:00
Samir Talwar
98ee4e3d27 Enforce the session variable name prefix.
In certain circumstances, all HTTP headers were included in the set of session variables. This has now been reduced to only the session variables. This change affects a number of areas, including the HTTP logs, JWT claims, rate limiting, and accessing session variables in Kriti code.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10964
GitOrigin-RevId: fc573cd89f7c0f1a17b9e8a56396f31e70669650
2024-07-29 15:53:06 +00:00
Samir Talwar
a8d1002175 server: Factor out authentication-related code into a new namespace, Hasura.Authentication.
In preparation for tightening up the various ways in which we construct and work with session variables, I am trying to move the behavior into the same module(s) as the data types, so that we can avoid exposing the internals of data structures in favor of smart constructors and conversions.

The session variable code was split between `Hasura.RQL.Types.Roles`, `Hasura.RQL.Types.Session`, and `Hasura.Session`, with the first two containing most of the data structures (and some logic) and the latter containing the rest of the logic. These files do not interact with the rest of `Hasura.RQL`, though they are depended upon by that namespace.

I have refactored these files into a new namespace, `Hasura.Authentication`. It now looks like this:

1. Role types are now in `Hasura.Authentication.Role`.
2. Header constants were moved from `Hasura.Server.Utils` to `Hasura.Authentication.Headers` (plural) to avoid cycles.
3. Header logic was moved from various places into `Hasura.Authentication.Header` (singular) for the same reason.
4. Session variable types and logic live together in `Hasura.Authentication.Session`.
5. User info types and logic live together in `Hasura.Authentication.User`.

This new structure is cycle-free and generally avoids importing the rest of the code, which means we should be able to start pruning the list of exports and locking down session variable construction.

No behavior was changed in this changeset.

The majority of changes are to the imports in a number of files; everything depends on these things. By splitting into multiple files, we also reduce the surface area of an individual import, which was a pleasant side-effect of this work.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10960
GitOrigin-RevId: 7cb962c06483cd9b92b80432aed5cabecb465cda
2024-07-29 06:02:56 +00:00
Tom Harding
4e6394355d Return correct type when an update_many has no arguments
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10954
GitOrigin-RevId: 214163f4f4764ea66194bf26bfe202a807771e90
2024-07-26 16:19:18 +00:00
ashwiniag
e34620a5f3 ci: tag release v2.40.3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10956
GitOrigin-RevId: caf79b11499d6575cd2971ece2f0ef9e4103b511
2024-07-26 14:41:08 +00:00
Tom Harding
0080e32e3c Remove empty subscription results
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10952
GitOrigin-RevId: 5581a416323877a92aa25a96398a62a88581c165
2024-07-26 09:08:48 +00:00
Tom Harding
4320eb0b71 Add some more Show instances
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10950
GitOrigin-RevId: 20fee6351ee4a8bceabddf12bee50c3101ad78fa
2024-07-25 10:24:39 +00:00
Samir Talwar
934cb3e25e server: Remove headers from error details.
In rare cases, sensitive headers were written to the GraphQL Engine logs. These cases are now handled correctly to avoid logging sensitive information.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10946
GitOrigin-RevId: a9d66532245789a16cf91936d53bbfce19d272a4
2024-07-24 09:32:01 +00:00
Tom Harding
3f15dfd1f5 Don't set columns to NULL when nullable variables are omitted
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10921
GitOrigin-RevId: 01779e0d02d4de1ca56d84f3d11f5e7513b87676
2024-07-19 11:59:52 +00:00
Samir Talwar
b8d7c6039b Use a test PostgreSQL image based on Debian, not Alpine.
Alpine is often slower than Debian (because musl is sometimes slower than glibc) and not how anyone actually deploys PostgreSQL in production.

Most notably, some floating-point computations result in slightly different values, and Debian ships with better support for different locales so sorting text (e.g. with `ORDER BY`) behaves differently.

Let's test against an environment that people are likely to actually use.

As a result, there are slight changes to the results of PostGIS computations in a couple of test cases.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10942
GitOrigin-RevId: 4caed19def23a372fc3930c409514b1c9b385026
2024-07-19 08:18:01 +00:00
Samir Talwar
9cad4dea99 server/tests-py: More useful messages when logging tests fail.
It's useful to know what caused the failure when parsing logs.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10938
GitOrigin-RevId: 53f3036625644a04bc5fd3afb150262515cfec29
2024-07-17 14:47:08 +00:00
Samir Talwar
b2ac4d82bc Remove the version from Docker Compose files.
Recent versions of Docker Compose no longer support this, instead just printing a warning.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10937
GitOrigin-RevId: 97a82968c48f5c09d6cbe74d8ea7386979e46e7a
2024-07-17 13:49:05 +00:00
ashwiniag
43028b6c66 ci: catalog update v2.41.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10930
GitOrigin-RevId: 3570f0999d0bafa9b22f89baf38f7494e7bd8de4
2024-07-10 10:48:55 +00:00
Philip Lykke Carlsen
69219958d6 Postgres: Quote custom scalar types in SQL
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10914
GitOrigin-RevId: 1ea4690b801913b4fc3fa8631090e3caa76b1cdc
2024-07-05 12:22:49 +00:00
Samir Talwar
e15cd1ce39 pro: Run Redis' UNLINK command on one key at a time.
Fixes to Pro cache clearing.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10906
GitOrigin-RevId: ea1482e670a6f2431f8e2ca445263aaa0a0b4876
2024-06-25 14:55:43 +00:00
ashwiniag
9d43502e18 ci: tag v2.40.2 release
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10900
GitOrigin-RevId: 51225fa935c270d096cdb717ffdf2ef2d459f5af
2024-06-24 11:26:24 +00:00
Toan Nguyen
a8d60c3f82 server: add session_variables attribute to GraphQL spans
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10896
GitOrigin-RevId: 18faecd1f0107e502ffbc1d3fb39419d2ff1fff0
2024-06-24 10:07:21 +00:00
Toan Nguyen
7aef8f7102 server: add auth hook span and correct server SpanKind for OpenTelemetry spans
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10887
GitOrigin-RevId: b6b947c00a24a30c480427b533ab617f217c6884
2024-06-21 16:59:09 +00:00
Gil Mizrahi
4b884d3d47 add a flag to disable native query validation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10889
GitOrigin-RevId: 43f2b83fe99b1e0fd514ccaed4888694351fadfc
2024-06-21 11:49:40 +00:00
ashwiniag
cf84e328d6 ci: tag release v2.41.0-beta.1
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10885
GitOrigin-RevId: bd77c5f97e421513f7a30218d6325541ad31fc4c
2024-06-20 11:54:17 +00:00
ashwiniag
af3f34a4b1 ci: tag release v2.40.1
GitOrigin-RevId: 4e8c1a36f863e4959c2f11ed086b2363a42b8c36
2024-06-20 11:13:01 +00:00
Philip Lykke Carlsen
ed97e858f7 Actually thread through where those 60 seconds come from
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10864
GitOrigin-RevId: be54d96199eb34d27dbd60b814b297f658c8be8a
2024-06-17 13:56:12 +00:00
hasura-bot
c2ebffe5f3 Fix typo in error message
GITHUB_PR_NUMBER: 10294
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/10294

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10872
Co-authored-by: Ross Fenning <1759611+avengerpenguin@users.noreply.github.com>
GitOrigin-RevId: 84a542c5069ee726683d11facfad9c932de6b857
2024-06-17 09:08:11 +00:00
Vishnu Bharathi
5f1784a6f7 ci: tag release v2.36.6
https://hasurahq.slack.com/archives/CKATHV1J7/p1718304995919369

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10871
GitOrigin-RevId: b5bf086fdf03d0e704a13b9767e4e8eed1633e9f
2024-06-14 07:27:14 +00:00
paritosh-08
2eb4a26268 add graphql query to traces
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10868
GitOrigin-RevId: 0d59478586183d98e38d45d3c928f75a3f25e970
2024-06-13 18:32:56 +00:00
Philip Lykke Carlsen
b4737fdd77 Revise JWK refresh documentation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10863
GitOrigin-RevId: 3de651232cd5d3b5a5e4c78e90afc2cad063fcbf
2024-06-12 12:19:16 +00:00
Rakesh Emmadi
8e664002c5 server: include action type in action-handler-log
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10861
GitOrigin-RevId: 874cff7dcd287aed61e6d4806fb4733c2ba14982
2024-06-11 06:47:24 +00:00
Rakesh Emmadi
7e0d0d2c35 server: Handle and log spock internal errors
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10860
GitOrigin-RevId: 213e48563d91599429ecb91da521dd71f1f9b1c4
2024-06-10 16:06:41 +00:00
Vishnu Bharathi
540ff2289e ci: tag release v2.36.5 and update ubuntu base image
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10859
GitOrigin-RevId: 0431a98d0649e9358d5c9aba48635b5a30e1c47d
2024-06-10 09:56:02 +00:00
paritosh-08
cf41d2abd9 add postgres query to traces
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10853
GitOrigin-RevId: b47c7077fc8fc7115ab05dffe93195abfeb4131d
2024-06-06 18:26:03 +00:00
Brandon Simmons
9b7a2c0b88 server/pro/opentelemetry: Fix missing overflow bucket in OTLP histogr…
…am export

This was a violation of the spec on our part, reported by a New Relic user where this results in an error. For other users the data was correct except that they were not receiving data for the overflow bucket (with upper bounds of infinity)

I don't see other reports in tracker.

See: https://github.com/open-telemetry/opentelemetry-proto/blob/v0.9.0/opentelemetry/proto/metrics/v1/metrics.proto#L550-L551

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10848
GitOrigin-RevId: cbc82e10c76e727881df4f9fbd4cbe4d6bd88969
2024-06-05 10:49:18 +00:00
ashwiniag
0afa2edd40 ci: tag release for v2.40.0-beta.1 and v2.40.0
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10847
GitOrigin-RevId: 018d5187ba3341f384a741098c0367f1d46b2b7c
2024-06-04 15:08:40 +00:00