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

add await when invoking schemaVersion #557

Merged
merged 3 commits into from
Apr 16, 2020
Merged

Conversation

barakcoh
Copy link
Contributor

@barakcoh barakcoh commented Mar 31, 2020

Check List

  • [X ] Tests has been run in packages where changes made if available
  • [ X] Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Description of Changes Made (if issue reference is not provided)

Add support for cases where schemaVersion needs to be async, e.g. fetching the version from remote storage

@paveltiunov
Copy link
Member

@barakcoh Hey Barak! Just briefly checked code usage and it seems it probably not so easy as I thought before. schemaVersion property set in CubejsServerCore.getCompilerApi() and it isn't async. Good new is probably we can make it async.

@barakcoh
Copy link
Contributor Author

barakcoh commented Apr 2, 2020

@paveltiunov
Copy link
Member

@barakcoh Yeah. Right. And make it async.

@paveltiunov
Copy link
Member

@barakcoh Just checked usages more thoroughly and it seems we're safe to revert all changes to index.js as only await is in fact required. So your initial change was correct.

@barakcoh
Copy link
Contributor Author

thanks @paveltiunov i'll push a reverse commit

@paveltiunov paveltiunov merged commit 964c6d8 into cube-js:master Apr 16, 2020
y-lohse added a commit to y-lohse/cube.js that referenced this pull request Aug 28, 2021
Following cube-js#557, the `schemaVersion` option also supports an async function.
@y-lohse y-lohse mentioned this pull request Aug 28, 2021
4 tasks
ovr pushed a commit that referenced this pull request Aug 29, 2021
Following #557, the `schemaVersion` option also supports an async function.
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.

None yet

2 participants