Commit Graph

3681 Commits

Author SHA1 Message Date
Rikin Kachhia
0912fcb215 console: handle large db schemas
https://github.com/hasura/graphql-engine-mono/pull/2417

Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 233eb6e61438b965ea3c7832ce44e846ffc16992
2021-09-23 14:59:26 +00:00
Divi
0adf365238 ci: migrate oss console jobs to buildkite
https://github.com/hasura/graphql-engine-mono/pull/2414

GitOrigin-RevId: 1488b67ed5c6323370943cc3cc9cd355f795a73a
2021-09-23 13:49:08 +00:00
Naveen Naidu
3d95c67748 server/query-tags: implement new metadata specification and API
https://github.com/hasura/graphql-engine-mono/pull/2203

GitOrigin-RevId: 6169fcce0c6dccaec055bf8e723e9aa7c19a7f0c
2021-09-23 12:38:56 +00:00
Rakesh Emmadi
cfd76a36bf server/mssql: improve mssql transactions
>

### Description
>
Few improvements to mssql transactions.

### 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] Server
- [ ] Console
- [ ] CLI
- [ ] Docs
- [ ] Community Content
- [ ] Build System
- [ ] Tests
- [ ] Other (list it)

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

GitOrigin-RevId: 808947188f5f3d196c7dfc4ebfa661629db5f8f7
2021-09-23 09:10:28 +00:00
Kali Vara Purushotham Santhati
ffce0d266b cli: non zero exit code if any of the database migrations aren't applied
Issue: https://github.com/hasura/graphql-engine/issues/7499

Problem: cli doesn't exit if `migrate apply --all-databases` fail on 1 or more databases

Solution: Store the names of the databases for which it failed and return
```
operation failed on : <database1>,<database2>,etc
```

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 8a30bdcc24de8a204320b00e5ea9d593a6293ad4
2021-09-23 06:50:25 +00:00
Robert
bdacf1bd23 server: remove ApplicativeDo from default extensions
I spent half the day reducing a weird compile failure here https://github.com/hasura/graphql-engine-mono/pull/1593/files#r713102990 to this https://gitlab.haskell.org/ghc/ghc/-/issues/17768#note_378004. Seems ApplicativeDo makes a mess of non-applicative monadic do in some cases. Given our rather localized use of ApplicativeDo, seemed a good idea to remove it from the list of default extensions.

It appears that ApplicativeDo also buries some unused return value warnings, so this PR also silences those. We should check that none of those warnings were warranted though.

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

GitOrigin-RevId: 1874c1a82230431849265755b1407beebc947041
2021-09-22 15:35:54 +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
24d9bbcd93 cli: apply the migration after creating for flag --from-server
Issue: https://github.com/hasura/graphql-engine/issues/7510

Problem:

- To mark the migration applied after creating the migration from the server with skip-execution flag

Solution:

After creating migration apply it with skip-execution true

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

Co-authored-by: Aravind K P <8335904+scriptonist@users.noreply.github.com>
GitOrigin-RevId: 72eca352b76afe3a19d2198169b31284e38af07a
2021-09-22 11:48:29 +00:00
jkachmar
112d206fa6 Adds Remote Source Join Execution
https://github.com/hasura/graphql-engine-mono/pull/2038

Co-authored-by: Phil Freeman <630306+paf31@users.noreply.github.com>
GitOrigin-RevId: 0843bd0610822469f727d768810694b748fec790
2021-09-22 10:44:01 +00:00
Ikechukwu Eze
be6cd11319 console: fix cross-schema array relationship suggestions
https://github.com/hasura/graphql-engine-mono/pull/2365

GitOrigin-RevId: a677c46c21a067af847643b1dc021f6fcbe025c8
2021-09-22 09:25:19 +00:00
Kali Vara Purushotham Santhati
4cf13762e2 cli: add support for network metadata object
Issue: https://github.com/hasura/graphql-engine/issues/7520

Problem: add support for network metadata object

Solution: add new network.yaml which consists of network metadata and in code add new network metadata object

Metadata.json
```
{
  "resource_version": 6,
  "metadata": {
    "version": 3,
    "sources": [
      {
        "name": "default",
        "kind": "postgres",
        "tables": [],
        "configuration": {
          "connection_info": {
            "use_prepared_statements": true,
            "database_url": {
              "from_env": "HASURA_GRAPHQL_DATABASE_URL"
            },
            "isolation_level": "read-committed",
            "pool_settings": {
              "connection_lifetime": 600,
              "retries": 1,
              "idle_timeout": 180,
              "max_connections": 50
            }
          }
        }
      }
    ],
    "network": {
      "tls_allowlist": [
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "www.google.com"
        },
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "play.golang.com"
        },
        {
          "suffix": null,
          "permissions": [
            "self-signed"
          ],
          "host": "hasura.io"
        }
      ]
    }
  }
}
```
network.yaml
```
tls_allowlist:
- suffix: null
  permissions:
  - self-signed
  host: www.google.com
- suffix: null
  permissions:
  - self-signed
  host: play.golang.com
- suffix: null
  permissions:
  - self-signed
  host: hasura.io

```

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

