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

Change content source #123

Merged
merged 23 commits into from
Dec 12, 2023
Merged

Change content source #123

merged 23 commits into from
Dec 12, 2023

Conversation

jst-cyr
Copy link
Contributor

@jst-cyr jst-cyr commented Dec 8, 2023

⚠If this PR is merged, Vercel will need to be updated with a new API key for delivery endpoint. ⚠

This PR is to make the updates necessary for migrating to the new schema. Because the new instance has slightly different type names and field names, some changes have been made to the codebase to accommodate these in the queries.

The Cypress tests are now configured to use a v2 API Key that points to the new tenant Preview endpoint. Vercel is configured to have a preview endpoint API key tied specifically to this branch.

While in there, a few other issues were fixed:

  1. Code that was outputting Personas and Avatars JSON to the console has been removed.
  2. Application will now throw an error when no enabled themes are returned by the service
  3. Removed console write from the ThemeService as well that was outputting data to the log.

Fixes #13

@jst-cyr jst-cyr added the enhancement New feature or request label Dec 8, 2023
@jst-cyr jst-cyr self-assigned this Dec 8, 2023
Copy link

vercel bot commented Dec 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sitecore-migration-game ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2023 7:40pm

@dylanyoung-dev
Copy link
Contributor

Looks like an issue with the Bolded question is missing? Was that intentional?

2023-12-12_09-04-45

@jst-cyr
Copy link
Contributor Author

jst-cyr commented Dec 12, 2023

Definitely not expected. Let me look into what is happening there.

@jst-cyr
Copy link
Contributor Author

jst-cyr commented Dec 12, 2023

@dylanyoung-dev : It was a mismatch between the new schema/GraphQL and the IPrompt property. Would be nice if applications didn't fail quite so nicely :D. That particular issue should be resolved now.

Copy link
Contributor

@thomas-desmond thomas-desmond left a comment

Choose a reason for hiding this comment

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

This looks like a clean change to me. Everything worked for me on the preview branch.

I like the idea of this going live with the method we talked about yesterday. Change component.yml & e2e.yml back to original variables, change Vercel secrets, change GitHub secrets, merge into main.

We may have an issue with tests not passing once changing the yml files but we can deal with that.

Copy link
Contributor

@dylanyoung-dev dylanyoung-dev left a comment

Choose a reason for hiding this comment

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

Just completed several rounds of tests and the only thing I found out of the ordinary is that the personas are in a different order than what is on migration.sitecore.com, but I'm not even sure if the order matters here, and if we are doing anything to sort them. Probably just a side effect of their publish date or something like that.

As for how we deploy, the method that @thomas-desmond mentions here, sounds good. Otherwise I'll approve this PR.

@jst-cyr
Copy link
Contributor Author

jst-cyr commented Dec 12, 2023

@dylanyoung-dev : I also noticed the ordering issue, and the order we have on current production is also not the desired order. I've logged issue #124 the other day to capture this.

Secret in GitHub is now updated with the production delivery endpoint for the new content source
@jst-cyr
Copy link
Contributor Author

jst-cyr commented Dec 12, 2023

I have updated from Main, updated the GitHub secret to use the Preview API Key for the new source, and rolled back the tests to use the normal API Key variable. The 'v2' variable is now gone.

All tests have passed, code is in stable state, and preview site looks good. Now moving to update Vercel environment variables before the merge.

@jst-cyr jst-cyr merged commit 3db2fd7 into main Dec 12, 2023
4 checks passed
@jst-cyr jst-cyr deleted the change-content-source branch December 12, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration of Content + Content Types in CH1
3 participants