Commit Graph

589 Commits

Author SHA1 Message Date
Phil Freeman
7fffc11077 Caching, Rate Limiting, Metrics & Session Variable Improvements (#376)
* server: use a leaky bucket algorithm for bytes-per-second cache rate limiting

* Use evalsha properly

* Adds redis cache limit parameters to PoliciesConfig

* Loads Leaky Bucket Script On Server Start

* Adds more redis logging and moves cache update into lua script

* reverts setex in lua and adds notes

* Refactors cacheStore and adds max TTL and cache size limits

* Filter session vars in cache key

* WIP

* parens

* cache-clear-hander POC implementation

* cache-clear-hander POC implementation

* Pro projectId used as cache key

* POC working!

* prefixing query-response keys in redis

* Add cacheClearer to RedisScripts

* Partial implementation of cacheClearer from scripts record

* updating tests

* [automated] stylish-haskell commit

* Adds query look with up with metrics script

* Adds missing module and lua script from last commit

* Changes redis script module structure to match cache clearing branch

* minor change to lua script

* cleaning up cache clearing

* generalising JsonLog

* [automated] stylish-haskell commit

* Draft Cache Metrics Endpoint

* Adds Cache Metrics Handler

* Adds hook handler module

* Missed HandlerHook module in last commit

* glob

* Fixes redis mget bug

* Removes cache totals and changes dashes to colons in metric cache keys

* Adds query param to clear clear endpoint for deleting specific keys

* Adds query param to clear clear endpoint for deleting specific keys

* Cache Metrics on query families rather then queries

* Replace Set with nub

* Base16 Redis Hashes

* Query Family Redis Keys With Roles

* response headers for cache keys

* fixing bug in family key by excluding operation name; using hash for response header instead of entire key

* Adds query family to redis cache keys and cache clear endpoint

* Fixes queryfamily hash bug

* Moves cache endpoints to /pro

* Moved cache clear to POST

* Refactors cache clear function

* Fixes query family format bug

* Adds query cache tests and optional --redis-url flag to python test suite

* Adds session variable cache test

* Update pro changelog

* adding documentation for additional caching features

* more docs

* clearing up units of leaky bucket params

* Adds comments to leaky bucket script

* removes old todo

* Fixes session variable filtering to work with new query rootfield

* more advanced defaulting behaviour for bucket rate and capacity.

* Updates Docs

* Moves Role into QueryFamily hash

* Use Aeson for Cache Clear endpoint response

* Moves trace to bracket the leaky bucket script

* Misc review tweaks

* Adds sum type for cache clear query params

* Hardcodes RegisReplyLog log level

* Update docs/graphql/cloud/response-caching.rst

Co-authored-by: Phil Freeman <phil@hasura.io>

* new prose for rate limiting docs

* [automated] stylish-haskell commit

* make rootToSessVarPreds total

* [automated] stylish-haskell commit

* Fixes out of scope error

* Renamed _acRedis to _acCacheStore

Co-authored-by: Solomon Bothwell <ssbothwell@gmail.com>
Co-authored-by: Lyndon Maydwell <lyndon@sordina.net>
Co-authored-by: David Overton <david@hasura.io>
Co-authored-by: Stylish Haskell Bot <stylish-haskell@users.noreply.github.com>
Co-authored-by: Lyndon Maydwell <lyndon@hasura.io>
GitOrigin-RevId: dda5c1a3f902967b3d78310f950541a55fabb1b0
2021-02-13 00:06:18 +00:00
Sameer Kolhar
8655e6fd3a console: function permissions UI (#413)
GitOrigin-RevId: ccdfab19751b0d238a4ebcec59ba73a798103ca9
2021-02-12 17:02:41 +00:00
surendran82
76844835c1 docs: favicon change
GitOrigin-RevId: 4f695b1ad01b73abca5de6ebae74c5b9e03da09c
2021-02-10 08:19:05 +00:00
Funmilayo E. Olaiya
2793893b86 docs: add a note for export metadata json output (close #6209)
### Description
This PR adds a note for the export_metadata API output.

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

### Related Issues
https://github.com/hasura/graphql-engine/issues/6209

### Affected pages
1. https://deploy-preview-298--hasura-docs-mono.netlify.app/graphql/core/migrations/reference/metadata-format.html
2. https://deploy-preview-298--hasura-docs-mono.netlify.app/graphql/core/api-reference/schema-metadata-api/manage-metadata.html

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 10e1a3c3c42b2666992bb13a31fa0c2d622d1552
2021-02-08 09:12:37 +00:00
Priya Sharma
c739927618 cloud docs: add coupon and credit doc
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 414f519aae737cb639916c8c7f034149120f7800
2021-02-08 09:07:05 +00:00
Karthikeyan Chinnakonda
312e56dfa6 server: support tracking of custom functions which return single row
GitOrigin-RevId: fbf99816a70e666bb9b02fca92a0ee7d419cdff8
2021-02-03 14:07:30 +00:00
Shraddha Agrawal
1583fa6872 docs: update Datadog integration v2 docs
GitOrigin-RevId: a0f762bca40cdb5bea690f48625c3a3cb5ae7e89
2021-02-02 22:18:56 +00:00
hasura-bot
60613b4777 docs: add a guide on importing data from a CSV file into PG (close #494)
GITHUB_PR_NUMBER: 6225
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6225

Co-authored-by: Funmilayo E. Olaiya <35759534+codeliezel@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 232414fd293ab1a054b3fec35c7ee3743cd4686d
2021-02-02 10:44:36 +00:00
hasura-bot
bcb1ae07eb docs: add postgres retries environment variables
GITHUB_PR_NUMBER: 4287
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/4287

Co-authored-by: Toan Nguyen  <1615675+hgiasac@users.noreply.github.com>
GitOrigin-RevId: c93781cebb14255d1e04da669c6bf774738ba96f
2021-02-02 10:40:31 +00:00
hasura-bot
bd9c192cb7 docs: add section for codegen examples
GITHUB_PR_NUMBER: 4664
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/4664

Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 70ec08da96a28b5081d1b8e24b2cb9c6a76922de
2021-02-02 09:39:46 +00:00
hasura-bot
0edfcd5f2c docs: add inserts to db modelling guides
GITHUB_PR_NUMBER: 5444
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5444

Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: caabc4de59abbeb7ac4d175cda330ace4196359b
2021-02-02 08:45:32 +00:00
hasura-bot
c3712067e8 docs: add a guide on how to clean up action logs (close #4935)
GITHUB_PR_NUMBER: 6229
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6229

Co-authored-by: Funmilayo E. Olaiya <35759534+codeliezel@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 54e6a3569481671610ea93c6ced6a6b42924c022
2021-02-02 08:06:10 +00:00
Shraddha Agrawal
fbf0c62ffa docs: add cloud docs for project ownership transfer
need to add screens.

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 6a4977dff321ef01ea2dac9e937e1f4d45978a8c
2021-02-02 08:01:55 +00:00
Karthikeyan Chinnakonda
10a3f9960d server: new function permissions layer
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: 35645121242294cb6bb500ea598e9a1f2ca67fa1
2021-01-29 05:49:09 +00:00
Lyndon Maydwell
0767333597 server: support restified versions of graphql queries (#303)
Restified GraphQL Endpoints feature.

GitOrigin-RevId: 3d6e589426ec21a60a915b47f579f0ac4934af45
2021-01-29 01:03:35 +00:00
Shraddha Agrawal
f64e2f1aab docs: add manage cards docs
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: f5ab0f02a812b016a1f97044bda4d4937772268b
2021-01-22 20:24:22 +00:00
hasura-bot
98ccd81704 Server: Remote relationships permissions
GITHUB_PR_NUMBER: 6125
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6125

Co-authored-by: Karthikeyan Chinnakonda <15602904+codingkarthik@users.noreply.github.com>
GitOrigin-RevId: 53d0671e6335dad1af7cb00e3e05e7021a910673
2021-01-19 20:57:58 +00:00
hasura-bot
38fc4cb677 server: consistently log request_id at the same level
GITHUB_PR_NUMBER: 6244
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6244

Co-authored-by: José Lorenzo Rodríguez <37621+lorenzo@users.noreply.github.com>
GitOrigin-RevId: fef22d98ac7be23ca21a63dc1c696fa7169253a4
2021-01-19 17:26:45 +00:00
Rikin Kachhia
0f26a24557 docs: remove posthog tracking script
as tracking scripts are managed via google tag manager they can be removed from code

GitOrigin-RevId: ed864944e3062f33c08bfce7f2aca9f79ded6b8c
2021-01-19 10:15:55 +00:00
hasura-bot
647504ef99 docs: fix UserLogin action mutation definition
This PR was migrated from https://github.com/hasura/graphql-engine/pull/6300

---
Accept password instead of email in UserInfo Mutation type example

Co-authored-by: Tobias Törnros <17402497+tobiastornros@users.noreply.github.com>
GitOrigin-RevId: 9fbc0fc1ad4e6725b5411c271dd8e2d1ee7840be
2021-01-15 12:36:32 +00:00
hasura-bot
b9d31203c9 docs: add full page on pg permissions to cloud docs
GITHUB_PR_NUMBER: 6128
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6128

Co-authored-by: Marion Schleifer <5722022+marionschleifer@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 0ebd5fcbdfa6deaccd63d164c5ed8a07b63abca3
2021-01-14 08:17:38 +00:00
Karthikeyan Chinnakonda
c14bcb6967 server: accept new config allowed_skew in JWT config to provide leeway in JWT expiry
fixes https://github.com/hasura/graphql-engine/issues/2109

This PR accepts a new config `allowed_skew` in the JWT config to provide for some leeway while comparing the JWT expiry time.

GitOrigin-RevId: ef50cf77d8e2780478685096ed13794b5c4c9de4
2021-01-13 08:39:18 +00:00
surendran82
3373bbc748 docs: update marketo form
GitOrigin-RevId: 474aa477bda27eaa262815c069a58c61d6cbf3f5
2021-01-12 15:37:34 +00:00
Marion Schleifer
b4e72efeb7 docs: fix warning on build
Fix warning on docs build on main

GitOrigin-RevId: 3a5937539f4a1cebfe8770e75605240ab54a8c02
2021-01-12 06:31:27 +00:00
hasura-bot
4cbebed2df docs: add <> around placeholders
GITHUB_PR_NUMBER: 5803
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/5803

Co-authored-by: Funmilayo E. Olaiya <35759534+codeliezel@users.noreply.github.com>
GitOrigin-RevId: 98c44e8497069ecaab8b74d81279a117cac4b57d
2021-01-11 19:21:40 +00:00
hasura-bot
66a3ad4d36 docs: fix typo
This PR was migrated from https://github.com/hasura/graphql-engine/pull/6254

---
>

### Description
>

### Changelog

- [ ] `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

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

### Related Issues
->

### Solution and Design
>

### Steps to test and verify
>

### Limitations, known bugs & workarounds
>

### Server checklist

#### Catalog upgrade

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

#### Metadata

Does this PR add a new Metadata feature?
- [ ] No
- [ ] Yes
  - Does `run_sql` auto manages the new metadata through schema diffing?
    - [ ] Yes
    - [ ] Not required
  - Does `run_sql` auto manages the definitions of metadata on renaming?
    - [ ] Yes
    - [ ] Not required
  - Does `export_metadata`/`replace_metadata` supports the new metadata added?
    - [ ] Yes
    - [ ] Not required

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

#### Breaking changes

- [ ] No Breaking changes
- [ ] There are breaking changes:

  1. Metadata API

     Existing `query` types:
     - [ ] Modify `args` payload which is not backward compatible
     - [ ] Behavioural change of the API
     - [ ] Change in response `JSON` schema
     - [ ] Change in error code

  2. GraphQL API

     Schema Generation:

     - [ ] Change in any `NamedType`
     - [ ] Change in table field names

     Schema Resolve:-

     - [ ] Change in treatment of `null` value for any input fields

  3. Logging

     - [ ] Log `JSON` schema has changed
     - [ ] Log `type` names have changed

Co-authored-by: Thomas Güttler <414336+guettli@users.noreply.github.com>
GitOrigin-RevId: 8381a182e9f380b98e0ebe918727e0ccae103e14
2021-01-11 14:40:48 +00:00
Shraddha Agrawal
583405bf96 docs: update datadog integration snaps
### Description
This PR updates the datadog integration screenshots.

### Changelog

- [ ] `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] Docs

### Affected pages
https://deploy-preview-289--hasura-docs-mono.netlify.app/graphql/cloud/metrics/integrations/datadog.html

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 206234de7e461a04ea75715480fa714b35d185a1
2021-01-11 12:58:57 +00:00
surendran82
79095cf66d docs: update logos
GitOrigin-RevId: 0ea3ff19efe2ff93dac17ca903197ab155bad38f
2021-01-11 10:49:18 +00:00
hasura-bot
35143b7939 docs: fix wording in delete mutation
GITHUB_PR_NUMBER: 6427
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6427

Co-authored-by: Vlad Minaev <3295727+web-devel@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 522096265fcae4dbef41bf8c586a62b6f3e7a89a
2021-01-07 13:59:48 +00:00
hasura-bot
6f86d3892a docs: remove blank
GITHUB_PR_NUMBER: 6399
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6399

Co-authored-by: Giovane de Loredo <20311005+gloredo@users.noreply.github.com>
GitOrigin-RevId: 9489a0d086510f6a37f84757d304ecf0f04b7068
2021-01-06 12:02:33 +00:00
Funmilayo E. Olaiya
ff598db965 docs: add same field example for _and syntactic sugar (#274)
GitOrigin-RevId: 202ad631b0ed975a20da13c6262602847da8dc71
2021-01-05 07:18:05 +00:00
Marion Schleifer
bdceb08b50 docs: fix syntax warning (#278)
GitOrigin-RevId: 45c3870547ba7f93684e0fa3374d32b31d8130d7
2021-01-04 09:48:47 +00:00
Karthikeyan Chinnakonda
39a4352569 Merge pull request #113 from hasura/karthikeyan/remote-schema-permissions
server: remote schema permissions
GitOrigin-RevId: 63b9717e30351676c9474bdfddd3ad1ee1409eea
2020-12-21 09:12:35 +00:00
Jigyasu Arya
cdc140cfd4 docs: update cloud-docs screenshots as per the new layout for env vars, collaborators and domain section (#117)
GitOrigin-RevId: 1c91a3e3c8d89dcb0554797bcb6b3ba67ebad015
2020-12-17 08:15:35 +00:00
Rishichandra Wawhal
3736a569ad docs: update cloud docs for new project creation change and regions (#24)
GitOrigin-RevId: 4ce5ada89c11828eb20a9e642d22365c8971adbd
2020-11-27 12:14:33 +00:00
hasura-bot
7b31ff99d1 Support Postgres POSIX regex operators (close #4317) (#119)
Co-authored-by: christophediprima <dipdipdip84@gmail.com>
Co-authored-by: dip <dipdipdip84@gmail.com>
Co-authored-by: Auke Booij <auke@hasura.io>
Co-authored-by: Antoine Leblanc <antoine@hasura.io>
GITHUB_PR_NUMBER: 6172
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6172
GitOrigin-RevId: 5192d238b527cd21b6efb2f74e279ecc34756c29
2020-11-27 10:54:52 +00:00
Vishnu Bharathi
e8429a975d docs: add cloud docs for DataDog exporter (#48)
GitOrigin-RevId: 3f69047f1cdb802f03a94fca908f2ac49df216d9
2020-11-23 15:29:44 +00:00
hasura-bot
fb902d4209 Support tracking SQL functions as mutations. Closes #1514 (#34)
* Support tracking SQL functions as mutations. Closes #1514

Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Brandon Simmons <brandon@hasura.io>
GITHUB_PR_NUMBER: 6160
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6160

* Update docs/graphql/core/api-reference/schema-metadata-api/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Marion Schleifer <marion@hasura.io>

* Update docs/graphql/core/schema/custom-functions.rst

Co-authored-by: Brandon Simmons <brandon@hasura.io>
Co-authored-by: Brandon Simmons <brandon.m.simmons@gmail.com>
Co-authored-by: Marion Schleifer <marion@hasura.io>
GitOrigin-RevId: 8fd39258641ecace6e3e9930e497b1655ad35080
2020-11-18 18:05:59 +00:00
John Bampton
82bc5327ae Fix case of GitHub
GitOrigin-RevId: 148b0050058986cbe6d3e3615dc160abb1644cad
2020-11-17 19:29:41 +05:30
Vishnu Bharathi P
4ebe94914b Revert "docs: fix case of GitHub"
This reverts commit d03365814f.
2020-11-17 19:11:10 +05:30
John Bampton
d03365814f
docs: fix case of GitHub (#5920)
https://github.com/hasura/graphql-engine/pull/5920
2020-11-17 12:00:20 +00:00
Rikin Kachhia
3605945bfc docs: add descriptions for each file in metadata directory
GitOrigin-RevId: b0c5431795f4b24768da334c5876fee6567f42bb
2020-11-17 10:45:01 +00:00
Karthikeyan Chinnakonda
e2d07bb507 console/docs: add support for computed fields for views (close #6168)
Co-authored-by: rikinsk <rikin@hasura.io>
Co-authored-by: Aleksandra Sikora <aleksandra@hasura.io>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: Karthikeyan Chinnakonda <karthikeyan@hasura.io>
GITHUB_PR_NUMBER: 6174
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6174
GitOrigin-RevId: d03d9863251aaab696d34bf3672afa9decd7a5bc
2020-11-12 20:43:49 +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
Rakesh Emmadi
ca47c92f50
server: avoid raising mutation check constraint violation in pg procedure (#6123)
https://github.com/hasura/graphql-engine/pull/6123
2020-11-06 13:22:22 +00:00
Rishichandra Wawhal
3ddf6f2f9b
docs/cloud: add project details doc including project rename (#6051)
https://github.com/hasura/graphql-engine/pull/6051
2020-11-03 09:01:38 +00:00
Marion Schleifer
25892ac70c
docs: add guides to connect to cloud dbs (#5948)
https://github.com/hasura/graphql-engine/pull/5948
2020-11-02 12:20:04 +00:00
Marion Schleifer
f5fd1ecd7d
docs: small fixes (#6100)
https://github.com/hasura/graphql-engine/pull/6100
2020-10-29 14:14:25 +00:00
Karthikeyan Chinnakonda
2cb08a89cb
server: customize tracking tables with a custom name (#5719)
https://github.com/hasura/graphql-engine/pull/5719
2020-10-29 12:48:45 +00:00