Schema changes not picked up by production env

Feature(s) impacted

Reading forestadmin-schema.json by production environment

Observed behavior

Changes in forestadmin-schema.json are not picked up by Forest interface in production environment

Expected behavior

Changes in forestadmin-schema.json to be reflected in production Forest layout

Context

Please provide in this mandatory section, the relevant information about your configuration:

  • Project name: Kick
  • Environment name: Production
  • Agent type & version: forest-express-sequelize@7.12.2
  • Recent changes made on your end if any:

Production was not updated for ~6 months. In meantime, forest-express-sequelize was updated from v6 to v7, new dev workflow and user roles were enabled on the project. An updated production was moved to another server, with a different URL. We’ve updated production env URL and it mostly works. However, we’ve noticed a new forestadmin-schema.json is not read by Forest. Some removed columns are still visible and new ones are not shown. What’s interesting, when showing a collection with an unexisting column, request will not fail but will ignore this column. It seems like forest-express-sequelize on our server is aware of the changes, but Forest UI isn’t. Some examples of changes that are not picked up in Forest UI:

  • client.dwollaKycStatus column was removed
  • client.kycStatus column was added
  • boost.extendedDescription column was added

Thanks in advance for your help!
Adrian

Hey @agarbund,

Thanks for reaching out :raised_hands:

Did you change your models directly on your production instance?
If that’s the case, it is the reason why your forestadmin-schema is not synchronized.
Indeed, you are supposed to make those changes on your development instance first (it will update the forestadmin-schema) and then to include this updated file when deploying to your production instance.

Does this make sense to you?

Thanks.

Hey, yes we’ve followed the full cycle. Update models on dev, commit generated forestadmin-schema.json into git, deploy on remote env and test there and then release to prod. Schema updates are not picked up only on prod, on other remote envs it works fine

Hi @agarbund :wave: i’m afraid, i checked on our side and it seem your “Production” environment schema have the client.dwollaKycStatus field.
Have you got any error logs on your production server?
Maybe the schema not send or something like that?
Let me know

Hey @Arnaud_Moncel so the production env is deployed as a docker container and I don’t have a clear way of SSH-ing into it to check the .forestadmin-schema.json there. The code which is used for building a container for sure doesn’t have any reference to dwollaKycStatus in .forestadmin-schema.json.

I understand it’d be best to double-check and get the content of a file that is physically in production. Does forest-express-sequelize expose some endpoint to do that? If not, I can deploy a version which will expose .forestadmin-schema.json under some temporary endpoint

Btw here is a .forestadmin-schema.json used for building a container:
forestadmin-schema.tar.gz (2.7 KB)

Unfortunately forest-express-sequelize doesn’t provide this endpoint.

Well, after deployment the new schema was picked up. Not sure why it wasn’t picked up before. Nvm, issue solved.

1 Like

Glad to hear that :+1:

1 Like