这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@karthikvt26
Copy link
Contributor

Fix #876

Description

Table key in schema is object for tables in non public schema and string for tables public schema. Added a function which will check the type and return the table name

What component does this PR affect?

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Requires changes from other components? If yes, please mark the components:

  • Server
  • Console
  • CLI
  • Docs
  • Community Content
  • Build System

Related Issue

Solution and Design

Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs update
  • Community content

Checklist:

  • I have read the contributing guide and my code conforms to the guidelines.
  • This change requires a change in the documentation.
  • I have updated the documentation accordingly.
  • I have added required tests.

@karthikvt26 karthikvt26 added the c/console Related to console label Oct 27, 2018
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-879.herokuapp.com

@karthikvt26 karthikvt26 changed the title Issue 876 Fix suggested relationships for non-public schema: #876 Oct 27, 2018
@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-879.herokuapp.com

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-879.herokuapp.com

@hasura-bot
Copy link
Contributor

Review app available at: https://hge-ci-pull-879.herokuapp.com

@praveenweb praveenweb added the s/ok-to-merge Status: This pull request can be merged to master label Oct 27, 2018
@shahidhk shahidhk changed the title Fix suggested relationships for non-public schema: #876 handle table/schema names in relationship suggestions properly (close #876) Oct 27, 2018
@shahidhk shahidhk merged commit 4e08be1 into hasura:master Oct 27, 2018
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-879.herokuapp.com is deleted

hasura-bot pushed a commit that referenced this pull request Jul 25, 2024
…879)

This PR updates as many tests as possible that use the custom connector
so that the tests run over two versions of the custom connector:
1. The custom connector in the repo, which currently speaks `ndc_models`
v0.2.x
2. The custom connector from the past (commit ), which is the last
version to speak `ndc_models` v0.1.x

This helps us test both the NDC v0.1.x and v0.2.x code paths. When the
postgres connector upgrades to v0.2.x, we can use the same approach as
in this PR to get the tests to run over multiple versions of the
postgres connector too, for much better coverage. This approach with the
custom connector will become less useful over time as the v0.1.x
connector is not updated and will diverge in data from the v0.2.x
connector. The postgres connector is likely to be longer-lasting, as it
is more stable.

The basic test used for `execute` integration tests is
`test_execution_expectation` (in `crates/engine/tests/common.rs`) and it
has been extended into a version called
`test_execution_expectation_for_multiple_ndc_versions` that takes
metadata on a per NDC version basis and then runs the test multiple
times, once for each NDC version. This allows one to swap out the
DataConnectorLink involved in the test to a different one that points at
either the v0.1.x or v0.2.x versions of the connector. The assertion is
that both connectors should produce the same results, even if they talk
a different version of the NDC protocol. As each version runs, we
`println!` the version so that if the test fails you can look in stdout
for the test and see which one was executing when it failed.

Tests that use the custom connector now use
`test_execution_expectation_for_multiple_ndc_versions` and run across
both connector versions. Some tests were unable to be used across both
version as the data between the two versions has changed. Some tests
were modified to avoid the changed data so as to support running across
both versions. Any tests that use `test_execution_expectation_legacy`
don't run across both versions because those tests aren't backed by the
same test implementation as
`test_execution_expectation_for_multiple_ndc_versions`.

Unfortunately the custom connector doesn't use the standard connector
SDK, so it doesn't support `HASURA_CONNECTOR_PORT`. This means that the
old connector is stuck on 8101. To work around this, I've moved the
current connector port to 8102 instead. Technically we might be able to
use docker to remap the ports, but then this binds us into always
running the connectors in docker in order to move their ports around, so
I avoided that approach.

Completes APIPG-703

V3_GIT_ORIGIN_REV_ID: fb0e410ddbee0ea699815388bc63584d6ff5dd70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/console Related to console s/ok-to-merge Status: This pull request can be merged to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using suggested relationships via console on foreign keys on tables across postgres schemas causes bug

4 participants