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

gergo/web 2158 previews module multi region #3492

Merged
merged 5 commits into from
Nov 19, 2024

Conversation

gjedlicska
Copy link
Contributor

  • feat(previews): multi region previews module
  • feat(preview-service): talk multi region

Description & motivation

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

Copy link

linear bot commented Nov 13, 2024

Copy link
Contributor

📸 Preview service has generated an image.

@gjedlicska
Copy link
Contributor Author

@iainsproat i'd like to get some help fixing the preview service test job.

It does not work the way you set it up any more. We cannot inject the DB all the way down cause of multi region project selection

I've tested locally, and both mainDb and regional previews are generated.

Copy link
Contributor

📸 Preview service has generated an image.

fabis94
fabis94 previously approved these changes Nov 15, 2024
Copy link
Contributor

@fabis94 fabis94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess so?

}

start()
.then()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the .then()/.catch() bits are redundant


const isDevEnv = process.env.NODE_ENV === 'development'

export const getDbClients = async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already better than it was, but in the future we can probably even extract a lot of this DB querying/"repository" logic that is common between these BG services into shared as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in future, preview service should be given a short-lived API token and call the API on the server instead of duplicating the objects stuff.
But that's a discussion & refactor for the future, not one to hold up this PR.

Copy link
Contributor

📸 Preview service has generated an image.

Copy link
Contributor

📸 Preview service has generated an image.

@gjedlicska gjedlicska merged commit ef043ee into main Nov 19, 2024
28 of 30 checks passed
@gjedlicska gjedlicska deleted the gergo/web-2158-previews-module-multi-region branch November 19, 2024 15: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