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

Unable to create Default tenant shell context with features in new environment after upgrade to OC 1.7.0 #14929

Closed
jsquared2 opened this issue Dec 21, 2023 · 4 comments
Labels
Milestone

Comments

@jsquared2
Copy link

jsquared2 commented Dec 21, 2023

Describe the bug

This issue manifests after upgrade from OC 1.5.0 to 1.7.0. When starting the application on a new environment (new database and no site configurations) the Default tenant shell context is created without any features.

This prevents any of the modules from being started and failure to apply any DataMigration.

After some investigation, was able to determine that the issue was introduced by this PR #13221, which creates the shell context for the Default tenant with a blank ShellDescriptor instead of the MinimumShellDescriptor, which references all the necessary features.

We can work around this issue by restoring the call to MinimumShellDescriptor but need to determine what the proper fix is.

To Reproduce

Steps to reproduce the behavior:

  1. Provision new environment (new database, no site configuration)
  2. Start application.
  3. See error on browser displaying a 404 on the web root of the application.

Expected behavior

After application startup, browser should display the welcome page on the web root of the application.

Screenshots

`

@jtkech
Copy link
Member

jtkech commented Dec 21, 2023

Maybe because you kept the App_Data/tenants.json file stating that the Default tenant is already in the Running state which would skip the Setup step.

@jsquared2
Copy link
Author

Maybe because you kept the App_Data/tenants.json file stating that the Default tenant is already in the Running state which would skip the Setup step.

Thanks for the tip but this scenario is for a fresh environment that has no tenant or site configurations. That said, I think you are probably right about the Default tenant being in the incorrect state. I debugged the logic below and the Default tenant is always in Running state despite no pre-existing configurations. Is there anything else that may be setting the tenant state incorrectly?

image

@jtkech
Copy link
Member

jtkech commented Dec 23, 2023

Tenant states come from the tenants.json under App_Data by default, but I assume that you have removed this folder. Can come from other config sources, from a database or Azure blob but this needs to be configured and an helper should be used at the app level in Program.cs.

Can also come from other sources like the app level appsettings.json where we can explicitly provide tenant states and a set of features (rarely used), or where we can define an AutoSetup providing all what is needed for a setup including a setup recipe name.

In your case with a 404 at the home, it's like you run an auto setup using the saas recipe which only provides the admin part.

@sebastienros
Copy link
Member

The repro steps are identical to #14930 so I will assume this is the same issue.

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

No branches or pull requests

4 participants