GitOrigin-RevId: ef508ae946dc5c7c5bcb4a9a3ccb982394ae8639
2021-09-22 08:12:46 +00:00
Martin Mark
12fc9725c1 console: API Headers Checkbox > reverting to legacy-input-fix
https://github.com/hasura/graphql-engine-mono/pull/2376

GitOrigin-RevId: bc9451db156b0db31d7730b0ff3740f0a86f44ad
2021-09-21 14:51:54 +00:00
Evie Ciobanu
1843ee7b0b [server] fix LIMIT optimization not respecting ORDER BY
https://github.com/hasura/graphql-engine-mono/pull/2239

Co-authored-by: Gil Mizrahi <8547573+soupi@users.noreply.github.com>
Co-authored-by: Rakesh Emmadi <12475069+rakeshkky@users.noreply.github.com>
GitOrigin-RevId: fabc825239950b11d673cfd33e8075a01409bcf6
2021-09-21 10:40:24 +00:00
Vijay Prasanna
11d66753be console: add GraphQL customisation under Remote schema edit tab
https://github.com/hasura/graphql-engine-mono/pull/2302

GitOrigin-RevId: 60e420298f568779b2732a3fd90388f8adefa599
2021-09-21 07:54:02 +00:00
Antoine Leblanc
21254256a1 Improve error messages of Metadata API.
### Description

This PR improves error messages in our metadata API by displaying a message with the name of the failing command and a link to our documentation. Furthermore, it harmonizes our internal uses of `withObject`, to respect the convention of using the Haskell type name, now that the Aeson error message is displayed as an "internal error message".

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

GitOrigin-RevId: e4064ba3290306437aa7e45faa316c60e51bc6b6
2021-09-20 19:50:22 +00:00
pranshi06
e77b79ae02 [server] Add GraphQL query in the payload for Synchronous Actions
https://github.com/hasura/graphql-engine-mono/pull/2224

GitOrigin-RevId: 9eb1ab612f1a6cc8fe8490272be3d5a997b5b097
2021-09-20 18:20:33 +00:00
Karthikeyan Chinnakonda
37200f35bd RFC: Event triggers in SQL Server research
https://github.com/hasura/graphql-engine-mono/pull/2043

GitOrigin-RevId: 1e7a028199865c79bd0581b4a1b31dd9c63f8d88
2021-09-20 16:52:58 +00:00
Nicolas Beaussart
a34f8d86cb console: add storybook support
https://github.com/hasura/graphql-engine-mono/pull/2154

Co-authored-by: Matt Hardman <28978422+mattshardman@users.noreply.github.com>
GitOrigin-RevId: e3caefdd0eaa904ed2167248cc166cdb38e7722e
2021-09-20 16:31:25 +00:00
Karthikeyan Chinnakonda
ccf97ab6b0 server: improve event trigger logging
https://github.com/hasura/graphql-engine-mono/pull/2286

GitOrigin-RevId: b3232a08dd7ec2aa0c9e7a2fada0e05e34a1897b
2021-09-20 14:32:31 +00:00
Aniket Deshpande
d358d06e68 MSSQL: custom-check based permissions _exists uses wrong table graphql-engine#7429
https://github.com/hasura/graphql-engine-mono/pull/2317

GitOrigin-RevId: 2ea6c69811d06676c6ea7cf5371c28f021037d72
2021-09-20 10:27:14 +00:00
Tirumarai Selvan
dc8aa9906c spec for multiple admin secrets
GitOrigin-RevId: 8778c498d90c50cc144ed49b47cbbb657e712545
2021-09-20 09:02:18 +00:00
Karthikeyan Chinnakonda
5f79b5f102 server: generalize the event triggers codepath for all backends
https://github.com/hasura/graphql-engine-mono/pull/2189

Co-authored-by: hasura-bot <30118761+hasura-bot@users.noreply.github.com>
Co-authored-by: Martin Mark <74692114+martin-hasura@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
Co-authored-by: Sameer Kolhar <6604943+kolharsam@users.noreply.github.com>
Co-authored-by: Antoine Leblanc <1618949+nicuveo@users.noreply.github.com>
Co-authored-by: Matt Hardman <28978422+mattshardman@users.noreply.github.com>
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
Co-authored-by: Divi <32202683+imperfect-fourth@users.noreply.github.com>
GitOrigin-RevId: 97c71571656c6e0c57d06f2d38193833180901c0
2021-09-20 07:35:49 +00:00
hasura-bot
b50c4aee1d cli: install v2.0.9 by default instead of v2.0.6
GITHUB_PR_NUMBER: 7575
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7575

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

Co-authored-by: Tyler Breisacher <244381+MatrixFrog@users.noreply.github.com>
Co-authored-by: Vishnu Bharathi <4211715+scriptnull@users.noreply.github.com>
GitOrigin-RevId: afc8c5cc178e16deb89046d1df4d80fafea69147
2021-09-20 05:56:17 +00:00
Rakesh Emmadi
9ca0bc1e5c server: remove identity notion from table columns
>

### Description
>
While adding [insert mutation schema parser for MSSQL backend](https://github.com/hasura/graphql-engine-mono/pull/2141) I also included [identity](https://en.wikipedia.org/wiki/Identity_column) notion to table columns across all backends. In MSSQL we cannot insert any value (even `DEFAULT` expression) into Identity columns. This behavior of identity columns is not same in Postgres as we can insert values. This PR drops the notion of identity in the column info. The context of identity columns for MSSQL is carried in `ExtraTableMetadata` type.

### 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] Server
- [ ] Console
- [ ] CLI
- [ ] Docs
- [ ] Community Content
- [ ] Build System
- [x] Tests
- [ ] Other (list it)

### Related Issues
->
Fix https://github.com/hasura/graphql-engine/issues/7557

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

GitOrigin-RevId: c18b5708e2e6107423a0a95a7fc2e9721e8a21a1
2021-09-17 09:03:06 +00:00
Swann Moreau
8bfcd9a55c server: add "extensions" field to action webhook error schema
https://github.com/hasura/graphql-engine-mono/pull/1698

GitOrigin-RevId: c3b6f1048b6702a53ebe6c49f23dedc0f1d88090
2021-09-17 07:44:37 +00:00
pranshi06
d916326f4f Change kriti-lang repo protocol from ssh to https
https://github.com/hasura/graphql-engine-mono/pull/2370

GitOrigin-RevId: 0ede9f35f70aaf682bce0499b56be9c49a619ce3
2021-09-16 20:17:03 +00:00
Robert
d900a65399 server: Reduce and localize CPP usage
Some of our use of CPP causes trouble for ormolu, compare https://github.com/tweag/ormolu/issues/774.
Specifically, for understandable reasons, it can't deal well with `#ifdef` use that is not at the top-level.

This PR removes the problematic usage in ways that I hope are also a net non-loss regardless of helping
out ormolu (or other tooling).

- The default value for enabled APIs moves to the top level, next to the command line help, so
  they'll stay in sync more easily.
- All the CPP around using `assertNFHere` is moved to one module.

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

GitOrigin-RevId: ed6e039e6d8960322fd8d1312df762ad197c29b1
2021-09-16 18:52:37 +00:00
Robert
260202e0fa build: use shared root cabal.project for ci-build targets
This change was prompted by how `make ci-build` in `./server` clobbered my
`cabal.project.local`. Addressing that more directly proved awkward, thus this
change, which makes both `ci-build` targets use a shared `/cabal.project.ci.*`
(via `--with-project-file`).

Also removes some pro targets/scripts which were definitely broken thus unused.

### Affected components
- [x] Build System

### Steps to test and verify

If CI still passes, this should be safe.

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

GitOrigin-RevId: 1494824cabd2fbe6415d050c19e27f37bb51b86b
2021-09-16 17:21:00 +00:00
Karthikeyan Chinnakonda
169a49f2bb server: export metadata V2 should not export cron triggers with included_in_metadata: false
https://github.com/hasura/graphql-engine-mono/pull/2366

GitOrigin-RevId: 88c3a5a1f10ea1cf0e2192c69da5cc4147f70ae3
2021-09-16 15:08:45 +00:00
Antoine Leblanc
07fd7324c3 server: enable StrictData by default (fix hasura/graphql-engine#3941)
## Description

Almost all our data structures use strictness annotations, following [our styleguide's principle](https://github.com/hasura/graphql-engine/blob/master/server/STYLE.md#dealing-with-laziness) of "by default, use strict data types and lazy functions". The very few cases where we actually need laziness were already explicitly labelled as lazy with the `~` prefix operator.

This PR simply globally enables `StrictData`, allowing us to express records without `!()` on every field, but makes no attempt at cleaning existing code.

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

Co-authored-by: Philip Lykke Carlsen <358550+plcplc@users.noreply.github.com>
GitOrigin-RevId: e65c6e2f89413188da250122f64c2173615946ec
2021-09-16 12:23:15 +00:00
Solomon Bothwell
af5ff07614 Request Transformations
https://github.com/hasura/graphql-engine-mono/pull/1984

Co-authored-by: jkachmar <8461423+jkachmar@users.noreply.github.com>
GitOrigin-RevId: 1767d6bdde48c156fe171b5a9b7e44d7f2eb4869
2021-09-16 11:03:57 +00:00
hasura-bot
d31fe33754 docs: use placeholder for version in cli migrations image page
GITHUB_PR_NUMBER: 7559
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7559

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

Co-authored-by: Irakli Gozalishvili <21236+Gozala@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: 5e95b377586b61884cfe50b13ad3a57676b4f397
2021-09-16 09:39:08 +00:00
David Overton
7c77c81cf9 return original schema in introspect_remote_schema
https://github.com/hasura/graphql-engine-mono/pull/2364

GitOrigin-RevId: 99698aa977bf8ff85e29d67a0956ff1509cd30be
2021-09-16 09:07:18 +00:00
Antoine Leblanc
e2ce1972f6 Prevent empty subscription roots (fix hasura/graphql-engine#6898)
### Description

We always build a subscription root, even when there was no possible fields. This breaks some third party clients, as the spec does not allow empty types in the schema. This PR fixes this by changing the `buildSubscriptionParser` helper to return a `Maybe` value, and harmonizes / cleans places where we build the subscription root.

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

GitOrigin-RevId: 1aeae25e321eee957e7645c436d17e69207309fd
2021-09-16 07:42:46 +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
Robert
fe035125f4 server: drop LazyTxT newtype
This is a follow-up to #1959.

Today, I spent a while in review figuring out that a harmless PR change didn't do anything,
because it was moving from a `runLazy...` to something without the `Lazy`. So let's get
that source of confusion removed.

This should be a bit easier to review commit by commit, since some of the functions had
confusing names. (E.g. there was a misnamed `Migrate.Internal.runTx` before.)

The change should be a no-op.

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

GitOrigin-RevId: 0f284c4c0f814482d7827e7732a6d49e7735b302
2021-09-15 20:46:45 +00:00
Abby Sassel
9b7234b861 server/bigquery: add explicit order_by argument to fix non-deterministic test failures
https://github.com/hasura/graphql-engine-mono/pull/2355

GitOrigin-RevId: d2e088e1f1edd3c4bb2912b285fde8feeb3889ed
2021-09-15 15:44:45 +00:00
Antoine Leblanc
a5589c185b Fix nullability of nested objrel inserts (fix hasura/graphql-engine#7484)
### Description

During the PDV refactor that led to 2.0, we broke an undocumented and untested semantic of inserts: accepting _explicit_ null values in nested object inserts.

In short: in the schema, we often distinguish between _explicit_ null values `{id: 3, author: null}` and _implicit_ null values that correspond to the field being omitted `{id: 3}`. In this particular case, we forgot to accept explicit null values. Since the field is optional (meaning we accept implicit null values), it was nullable in the schema, like it was in pre-PDV times. But in practice we would reject explicit nulls.

This PR fixes this, and adds a test. Furthermore, it does a bit of a cleanup of the Mutation part of the schema, and more specifically of all insertion code.

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

GitOrigin-RevId: 895cfeecef7e8e49903a3fb37987707150446eb0
2021-09-15 13:11:48 +00:00
Rikin Kachhia
9fdd1bd844 docs: update api limits page
https://github.com/hasura/graphql-engine-mono/pull/2354

GitOrigin-RevId: 0fbe13e3c9b34bc9f8ece7417d9e950276c1ea7d
2021-09-15 11:03:33 +00:00
Antoine Leblanc
75d374bf26 Add new documentation folder and two documentation files
As discussed on Slack, we're thinking of updating the documentation that was in the old graphql-engine wiki, and bring it to the repo. This PR creates the new folder, and adds two pieces of documentation: a high-level overview of the system, and a description of our schema-building code (the so-called "PDV parsers").

One thing to be discussed: how do we do cross-file references? To an extent, this will depend on what tool we use for rendering them, to where we upload the generated files.

Another point is: we should update our CI to avoid running tests on changes in `server/documentation`.

Rendered:
- [high level overview](https://github.com/hasura/graphql-engine-mono/blob/nicuveo/server-docs/server/documentation/overview.md)
- [schema code](https://github.com/hasura/graphql-engine-mono/blob/nicuveo/server-docs/server/documentation/schema.md)

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

GitOrigin-RevId: f729616d28e8f2f30c0a07583b53460510bafd80
2021-09-15 10:04:24 +00:00
Karthikeyan Chinnakonda
982b5a3d15 server: log operation details for each query in a batch query execution
https://github.com/hasura/graphql-engine-mono/pull/2306

GitOrigin-RevId: 066a02fc57711b1faad447e6e448e3e004376c74
2021-09-15 08:30:32 +00:00
Vishnu Bharathi
f2971dd515 misc: update OSS github issue template to use kind labels
https://github.com/hasura/graphql-engine-mono/pull/2348

GitOrigin-RevId: 4c11d389c9fc736ed18c5dc92887d0d0e9289c01
2021-09-15 04:30:47 +00:00
Philip Lykke Carlsen
5c54e33dcc Small revisions to documentation
This PR only contains minor changes to documentation that I have collected over some time, revising text as I was passing by.

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

Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: f3329f3212b831f1f3c74a299734faff337b1017
2021-09-14 15:47:38 +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
Karthikeyan Chinnakonda
a268a3dc2f server: fix bug which allowed metadata to be inconsistent in the replace_metadata API call
https://github.com/hasura/graphql-engine-mono/pull/2288

GitOrigin-RevId: 93b181c957a5c38748c419a5146f0590605957ce
2021-09-14 12:03:06 +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
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
Matt Hardman
bbed956137 console: support tracking of functions with return a single row (close#2281)
### Description
- Tracking functions that return a single row were unsupported, this was fixed with -> [this](https://github.com/hasura/graphql-engine/issues/4299#issuecomment-911553730)
- This PR updates the console to list functions that return a single row as trackable

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

### Related Issues
#2281

### Solution and Design
>

### Steps to test and verify

- Create the following table

```sql
create table users (
    "id" int primary key,
    "name" text
);
```

- Create a function that returns one row, (don't tick track function)

```sql
CREATE OR REPLACE FUNCTION public.me()
 RETURNS users
 LANGUAGE sql
 STABLE
AS $function$
select *
from public.users
where id = 1;
$function$
```

- click on the schema and the function should appear in untracked functions

<img width="614" alt="Screenshot 2021-09-13 at 11 18 30" src="https://user-images.githubusercontent.com/28978422/133067170-24d5adc7-73d4-44ae-941f-ed790d2d861c.png">

---

### Kodiak commit message
Information used by [Kodiak bot](https://kodiakhq.com/) while merging this PR.

#### Commit title
Same as the title of this pull request

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

Co-authored-by: Ikechukwu Eze <22247592+iykekings@users.noreply.github.com>
GitOrigin-RevId: 6365a1bf35205a51e995c2b17104eb2f79563756
2021-09-14 05:29:08 +00:00
Antoine Leblanc
e93ddc1b53 Disable test_pg_add_source_with_source_parameters locally.
### Description

Our python test suite has several major problems; one of them being that the tests themselves are not responsible for their own setup. We are therefore using environment variables for all matters of configuration, such as _where the postgres instance is_. This is something that should be changed, but in the meantime, it is the test implementer's responsibility to ensure that tests have a consistent setup in CI and locally, or to to add the proper "skip" annotations.

The recently added `test_pg_add_source_with_source_parameters` fails to do so: as it tests adding a postgres source from hardcoded parameters, rather than relying on environment variables, it only works if the postgres instance is at the matching address, which happens to be the one set in the circle ci config. This is undesirable for two reasons:
- it breaks local tests: running tests locally with `dev.sh` sets postgres up differently, and the test fails;
- a change to the circle config would result in failures in that test.

Sadly, there's no good solution here: our tests do not currently support expanding environment variables in the queries' yaml files, meaning it's not possible to set the values of all those parameters differently in each environment. And we haven't yet started working towards having a unified testing environment setup.

As a result, this PR disables the offending test UNLESS the postgres instance happens to be exactly where the test expects it. This is also very inelegant and adds more tech debt to the pile, but I do not see how to fix this with our current test infrastructure. :(

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

GitOrigin-RevId: 8bc9142075d14acaa48e9c4b20de2527185bc75c
2021-09-14 04:11:09 +00:00
Sameer Kolhar
bafefac73d server: update create_scheduled_event API to respond with event_id
https://github.com/hasura/graphql-engine-mono/pull/2313

GitOrigin-RevId: a72880734074105d55bb387fdb5d1a9f5fac1d72
2021-09-13 18:01:55 +00:00