Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Database Introspection on Startup #186

Merged
merged 5 commits into from
Jun 3, 2022

Conversation

kon14
Copy link
Contributor

@kon14 kon14 commented Jun 3, 2022

Disables automatic database introspection on Database startup.
A simple collection name check is now performed by default, comparing available db schemas with whatever, if anything, is already available in DeclaredSchemas, storing foreign schema collection names in the adapter for later use.

DeclaredSchemas is now aware of schemas' collection names.
Any Conduit module schemas attempting to be registered using a used collection name now get their actual collection name prefixed by cnd_.

Introspection can still be triggered through a POST @ /admin/database/introspection.
Added a new admin route (GET @ /admin/database/introspection) for retrieving information on current introspection state:

  • foreignSchemas (schemas that have never been imported)
  • foreignSchemaCount
  • importedSchemas (schemas that have previously been imported and may be reimported at will)
  • importedSchemaCount

Added getPendingSchema (by id) admin route as requested by UI team.

Fixed finalizeSchemas admin route not throwing on empty schemas array input.

Note: Building this after updating node_modules post #184 depends on #185 getting merged as node build types have been messed up.

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the main branch
  • When resolving a specific issue, it's referenced in the PR's description (e.g. fix #xxx, where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature

@kon14
Copy link
Contributor Author

kon14 commented Jun 3, 2022

Added getPendingSchema (by id) admin route as requested by UI team.

@kon14 kon14 requested a review from Michael-Vol June 3, 2022 14:29
@kkopanidis kkopanidis merged commit da9a3df into main Jun 3, 2022
@kkopanidis kkopanidis deleted the disable-auto-introspection branch June 3, 2022 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants