Unable to deploy to production enviroment

Feature(s) impacted

I cannot deploy production modifications to Production

Observed behavior

on production server, after forest:schema:update (which works well) I am trying to make forest:deploy

$ forest deploy
? Deploy layout changes to reference? Yes

and i’ve got this error:

× Environment source current branch Production branch (id: xxxxx) has no target origin

tried to do

forest set-origin Production

with error:

× Cannot set orgin to the “Production” reference environment.

Expected behavior

New table are visible in Production environment (in project settings / roles … / Production)

Context

  • Project name: Hectar-Connect
  • Team name: Operations
  • Environment name: Production
  • Agent type & version: forest-cli/3.0.1-beta.1 linux-x64 node-v16.17.0

Hello @tslominski ,

What is your current branch on which you tried to run the deploy command (use forest branch to see this info) ? Can you also give me the last 4 characters of your FOREST_ENV_SECRET in your .env file? :thinking:

Kind regards,

Florian

forest branch return error:
× Cannot read properties of undefined (reading ‘name’)

fa53

Hello,
I will try to help you.
First of all, this documentation link can help you to deploy your changes: doc.
Did you do these modifications on your local machine or directly on your server ?
The standard way is to create a branch on your local machine with the production origin. After that, you can update the layout and the .forestadmin-schema.json.
At the end, you should deploy the layout (forest deploy) and push the schema to your production server (for example with your git flow). In production, the schema is not automatically computed because normally it is already in your source.

Tell me if it helps you :pray:

Hello,
I tried to do modifications directly on server (as changes in FA needs to be synchronised with deployment)
I think that there is problem with the branch creation, when I try to create branch as per doc, I’ve this error:

$ forest branch prod --origin Production
× The remote environments can’t have additional branches.
$ forest branch prod --origin production
× The remote environments can’t have additional branches.

also, schema is generated - I can run forest schema:update without problem and it makes the job

Ok !
You have these errors because you want to push your modification on the your origin but production does’t have origin because its is the production.
Some tips that can help you.

  1. Restart your server after executed the forest:schema:update.
  2. Go to the forestadmin app, click on the edit layout button and please check if you can see your table in grey. It means is not visible and you should enable it by clicking on the grey eye.

ok, now they are there, but it clearly wasn’t the case yesterday nor Wednesday (and I restarted server a few times), so probably I am missing something. Is it possible to know since when table is mentor_exp_type_ment_lines is present in FA (environment Production)?
And second question: how can I make forest great again, ie. having “forest deploy” working on my production server ?

Your schema was updated yesterday at 12h46:05 with the mentor_exp_type_ment_lines collection.
What do you mean by “how can I make forest great again” ? You don’t need to use the forest deploy command if you modify your layout directly on your production.

I’ve impression that it doesn’t work; I am restarting server but in vain - there is no update in FA backoffice even if my model file is updated. Is there any log I can consult to verify if structure was send to FA? Any hint why it is not working as expected?

I’ve added manually new columns to model file
I’ve restarted the server
Columns are not visible …

Production environment (model mentors, fields onboardingSessionDone and onboardingSessionDate)

Hello,
I have checked your uploaded schema and there are the model mentors with all these fields. The last time you have updated the schema is onOct 14 17:22:01 and it is your Production environment.
Does your production url end with hm.akki.fr ?
I’m very embarrassed because all it’s working well.