platform push error (for already deployed app)
What could be a possible reason for the error below? The app was successfully deployed and now I'm pushing a very small change.
command: platform push
response:
Selected project: ll_project (v4cpjgry2ggze)
Pushing HEAD to the environment master (type: development).
Are you sure you want to continue? [Y/n] Y
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 528 bytes | 528.00 KiB/s, done.
Total 6 (delta 5), reused 0 (delta 0), pack-reused 0
*** Server encountered a fatal error handling the push: Client sent invalid option: {'environment.parent': "Parent '{name}' does not exist"}
fatal: the remote end hung up unexpectedly
Comments
Based on the information above, it appears you're trying to activate a development environment that doesn't have a parent branch (ie production). Specifically, this line:
How was the `master` branch in this case created? Was it branched from your default/production branch?
thank you for your reply. Please see below more details.
master (dev environment) was created by default under main (see screenshot below).
This was done by running:
1. platform create
2. then: platform push
3. the above was successful and the app is up and running. The error I get now with any additional push for a small change.
and yes, main has production type. Status for main is inactive and for master is active.
Are these the steps you used for the
mainor themasterbranch? I'm assuming these are the steps you took for themainbranch and notmaster.If the above assumption is correct, at some point you should have done either a
platform environment:branch master mainor agit checkout -b master mainor some other branching command to create branchmasterfrom the current commit ofmain.Can you run
platform environment:info parent -e mainand thenplatform environment:info parent -e masterand let me know what it reports for each?I appreciate your help with this, Paul. Please see below more details. I have deleted the project and re-created it again. Here are the steps.
git commit -am "Ready for deployment".
platform create
Selecting name, region, default branch - left default as main
Git repository detected: XX/XX/XX. Set new project as the remote for this repository? Y
platform push
Enter the target branch name (default: mainBranch):
Create mainBranch as an active environment? [Y/n] Y
Pushing HEAD to the branch mainBranch of project ll_project
...
...
* [new branch] HEAD -> mainBranch
Now I got created Main production env inactive and under it mainBranch (development) active. And I can I acces the URL created for the project.
Now i apply small change locally and perform git commit -am "small change"
platform push and i got the error message.
platform environment:info parent -e main --> returns null
platform environment:info parent -e master --> returns main
I think i found how to fix it but I'm still not clear why it happened. Originally, I used default in “platform push” which created for me new dev env and then 2nd push didn't work.
If I override the target branch and use main (as target branch) every time then it works.
Please sign in to leave a comment.