Also the oddest thing is that my devellopment environement is fine
(PS: also i have created a smart action so that update the FeatureMappingStatus of the SoftwareFeature and everything work fine)
I would like to have access to your codebase to try reproducing your issue . Tell me how you want to. My github account is vincentmolinie
Hi @vince, thanks for helping sorry i was unavailable the last days.
could i have an email address, the project is on bitbucket
(or i could clone it temporally on a github account, or send you a zip )
Iâm not able to download your SQL backup, could you re-upload it so I could test on my end ?
Thanks in advance
Hello, hello, is there any news or do you need any more information I can give you ?
@Steve_Bunlon @jeffladiray @vince
Sorry for the delay our answers, part of the team was unavailable lately. As a result this new backup link you gave us has expired too.
Could you share it once again (alongside with the video of the issue too), iâll make sure that we store it on our end so we wonât have to ask for it ever again
Thank you
Hello! No worries thanks for helping, here are the documents:
- The recording: https://we.tl/t-n7YfNx0Ulm
- The db schema: https://we.tl/t-m5JoxAwgYJ
- The models: https://we.tl/t-peA5Fe3ohA
And I coudl give an access to the repo if needed
Thanks for your help have a good day
Hello @Benjamin_Marquis,
On behalf of the team, sorry again for the time it takes to find a suitable answer to your issue.
Would you mind checking that your code is in sync between you âDevelopmentâ and âProductionâ environments? Our internal data shows the âidâ column of the âsoftware_featureâ model for the âDevelopmentâ environment but not for âProductionâ.
Please update the code in production if applicable and restart the forest agent.
If this is not, or does not solve, the issue, is possible for you to copy the development layout to the production environment?
As mentioned in our documentation (https://docs.forestadmin.com/documentation/reference-guide/project-settings/environments-tab#creating-a-new-environment) this will overwrite the production layout with the development one. Please only do so if you are satisfied with the current behaviour of your development environment.
You can also try to add a new staging environment to your project, with the code from the development environment, and copy its layout there.
This might be a safer first test.
Hi @anon79585656 thanks for helping,
The code are the same for both environments ( I implemented smart actions after the glitch and it works in production)
I also copied the layout multiple times.
I deploy using Kubernetes so i belive the forest agent is restarted every time I deploy.
It is reallly a weird bug!
Hi ,
As @anon79585656 just told me this morning, we might be onto something.
I can see a differences between your software_feature
definition on the âProductionâ and âDevelopmentâ environment. It seems that the id
column is missing, which seems to correspond with the fact that you are getting a composite id instead of your default id
.
According to what I see in the forest-express-sequelize
code visible here, the fact that this id
is missing will trigger the composite key code generation, leading to your issue.
As stated above
You can also try to add a new staging environment to your project, with the code from the development environment, and copy its layout there.
This might be a safer first test.
I totally agree with that. If your able to reproduce on a freshly created environment with a copy layout, that would help us find the original issue.
Thanks for your patience
Hi @jeffladiray sorry for the delay
It software_feature seems they have same structure no ?
But i noticed join table always âcreateâ 2 ligne in the left panel, why is that ?
Iâll try create a fresh environement!
thanks for you help
@jeffladiray i redeployed a beta environement and copied the layout but seems there is still a problem
Looks like you dev/beta/production environments return the exact same schema now, it looks perfectly fine here.
We discovered that your .forestadmin-schema.json
returns 2 âsoftware featuresâ collections; a first one named software_feature
and a second one named softwareFeature
.
The softwareFeature
collection looks to be well defined (with the âidâ column):
{
"id": "softwareFeature",
"type": "collections",
"attributes": {
"icon": null,
"name": "softwareFeature",
"fields": [
{
"type": "Date",
"enums": null,
"field": "createdAt",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Number",
"enums": null,
"field": "feature",
"inverseOf": null,
"isVirtual": false,
"reference": "feature.featureIdKey",
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true,
"relationship": "BelongsTo"
},
{
"type": "Number",
"enums": null,
"field": "featureMappingStatus",
"inverseOf": null,
"isVirtual": false,
"reference": "featureMappingStatus.featureMappingStatusIdKey",
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true,
"relationship": "BelongsTo"
},
{
"type": "Number",
"enums": null,
"field": "id",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Number",
"enums": null,
"field": "software",
"inverseOf": null,
"isVirtual": false,
"reference": "software.softwareIdKey",
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true,
"relationship": "BelongsTo"
},
{
"type": "Date",
"enums": null,
"field": "updatedAt",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Date",
"enums": null,
"field": "updated_at",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
}
],
"nameOld": "softwareFeature",
"isVirtual": false,
"isReadOnly": false,
"integration": null,
"isSearchable": true,
"paginationType": "page",
"onlyForRelationships": false
},
and the software_feature
collection is incomplete and defined as a collection with a composite primary key based on feature_id
/ software_id
:
{
"id": "software_feature",
"type": "collections",
"attributes": {
"icon": null,
"name": "software_feature",
"fields": [
{
"type": "Date",
"enums": null,
"field": "createdAt",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Number",
"enums": null,
"field": "feature_id",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Number",
"enums": null,
"field": "software_id",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
},
{
"type": "Date",
"enums": null,
"field": "updatedAt",
"inverseOf": null,
"isVirtual": false,
"reference": null,
"isReadOnly": false,
"isRequired": false,
"isSortable": true,
"integration": null,
"validations": [],
"defaultValue": null,
"isFilterable": true
}
],
"nameOld": "software_feature",
"isVirtual": false,
"isReadOnly": false,
"integration": null,
"isSearchable": true,
"paginationType": "page",
"onlyForRelationships": false
},
My feeling is that this second collection is the origin of the issue.
I donât know why Lumber generates it, but we should find a way to get rid of it for debug purpose.
.forestadmin-schema.json
manual edit is clearly an operation that should not be done, because this file is generated on server start in development environments.
But, in order to debug this situation, could you try to manually remove the software_feature
of the JSON, commit this change and deploy it in a remote environment where you can test it (beta?).
There is something wrong in the current setup so, as it could clean the setup, I hope it could also fix your issue.
Let us know.