Stuck on "Source and destination environments must have the same schema"

Hello!

I have 3 environments: Development, DEV, and PROD. I want to push code from Development to DEV but every time I try to I get the following:

Failed to push branch: Source and destination environments must have the same schema. Please check your environment code is synchronized.

I have deployed changes two times before successfully. To me, it seems both schemas are up-to-date, maybe you can check on your side and make sure that is correct. The project name is Of Color.

Hey @ro_puente, and welcome to our community :wave:,

I can spot a schema difference between your DEV and Development environment, on collection “company” (fincoach_url, has_group_coaching are present in your development schema, but not in DEV).

Could you confirm that both .forestadmin-schema.json on those 2 environments are exactly the same?
Could you also confirm that your .forestadmin-schema.json is handle by your VCS?

If you have our forest command line tool installed, you should be able to use forest schema:apply to force apply the correct schema on your remote (DEV) environment (See documentation). However, this shouldn’t be needed, and may indicate an issue with the way your agent is versionned/deployed.

Let me know if that help :pray:

It’s a tad late for the response, but our CI/CD was trying to create the schema on our docker image on a non-existent folder (when it wasn’t supposed to). We manage to fix the issue using the property

        schemaPath: process.env.FOREST_FILE,

And specifying an existing route on the image.

1 Like