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

feat: add EU host support [DANTE-1574] #908

Merged
merged 5 commits into from
Jun 18, 2024
Merged

Conversation

mayakarabula
Copy link
Member

@mayakarabula mayakarabula commented Jun 10, 2024

Allow user to pass a --host parameter, this then will set CDA and CMA clients to use either US or EU APIs

@mayakarabula mayakarabula marked this pull request as ready for review June 12, 2024 15:31
@mayakarabula mayakarabula requested a review from a team as a code owner June 12, 2024 15:31
README.md Show resolved Hide resolved
src/engine/client/index.ts Outdated Show resolved Hide resolved
}: CreateClientParams & { sequenceKey: string }) => {
const config = loadRuntimeConfig()

const { cmaHost, cdnHost } = getHosts(host || config.host || 'api.contentful.com')
Copy link

Choose a reason for hiding this comment

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

Do I understand it right that create only uses CDA while apply only uses CMA? It feels a bit weird then to pass api.contentful.com to both. Could we use a similar pattern here as we do with the token and have separate cmaHost and cdaHost params?

Copy link
Member Author

Choose a reason for hiding this comment

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

so yes, create uses CDA and apply uses CMA, but in the current setup, we just create an API client that has access to both, I wouldn't necessarily want to change that right now although I see your point that it's not needed to have both APIs for both use cases

@mayakarabula mayakarabula changed the title feat: add EU host support feat: add EU host support [DANTE-1574] Jun 14, 2024
@mayakarabula mayakarabula requested a review from Silhoue June 17, 2024 08:34
@mayakarabula mayakarabula merged commit 1246a30 into main Jun 18, 2024
6 checks passed
@mayakarabula mayakarabula deleted the feat/add-eu-host-support branch June 18, 2024 12:41
@contentful-automation
Copy link

🎉 This PR is included in version 2.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants